Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[S] The CLI needs a way for users to create side tag updates #2325

Closed
bowlofeggs opened this issue Apr 26, 2018 · 1 comment · Fixed by #3353
Assignees
Projects

Comments

@bowlofeggs
Copy link
Member

@bowlofeggs bowlofeggs commented Apr 26, 2018

Similarly to #2324, the CLI also needs to be able to create side tag updates. This will also enable fedpkg to create side tag updates via the Bodhi CLI, if they like.

@bowlofeggs bowlofeggs added this to To do in CI Gating via automation Apr 26, 2018
@bowlofeggs bowlofeggs moved this from To do to Minimum Viable Product in CI Gating Feb 15, 2019
@bowlofeggs bowlofeggs moved this from Minimum Viable Product to To do in CI Gating Mar 5, 2019
@bowlofeggs bowlofeggs changed the title The CLI needs a way for users to create side tag updates [S] The CLI needs a way for users to create side tag updates Apr 25, 2019
@nphilipp nphilipp moved this from To do to In progress in CI Gating May 21, 2019
@nphilipp nphilipp self-assigned this May 21, 2019
@cverna cverna assigned Zlopez and unassigned nphilipp Jun 19, 2019
@nphilipp

This comment has been minimized.

Copy link
Member

@nphilipp nphilipp commented Jun 19, 2019

@Zlopez as discussed, here are the couple changes I had in my worktree:

diff --git a/bodhi/client/__init__.py b/bodhi/client/__init__.py
index dfd7ab38..130bd8c6 100644
--- a/bodhi/client/__init__.py
+++ b/bodhi/client/__init__.py
@@ -113,6 +113,8 @@ new_edit_options = [
                  help='Space or comma-separated list of required Taskotron tasks'),
     click.option('--suggest', help='Post-update user suggestion',
                  type=click.Choice(['logout', 'reboot'])),
+    click.option('--from-tag', help='Use builds from a Koji tag instead of '
+                                    'specifying them individually.'),
     staging_option]
 
 
@@ -392,8 +394,14 @@ def new(user, password, url, debug, openid_api, **kwargs):
         debug (bool): If the --debug flag was set
         openid_api (str): A URL for an OpenID API to use to authenticate to Bodhi.
         kwargs (dict): Other keyword arguments passed to us by click.
+    Raises:
+        click.BadOptionUsage: If both builds and --from-tag are specified.
     """
 
+    if kwargs['builds'] and kwargs['from_tag']:
+        raise click.BadOptionUsage('--from-tag',
+                                   "Can't use --from-tag and specify individual builds together.")
+
     client = bindings.BodhiClient(base_url=url, username=user, password=password,
                                   staging=kwargs['staging'], openid_api=openid_api)
 
diff --git a/bodhi/client/bindings.py b/bodhi/client/bindings.py
index b30577bc..6c96b741 100644
--- a/bodhi/client/bindings.py
+++ b/bodhi/client/bindings.py
@@ -249,6 +249,8 @@ class BodhiClient(OpenIdBaseClient):
                 update have been confirmed by testers.
             require_testcases (bool): A boolean to require that this update passes
                 all test cases before reaching stable.
+            from_tag (str): The name of a Koji tag from which to pull builds
+                instead of providing them manually in `builds`.
         Returns:
             munch.Munch: The Bodhi server's response to the request.
         """

You can use that as a starting point or inspiration. It might even only need tests 😉 but I'm not 100% sure.

Zlopez added a commit to Zlopez/bodhi that referenced this issue Jun 20, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Jun 26, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
@Zlopez Zlopez moved this from In progress to Need Review in CI Gating Jun 26, 2019
Zlopez added a commit to Zlopez/bodhi that referenced this issue Jun 27, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Jun 27, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Jul 1, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Jul 1, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Jul 1, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Jul 25, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Jul 25, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Aug 1, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Aug 1, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Aug 2, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit to Zlopez/bodhi that referenced this issue Aug 2, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
nphilipp added a commit to Zlopez/bodhi that referenced this issue Aug 2, 2019
Fixes fedora-infra#2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
@mergify mergify bot closed this in #3353 Aug 2, 2019
CI Gating automation moved this from Need Review to Merged to develop Aug 2, 2019
mergify bot added a commit that referenced this issue Aug 2, 2019
Fixes #2325

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
CI Gating
  
Merged to develop
3 participants
You can’t perform that action at this time.