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 20:16:21 UTC

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

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