You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/25 12:40:03 UTC

[GitHub] [arrow] kszucs opened a new pull request, #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

kszucs opened a new pull request, #13230:
URL: https://github.com/apache/arrow/pull/13230

   Run the following to see what would happens without executing it:
   
   ```
   archery release --jira-cache /tmp/jiracache cherry-pick 9.0.0 
   ```
   
   Try creating a `maint-9.0.0` branch based off of the `master` branch:
   
   ```
   archery release --jira-cache /tmp/jiracache cherry-pick 9.0.0 --execute
   ```
   
   Now there should be the `maint-9.0.0` branch checked out locally. Rerunning the previous command with `--continue` option would do nothing since there are no new commits to apply:
   
   ```
   archery release --jira-cache /tmp/jiracache cherry-pick 9.0.0 --execute --continue
   ```
   
   So simulate new commits be resetting `maint-9.0.0` branch to three commits before the current master:
   
   ```
   git branch -f maint-9.0.0 master~3
   ```
   
   Apply the new patches:
   
   ```
   archery release --jira-cache /tmp/jiracache cherry-pick 9.0.0 --execute --continue
   ```


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] kszucs closed pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
kszucs closed pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases
URL: https://github.com/apache/arrow/pull/13230


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] github-actions[bot] commented on pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13230:
URL: https://github.com/apache/arrow/pull/13230#issuecomment-1137189634

   https://issues.apache.org/jira/browse/ARROW-16654


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] kszucs commented on pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
kszucs commented on PR #13230:
URL: https://github.com/apache/arrow/pull/13230#issuecomment-1137189896

   cc @raulcd @assignUser 


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] kszucs commented on a diff in pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
kszucs commented on code in PR #13230:
URL: https://github.com/apache/arrow/pull/13230#discussion_r881773204


##########
dev/archery/archery/release.py:
##########
@@ -287,44 +296,42 @@ def from_jira(version, jira=None, repo=None):
         elif not isinstance(version, Version):
             raise TypeError(version)
 
-        # decide the type of the release based on the version number
-        if version.patch == 0:
-            if version.minor == 0:
-                klass = MajorRelease
-            elif version.major == 0:
-                # handle minor releases before 1.0 as major releases
-                klass = MajorRelease
-            else:
-                klass = MinorRelease
-        else:
-            klass = PatchRelease
+        self.version = version
+        self.jira = jira
+        self.repo = repo
 
-        # prevent instantiating release object directly
-        obj = klass.__new__(klass)
-        obj.version = version
-        obj.jira = jira
-        obj.repo = repo
+    def __repr__(self):
+        if self.version.released:
+            status = "released_at={self.version.release_date!r}"
+        else:
+            status = "pending"
+        return f"<{self.__class__.__name__} {self.version!r} {status}>"
 
-        return obj
+    @staticmethod
+    def from_jira(version, jira=None, repo=None):
+        return Release(version, jira, repo)
 
     @property
     def is_released(self):
         return self.version.released
 
     @property
     def tag(self):
-        return "apache-arrow-{}".format(str(self.version))
+        return f"apache-arrow-{self.version}"
 
-    @property
+    @abstractproperty

Review Comment:
   Yes, updating



-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] github-actions[bot] commented on pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13230:
URL: https://github.com/apache/arrow/pull/13230#issuecomment-1137189657

   :warning: Ticket **has not been started in JIRA**, please click 'Start Progress'.


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] raulcd commented on a diff in pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
raulcd commented on code in PR #13230:
URL: https://github.com/apache/arrow/pull/13230#discussion_r881762224


##########
dev/archery/archery/release.py:
##########
@@ -287,44 +296,42 @@ def from_jira(version, jira=None, repo=None):
         elif not isinstance(version, Version):
             raise TypeError(version)
 
-        # decide the type of the release based on the version number
-        if version.patch == 0:
-            if version.minor == 0:
-                klass = MajorRelease
-            elif version.major == 0:
-                # handle minor releases before 1.0 as major releases
-                klass = MajorRelease
-            else:
-                klass = MinorRelease
-        else:
-            klass = PatchRelease
+        self.version = version
+        self.jira = jira
+        self.repo = repo
 
-        # prevent instantiating release object directly
-        obj = klass.__new__(klass)
-        obj.version = version
-        obj.jira = jira
-        obj.repo = repo
+    def __repr__(self):
+        if self.version.released:
+            status = "released_at={self.version.release_date!r}"
+        else:
+            status = "pending"
+        return f"<{self.__class__.__name__} {self.version!r} {status}>"
 
-        return obj
+    @staticmethod
+    def from_jira(version, jira=None, repo=None):
+        return Release(version, jira, repo)
 
     @property
     def is_released(self):
         return self.version.released
 
     @property
     def tag(self):
-        return "apache-arrow-{}".format(str(self.version))
+        return f"apache-arrow-{self.version}"
 
-    @property
+    @abstractproperty

Review Comment:
   this seems to be deprecated https://docs.python.org/3/library/abc.html#abc.abstractproperty in favor of:
   
   ```
   @property
   @abstractmethod
   ```
   should we use that instead?



##########
dev/archery/archery/release.py:
##########
@@ -370,11 +377,10 @@ def commits(self):
             try:
                 upper = self.repo.branches[self.branch]
             except IndexError:
-                warnings.warn("Release branch `{}` doesn't exist."
-                              .format(self.branch))
+                warnings.warn(f"Release branch `{self.branch}` doesn't exist.")
                 return []
 
-        commit_range = "{}..{}".format(lower, upper)
+        commit_range = f"{lower}..{upper}"

Review Comment:
   I love the f-string changes. Thanks!



-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] ursabot commented on pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #13230:
URL: https://github.com/apache/arrow/pull/13230#issuecomment-1141292076

   Benchmark runs are scheduled for baseline = 0066e0ea0fe2963f0f3b7d76fce383ac533dcace and contender = 02af333b8b684e81919618440710c9d974f77acc. 02af333b8b684e81919618440710c9d974f77acc is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/0ec22dd0dddf40328877776a3a9535c5...1b3fa03a73af48e4bcb18ba68b208115/)
   [Failed :arrow_down:0.16% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/30616db7fa204afbaac366391385fddb...2a7f45be0f5f41cf98805ac60466dc60/)
   [Failed :arrow_down:0.36% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/795803687375445db7044c263f6a7ec9...bcd729e3ea244f26bdc6992e24c589a7/)
   [Finished :arrow_down:0.51% :arrow_up:0.08%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/4dcbc1a568624c38affc93d7fb27e67d...1a7b32fb403a457f89d564ce2a5b3ad3/)
   Buildkite builds:
   [Finished] [`02af333b` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/842)
   [Finished] [`02af333b` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/841)
   [Finished] [`02af333b` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/831)
   [Finished] [`02af333b` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/845)
   [Finished] [`0066e0ea` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/841)
   [Failed] [`0066e0ea` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/840)
   [Failed] [`0066e0ea` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/830)
   [Finished] [`0066e0ea` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/844)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] kszucs commented on a diff in pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
kszucs commented on code in PR #13230:
URL: https://github.com/apache/arrow/pull/13230#discussion_r884717824


##########
dev/archery/archery/cli.py:
##########
@@ -900,22 +900,16 @@ def release_cherry_pick(obj, version, dry_run, recreate):
     """
     Cherry pick commits.
     """
-    from .release import Release, MinorRelease, PatchRelease
+    from .release import Release
 
     release = Release.from_jira(version, jira=obj['jira'], repo=obj['repo'])
-    if not isinstance(release, (MinorRelease, PatchRelease)):
-        raise click.UsageError('Cherry-pick command only supported for minor '
-                               'and patch releases')
 
     if not dry_run:
         release.cherry_pick_commits(recreate_branch=recreate)

Review Comment:
   Good idea, but may handle it in follow-up PR.



-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] kou commented on a diff in pull request #13230: ARROW-16654: [Dev][Archery] Support cherry-picking for major releases

Posted by GitBox <gi...@apache.org>.
kou commented on code in PR #13230:
URL: https://github.com/apache/arrow/pull/13230#discussion_r882079126


##########
dev/archery/archery/cli.py:
##########
@@ -900,22 +900,16 @@ def release_cherry_pick(obj, version, dry_run, recreate):
     """
     Cherry pick commits.
     """
-    from .release import Release, MinorRelease, PatchRelease
+    from .release import Release
 
     release = Release.from_jira(version, jira=obj['jira'], repo=obj['repo'])
-    if not isinstance(release, (MinorRelease, PatchRelease)):
-        raise click.UsageError('Cherry-pick command only supported for minor '
-                               'and patch releases')
 
     if not dry_run:
         release.cherry_pick_commits(recreate_branch=recreate)

Review Comment:
   How about moving `dry_run` mode implementation to `Release`?
   
   ```suggestion
       release.cherry_pick_commits(recreate_branch=recreate, dry_run=dry_run)
   ```
   
   `Release` knows what `git` command lines should be ran. If we move `dry_run` mode implementation to `Release`, we can implement `dry_run` mode and non `dry_run` mode nearby.



-- 
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: github-unsubscribe@arrow.apache.org

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