You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/02/22 23:14:16 UTC

[GitHub] [geode] nabarunnag opened a new pull request #7387: GEODE-8140: Set scope field in gfsh.

nabarunnag opened a new pull request #7387:
URL: https://github.com/apache/geode/pull/7387


   * create region now includes a new field called
    scope to set the scope
   * This field is only valid for Replicated Regions.
   * describe region for replicated regions will now
    display the scope too.
   
   <!-- Thank you for submitting a contribution to Apache Geode. -->
   
   <!-- In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken: 
   -->
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   <!-- Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jinmeiliao commented on a change in pull request #7387: GEODE-8140: Set scope field in gfsh.

Posted by GitBox <gi...@apache.org>.
jinmeiliao commented on a change in pull request #7387:
URL: https://github.com/apache/geode/pull/7387#discussion_r818024208



##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
##########
@@ -54,6 +59,63 @@ public void before() throws Exception {
     gfsh.connectAndVerify(locator);
   }
 
+  public Object[] replicatedRegionAndScopePairs() {

Review comment:
       It would be nice to add a few junit tests in `CreateRegionCommandTest`, where you can assert on the behavior if failed validation.

##########
File path: geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
##########
@@ -227,9 +230,22 @@ public ResultModel createRegion(
       regionConfig.setType(regionShortcut.name());
       regionConfig.setRegionAttributes(
           new RegionConverter().createRegionAttributesByType(regionShortcut.name()));
+      RegionAttributesType regionAttributesType = regionConfig.getRegionAttributes();

Review comment:
       these type of validation can be done in the `preExecution` method on the gfsh side , see logic in the `Interceptor` inner class in the same class filee.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] nabarunnag commented on a change in pull request #7387: GEODE-8140: Set scope field in gfsh.

Posted by GitBox <gi...@apache.org>.
nabarunnag commented on a change in pull request #7387:
URL: https://github.com/apache/geode/pull/7387#discussion_r813431826



##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
##########
@@ -33,6 +37,7 @@
 import org.apache.geode.test.junit.rules.serializable.SerializableTestName;
 
 @Category({WanTest.class})
+@RunWith(JUnitParamsRunner.class)

Review comment:
       Thank you! I have made the change




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] nabarunnag commented on a change in pull request #7387: GEODE-8140: Set scope field in gfsh.

Posted by GitBox <gi...@apache.org>.
nabarunnag commented on a change in pull request #7387:
URL: https://github.com/apache/geode/pull/7387#discussion_r821224857



##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
##########
@@ -54,6 +59,63 @@ public void before() throws Exception {
     gfsh.connectAndVerify(locator);
   }
 
+  public Object[] replicatedRegionAndScopePairs() {

Review comment:
       Done!
   Thank you for the feedback

##########
File path: geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
##########
@@ -227,9 +230,22 @@ public ResultModel createRegion(
       regionConfig.setType(regionShortcut.name());
       regionConfig.setRegionAttributes(
           new RegionConverter().createRegionAttributesByType(regionShortcut.name()));
+      RegionAttributesType regionAttributesType = regionConfig.getRegionAttributes();

Review comment:
       Done!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] nabarunnag merged pull request #7387: GEODE-8140: Set scope field in gfsh.

Posted by GitBox <gi...@apache.org>.
nabarunnag merged pull request #7387:
URL: https://github.com/apache/geode/pull/7387


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] demery-pivotal commented on a change in pull request #7387: GEODE-8140: Set scope field in gfsh.

Posted by GitBox <gi...@apache.org>.
demery-pivotal commented on a change in pull request #7387:
URL: https://github.com/apache/geode/pull/7387#discussion_r813415472



##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
##########
@@ -33,6 +37,7 @@
 import org.apache.geode.test.junit.rules.serializable.SerializableTestName;
 
 @Category({WanTest.class})
+@RunWith(JUnitParamsRunner.class)

Review comment:
       Please use `GeodeParamsRunner` instead. `JUnitParamsRunner` is incompatible with JUnit Platform, which we now use to run tests.
   
   `GeodeParamsRunner` extends `JUnitParamsRunner`, so you can use it the same way in tests. But it overrides `JUnitParamsRunner` to make it more compatible with JUnit Platform.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] nabarunnag commented on pull request #7387: GEODE-8140: Set scope field in gfsh.

Posted by GitBox <gi...@apache.org>.
nabarunnag commented on pull request #7387:
URL: https://github.com/apache/geode/pull/7387#issuecomment-1068229025


   @jinmeiliao if you feel all concerns are addressed, can you approve it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org