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

Implement koji_build trigger for koji_build job #2378

Closed
2 tasks done
nforro opened this issue Mar 21, 2024 · 1 comment · Fixed by #2457
Closed
2 tasks done

Implement koji_build trigger for koji_build job #2378

nforro opened this issue Mar 21, 2024 · 1 comment · Fixed by #2457
Assignees
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/high This issue impacts multiple/lot of users. kind/feature New feature or a request for enhancement.

Comments

@nforro
Copy link
Member

nforro commented Mar 21, 2024

TODO:

  • start listening to org.fedoraproject.prod.buildsys.tag events
  • implement koji_build trigger:
    • check if the event's tag matches a sidetag in the sidetags table
    • if it does, get list of packages tagged into the sidetag (koji list-tagged $SIDETAG)
    • for every package/project get Packit config and find any jobs with koji_build trigger and sidetag_group matching the sidetag (if this proves impractical, we can resort to having a global configuration for all packages sharing a sidetag)
    • for every job found check if their tagged_packages are a subset of packages tagged into the sidetag
    • if yes, trigger the build (from the HEAD commit of the corresponding dist-git branch)
@nforro nforro added kind/feature New feature or a request for enhancement. area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. impact/high This issue impacts multiple/lot of users. gain/high This brings a lot of value to (not strictly a lot of) users. labels Mar 21, 2024
@nforro nforro moved this from new to priority-backlog in Packit Kanban Board Mar 21, 2024
@nforro
Copy link
Member Author

nforro commented Mar 21, 2024

Here is an example org.fedoraproject.prod.buildsys.tag payload:

{
  "body": {
    "base_url": "https://koji.fedoraproject.org",
    "build_id": 2424213,
    "instance": "primary",
    "name": "python-smart_open",
    "owner": "music",
    "release": "1.fc40",
    "tag": "f40-build-side-85541",
    "tag_id": 85541,
    "user": "music",
    "version": "7.0.3"
  },
  "headers": {
    "fedora_messaging_rpm_python-smart_open": true,
    "fedora_messaging_schema": "koji_fedoramessaging.tag.TagV1",
    "fedora_messaging_severity": 10,
    "fedora_messaging_user_music": true,
    "priority": 2,
    "sent-at": "2024-03-21T15:17:43+00:00"
  },
  "id": "57d89d96-8eac-4f9f-b787-053cd2532305",
  "queue": null,
  "topic": "org.fedoraproject.prod.buildsys.tag"
}

@lachmanfrantisek lachmanfrantisek moved this from priority-backlog to refined in Packit Kanban Board May 2, 2024
@nforro nforro self-assigned this May 6, 2024
@nforro nforro moved this from refined to in-progress in Packit Kanban Board May 6, 2024
softwarefactory-project-zuul bot added a commit to packit/packit that referenced this issue May 15, 2024
Allow to list builds tagged into a Koji tag

Related to packit/packit-service#2378.

Reviewed-by: Laura Barcziová
softwarefactory-project-zuul bot added a commit to packit/specfile that referenced this issue May 23, 2024
Make (N)EVR(A) objects comparable

Related to packit/packit-service#2378. In the end it will probably not be needed for the sidetags related stuff, but it can be useful nevertheless.

Reviewed-by: Laura Barcziová
nforro added a commit to packit/deployment that referenced this issue Jul 9, 2024
softwarefactory-project-zuul bot added a commit to packit/packit that referenced this issue Jul 9, 2024
Changes needed for triggering Koji builds by Koji tag events

Related to packit/packit-service#2378.

Reviewed-by: František Lachman <[email protected]>
Reviewed-by: Maja Massarini
softwarefactory-project-zuul bot added a commit to packit/packit-service-fedmsg that referenced this issue Jul 9, 2024
Process org.fedoraproject.prod.buildsys.tag events

Related to packit/packit-service#2378.

Reviewed-by: František Lachman <[email protected]>
@nforro nforro moved this from in-progress to in-review in Packit Kanban Board Jul 10, 2024
softwarefactory-project-zuul bot added a commit to packit/packit that referenced this issue Jul 11, 2024
Move job config options to the proper place

Related to packit/packit-service#2378.

Reviewed-by: František Lachman <[email protected]>
Reviewed-by: Laura Barcziová
softwarefactory-project-zuul bot added a commit to packit/packit that referenced this issue Jul 11, 2024
Add config syntax sugar for jobs with multiple triggers

With this change, it is possible to have a config like this:
downstream_package_name: B

jobs:
  - job: koji_build
    trigger: commit | koji_build
    sidetag_group: AB
    dependencies:
      - A
    dist_git_branches:
      - fedora-all
that is equivalent to this:
downstream_package_name: B

jobs:
  - job: koji_build
    trigger: commit
    sidetag_group: AB
    dependencies:
      - A
    dist_git_branches:
      - fedora-all

  - job: koji_build
    trigger: koji_build
    sidetag_group: AB
    dependencies:
      - A
    dist_git_branches:
      - fedora-all
Related to packit/packit-service#2378.
Merge after #2350.

Reviewed-by: František Lachman <[email protected]>
Reviewed-by: Laura Barcziová
softwarefactory-project-zuul bot added a commit that referenced this issue Jul 16, 2024
Implement `koji_build` trigger for `koji_build` job

Fixes #2378.
Merge after packit/packit#2349.
Merge after packit/packit#2350.

Reviewed-by: Nikola Forró
Reviewed-by: Laura Barcziová
@github-project-automation github-project-automation bot moved this from in-review to done in Packit Kanban Board Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/high This issue impacts multiple/lot of users. kind/feature New feature or a request for enhancement.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant