Skip to content

MDBF-1202: Prefer pull_request over push for same-commit tarball builds#956

Merged
RazvanLiviuVarzaru merged 1 commit into
MariaDB:devfrom
RazvanLiviuVarzaru:duplicate-builds
Apr 21, 2026
Merged

MDBF-1202: Prefer pull_request over push for same-commit tarball builds#956
RazvanLiviuVarzaru merged 1 commit into
MariaDB:devfrom
RazvanLiviuVarzaru:duplicate-builds

Conversation

@RazvanLiviuVarzaru
Copy link
Copy Markdown
Collaborator

Buildbot treats push and pull_request events independently. The scheduler can trigger tarball-docker for both event types, while push events are only considered when the upstream branch matches a configured pattern such as bb-* or st-*.

When a pull request is opened from a branch in the upstream repository, the source branch may also match the push-event filter. In that case, two tarball builds can be scheduled for the same commit: one from the push event and one from the pull_request event.

This patch cancels the tarball triggered by the push event and keeps only the pull_request build, since that is the one relevant for branch protection and GitHub Checks.

Note that *-pkgtest builds cannot be run meaningfully from both a pull request and the corresponding upstream branch at the same time. Any pkgtest should therefore be completed before opening the pull request.

@RazvanLiviuVarzaru RazvanLiviuVarzaru changed the title MDBF-XXXX: Prefer pull_request over push for same-commit tarball builds MDBF-1202: Prefer pull_request over push for same-commit tarball builds Apr 20, 2026
@RazvanLiviuVarzaru
Copy link
Copy Markdown
Collaborator Author

Example:
Double event:
image

Both tarballs started:
image

From the Pull Request perspective:
image

And https://buildbot.dev.mariadb.org/#/builders/110/builds/294
was cancelled by https://buildbot.dev.mariadb.org/#/builders/110/builds/295

@fauust
Copy link
Copy Markdown
Collaborator

fauust commented Apr 20, 2026

LG but I prefer leaving the review to Daniel (unless you want to test this today, then ping me).

@RazvanLiviuVarzaru
Copy link
Copy Markdown
Collaborator Author

LG but I prefer leaving the review to Daniel (unless you want to test this today, then ping me).

Already tested it on dev. See my first comment.

Copy link
Copy Markdown
Member

@grooverdan grooverdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Might just need to extend to include preview brances.

Comment thread utils.py Outdated
Buildbot treats push and pull_request events independently. The scheduler
can trigger tarball-docker for both event types, while push events are only
considered when the upstream branch matches a configured pattern such as
bb-* or st-*.

When a pull request is opened from a branch in the upstream repository, the
source branch may also match the push-event filter. In that case, two
tarball builds can be scheduled for the same commit: one from the push
event and one from the pull_request event.

This patch cancels the tarball triggered by the push event and keeps only
the pull_request build, since that is the one relevant for branch
protection and GitHub Checks.

Note that *-pkgtest builds cannot be run meaningfully from both a pull
request and the corresponding upstream branch at the same time. Any pkgtest
should therefore be completed before opening the pull request.
@grooverdan
Copy link
Copy Markdown
Member

🛩️ 👍

Good to merge!

@RazvanLiviuVarzaru RazvanLiviuVarzaru merged commit 7c11db3 into MariaDB:dev Apr 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants