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] - API users should be able to create updates based on Koji side tags #3009

Closed
bowlofeggs opened this issue Feb 15, 2019 · 3 comments
Assignees
Projects

Comments

@bowlofeggs
Copy link
Member

@bowlofeggs bowlofeggs commented Feb 15, 2019

Bodhi currently allows users to create updates by specifying a list of builds via the API. In order to support Rawhide gating without addition additional steps to packagers for Rawhide packaging*, we will need to provide a way for packagers to create multi-build updates. In #3007 we are planning to automatically create updates when we see builds tagged into particular Koji tags. That will work for single build updates, but packagers often need to update multiple packages atomically due to build dependencies.

The plan here is to allow packagers to work in Koji side tags to do their builds. When they are ready to publish their work, they will ask Bodhi to create an update based on that side tag. Bodhi will then query Koji to get the needed information and create an update with the builds found there.

The API needs to allow packagers to create updates based on NVRs, as they do today, or based on koji side tag names. When packagers use a side tag, Koji should be queried to find the list of NVRs, and then Bodhi can proceed as it would have before.

  • Packagers are not used to dealing with Bodhi for Rawhide. We could just start using Bodhi for Rawhide today, but many packagers would be confused and some may dislike the extra step. This plan is about trying to minimize any extra burden placed on packagers as we add gating to Rawhide.
@bowlofeggs bowlofeggs added this to To do in CI Gating via automation Feb 15, 2019
@bowlofeggs bowlofeggs moved this from To do to Minimum Viable Product in CI Gating Feb 15, 2019
bowlofeggs added a commit to bowlofeggs/bodhi that referenced this issue Feb 15, 2019
Users can now select a Koji side tag to create an Update. Bodhi
will look at the Koji tag to find the list of Builds and use that
to create the resulting update.

fixes fedora-infra#3009

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
@bowlofeggs bowlofeggs changed the title Users should be able to create updates based on Koji side tags API users should be able to create updates based on Koji side tags Feb 15, 2019
@bowlofeggs bowlofeggs moved this from Minimum Viable Product to To do in CI Gating Mar 5, 2019
@cverna

This comment has been minimized.

Copy link
Member

@cverna cverna commented Apr 17, 2019

Scope

Idea is to reuse the current Update creation form and add a toggle to either provide a list of build or a side tag. Based on the input the API will be able to either process the list of build or get the list of build from the side tag before processing it.

Notes: We might want to store the side tag provided, to allow packager to edit the update and not have to provide the side tag again.

@cverna cverna changed the title API users should be able to create updates based on Koji side tags [S] - API users should be able to create updates based on Koji side tags Apr 17, 2019
@cverna cverna moved this from To do to Minimum Viable Product in CI Gating Apr 29, 2019
@nphilipp

This comment has been minimized.

Copy link
Member

@nphilipp nphilipp commented Apr 29, 2019

I'll pick this up, but so far can't make it official because I don't have the necessary permissions, see https://pagure.io/fedora-infrastructure/issue/7747

@bowlofeggs bowlofeggs moved this from Minimum Viable Product to In progress in CI Gating Apr 29, 2019
@bowlofeggs bowlofeggs closed this Apr 29, 2019
CI Gating automation moved this from In progress to Merged to develop Apr 29, 2019
@bowlofeggs bowlofeggs reopened this Apr 29, 2019
CI Gating automation moved this from Merged to develop to In progress Apr 29, 2019
@nphilipp

This comment has been minimized.

Copy link
Member

@nphilipp nphilipp commented May 21, 2019

The PR for this is #3228, which I missed linking here for a while.

@nphilipp nphilipp moved this from In progress to Need Review in CI Gating May 21, 2019
nphilipp added a commit to nphilipp/bodhi that referenced this issue Jun 24, 2019
This lets users populate builds from Koji (side-)tags when creating
updates (or repopulate when editing them). it also stores the tag in
question in Update.from_tag.

Squashed commit of the following:

commit c47e2dfbe55a2a0984ead8e1ec6a5ff6f3fee02a
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri May 17 18:33:56 2019 +0200

    Move Koji tag expansion to validate_from_tag().

    This finds the latest builds in a tag in the from_tag validator and adds
    them to request.validated. This is necessary because the list of builds
    is further used in validate_acls() to decide if a user is allowed to
    submit an update for the involved builds.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit df05cebf8aec9b3c7ca20c350ea2acef44c1e4f7
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:24:54 2019 +0200

    Create updates from a Koji tag.

    This lets users specify a Koji tag instead of an explicit set of builds,
    from which the latest component builds will be pulled.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 665aa086009789da052c2721a82a795466a7ac7b
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:22:37 2019 +0200

    Add from_tag parameter to get_updates().

    This allows testing updates where the builds should be filled from all
    latest builds in a Koji tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit c84a637c70753a6bc333ba0dcb62d98a39336d58
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:16:10 2019 +0200

    Add Update.from_tag.

    This column stores the tag from which the set of builds of an update was
    filled initially.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 0c0717d374f6f6bbcb51e60161576c1a389ca325
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 12:22:42 2019 +0200

    Accept from_tag alternatively to builds.

    This is to let users create updates from all latest builds of a Koji
    tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit d6bf4fa6b69186bee4e4b01766d47efb78220dae
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 11:05:23 2019 +0200

    Add validate_builds_or_from_tag_exist().

    This validator checks that at minimum one of `builds` or `from_tag` is
    supplied as parameters and isn't empty.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit e5e3480901cb7d9e90cb3a986c667790951e37fb
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 10:58:47 2019 +0200

    Make DevBuildsys.listTagged() honor `latest` keyword.

    Previously, it could return multiple builds of the same component in a
    tag. This required updating tests which expected these wrong results.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 68953597b51297c7ca33ae18976018574bedec6f
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri May 10 12:08:19 2019 +0200

    Add validate_from_tag().

    This validator ensures that if from_tag is supplied in the request, it
    is a valid Koji tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

Fixes: fedora-infra#3009

Signed-off-by: Nils Philippsen <nils@redhat.com>
nphilipp added a commit to nphilipp/bodhi that referenced this issue Jun 25, 2019
This lets users populate builds from Koji (side-)tags when creating
updates (or repopulate when editing them). it also stores the tag in
question in Update.from_tag.

Squashed commit of the following:

commit c47e2dfbe55a2a0984ead8e1ec6a5ff6f3fee02a
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri May 17 18:33:56 2019 +0200

    Move Koji tag expansion to validate_from_tag().

    This finds the latest builds in a tag in the from_tag validator and adds
    them to request.validated. This is necessary because the list of builds
    is further used in validate_acls() to decide if a user is allowed to
    submit an update for the involved builds.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit df05cebf8aec9b3c7ca20c350ea2acef44c1e4f7
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:24:54 2019 +0200

    Create updates from a Koji tag.

    This lets users specify a Koji tag instead of an explicit set of builds,
    from which the latest component builds will be pulled.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 665aa086009789da052c2721a82a795466a7ac7b
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:22:37 2019 +0200

    Add from_tag parameter to get_updates().

    This allows testing updates where the builds should be filled from all
    latest builds in a Koji tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit c84a637c70753a6bc333ba0dcb62d98a39336d58
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:16:10 2019 +0200

    Add Update.from_tag.

    This column stores the tag from which the set of builds of an update was
    filled initially.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 0c0717d374f6f6bbcb51e60161576c1a389ca325
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 12:22:42 2019 +0200

    Accept from_tag alternatively to builds.

    This is to let users create updates from all latest builds of a Koji
    tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit d6bf4fa6b69186bee4e4b01766d47efb78220dae
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 11:05:23 2019 +0200

    Add validate_builds_or_from_tag_exist().

    This validator checks that at minimum one of `builds` or `from_tag` is
    supplied as parameters and isn't empty.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit e5e3480901cb7d9e90cb3a986c667790951e37fb
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 10:58:47 2019 +0200

    Make DevBuildsys.listTagged() honor `latest` keyword.

    Previously, it could return multiple builds of the same component in a
    tag. This required updating tests which expected these wrong results.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 68953597b51297c7ca33ae18976018574bedec6f
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri May 10 12:08:19 2019 +0200

    Add validate_from_tag().

    This validator ensures that if from_tag is supplied in the request, it
    is a valid Koji tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

Fixes: fedora-infra#3009

Signed-off-by: Nils Philippsen <nils@redhat.com>
nphilipp added a commit to nphilipp/bodhi that referenced this issue Jun 25, 2019
This lets users populate builds from Koji (side-)tags when creating
updates (or repopulate when editing them). it also stores the tag in
question in Update.from_tag.

Squashed commit of the following:

commit c47e2dfbe55a2a0984ead8e1ec6a5ff6f3fee02a
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri May 17 18:33:56 2019 +0200

    Move Koji tag expansion to validate_from_tag().

    This finds the latest builds in a tag in the from_tag validator and adds
    them to request.validated. This is necessary because the list of builds
    is further used in validate_acls() to decide if a user is allowed to
    submit an update for the involved builds.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit df05cebf8aec9b3c7ca20c350ea2acef44c1e4f7
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:24:54 2019 +0200

    Create updates from a Koji tag.

    This lets users specify a Koji tag instead of an explicit set of builds,
    from which the latest component builds will be pulled.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 665aa086009789da052c2721a82a795466a7ac7b
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:22:37 2019 +0200

    Add from_tag parameter to get_updates().

    This allows testing updates where the builds should be filled from all
    latest builds in a Koji tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit c84a637c70753a6bc333ba0dcb62d98a39336d58
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:16:10 2019 +0200

    Add Update.from_tag.

    This column stores the tag from which the set of builds of an update was
    filled initially.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 0c0717d374f6f6bbcb51e60161576c1a389ca325
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 12:22:42 2019 +0200

    Accept from_tag alternatively to builds.

    This is to let users create updates from all latest builds of a Koji
    tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit d6bf4fa6b69186bee4e4b01766d47efb78220dae
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 11:05:23 2019 +0200

    Add validate_builds_or_from_tag_exist().

    This validator checks that at minimum one of `builds` or `from_tag` is
    supplied as parameters and isn't empty.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit e5e3480901cb7d9e90cb3a986c667790951e37fb
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 10:58:47 2019 +0200

    Make DevBuildsys.listTagged() honor `latest` keyword.

    Previously, it could return multiple builds of the same component in a
    tag. This required updating tests which expected these wrong results.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 68953597b51297c7ca33ae18976018574bedec6f
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri May 10 12:08:19 2019 +0200

    Add validate_from_tag().

    This validator ensures that if from_tag is supplied in the request, it
    is a valid Koji tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

Fixes: fedora-infra#3009

Signed-off-by: Nils Philippsen <nils@redhat.com>
nphilipp added a commit to nphilipp/bodhi that referenced this issue Jun 25, 2019
This lets users populate builds from Koji (side-)tags when creating
updates (or repopulate when editing them). it also stores the tag in
question in Update.from_tag.

Squashed commit of the following:

commit c47e2dfbe55a2a0984ead8e1ec6a5ff6f3fee02a
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri May 17 18:33:56 2019 +0200

    Move Koji tag expansion to validate_from_tag().

    This finds the latest builds in a tag in the from_tag validator and adds
    them to request.validated. This is necessary because the list of builds
    is further used in validate_acls() to decide if a user is allowed to
    submit an update for the involved builds.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit df05cebf8aec9b3c7ca20c350ea2acef44c1e4f7
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:24:54 2019 +0200

    Create updates from a Koji tag.

    This lets users specify a Koji tag instead of an explicit set of builds,
    from which the latest component builds will be pulled.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 665aa086009789da052c2721a82a795466a7ac7b
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:22:37 2019 +0200

    Add from_tag parameter to get_updates().

    This allows testing updates where the builds should be filled from all
    latest builds in a Koji tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit c84a637c70753a6bc333ba0dcb62d98a39336d58
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 15:16:10 2019 +0200

    Add Update.from_tag.

    This column stores the tag from which the set of builds of an update was
    filled initially.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 0c0717d374f6f6bbcb51e60161576c1a389ca325
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 12:22:42 2019 +0200

    Accept from_tag alternatively to builds.

    This is to let users create updates from all latest builds of a Koji
    tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit d6bf4fa6b69186bee4e4b01766d47efb78220dae
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 11:05:23 2019 +0200

    Add validate_builds_or_from_tag_exist().

    This validator checks that at minimum one of `builds` or `from_tag` is
    supplied as parameters and isn't empty.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit e5e3480901cb7d9e90cb3a986c667790951e37fb
Author: Nils Philippsen <nils@redhat.com>
Date:   Tue May 14 10:58:47 2019 +0200

    Make DevBuildsys.listTagged() honor `latest` keyword.

    Previously, it could return multiple builds of the same component in a
    tag. This required updating tests which expected these wrong results.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 68953597b51297c7ca33ae18976018574bedec6f
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri May 10 12:08:19 2019 +0200

    Add validate_from_tag().

    This validator ensures that if from_tag is supplied in the request, it
    is a valid Koji tag.

    Signed-off-by: Nils Philippsen <nils@redhat.com>

Fixes: fedora-infra#3009

Signed-off-by: Nils Philippsen <nils@redhat.com>
@mergify mergify bot closed this in 63df5a2 Jun 25, 2019
CI Gating automation moved this from Need Review to Merged to develop Jun 25, 2019
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.