8000 GH-419: Pass unstable builders also into GitHubPrScheduler by itamaro · Pull Request #434 · python/buildmaster-config · GitHub
[go: up one dir, main page]

Skip to content

GH-419: Pass unstable builders also into GitHubPrScheduler #434

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

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

itamaro
Copy link
Contributor
@itamaro itamaro commented Oct 30, 2023

This is needed to support triggering unstable builders using !buildbot PR comment

Pass GitHubPrScheduler a set of "known stable builders" to it can avoid triggering unstable builders unless it's a comment-based trigger

This is needed to support triggering unstable builders using `!buildbot` PR comment
Add the stability to the builder name so we can limit label-based triggering only to stable builders
@itamaro itamaro requested review from ambv and zware October 30, 2023 22:14
stable_pull_request_builders.append(buildername)

else:
unstable_pull_request_builders.append(buildername)

if any(pattern in buildername for pattern in NO_NOTIFICATION):
continue
Copy link
Member

Choose a reason for hiding this comment

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

I think if you axe this check, we'd land about where we want to be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried swapping the order of this check with adding the builder name to the list - that passes the config check!

it would work to axe it as well, but that would change the behavior for builders that match the patterns in NO_NOTIFICATION, and I don't know if that's a desirable change (I'm assuming there's a reason for that).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

with either change (swap order or axe it), I think either approach would work - do you have a preference which one to take?

  1. add "stability" to the builder name and use it in the regex; or
  2. the current state of this PR - use an explicit set of "stable builders" when not doing comment-based triggering

Copy link
Member

Choose a reason for hiding this comment

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

I'd say 2.

I think we can do away with NO_NOTIFICATION. The Alpine and UBSan builders are unstable, so should be left out of label builds anyway, and we no longer have a Cygwin builder. I could see value in being able to manually trigger the Alpine or UBSan builders via a comment.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, scratch that: we can't quite do away with NO_NOTIFICATION, but we can drop the check on it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I dropped the check, I think this should be good to go!

@itamaro itamaro force-pushed the pr-testing-with-unstable branch from 694b7e9 to 25f7fe1 Compare October 30, 2023 23:01
builder_name
for builder_name in builder_names
if builder_name in self.stable_builder_names
]
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to create the 2 build name lists only once in the constructor, rather than having to do it at each GitHub event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not in the general case - you can see in line 26 the initial value of builder_names can come from the kwargs of the addBuildsetForChanges call, so we can't assume anything in the constructor.

I am not an expert on buildbot internals, but I don't actually see where addBuildsetForChanges can be called with a builderNames kwarg. if we only ever use self.builderNames in practice, we can definitely pre-construct the list in the constructor.

I can make this change now, or perhaps add logging so we can see whether it is ever called with a builderNames kwarg.

Copy link
Member

Choose a reason for hiding this comment

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

Oh ok, I was wrong, ignore my comment.

@vstinner vstinner merged commit e14b0cd into python:main Oct 31, 2023
@vstinner
Copy link
Member

I merged your PR, thanks @itamaro.

itamaro added a commit to itamaro/buildmaster-config that referenced this pull request Oct 31, 2023
pythonGH-434 attempted to support triggering unstable builder with comment-based triggering
It had two flaws that are fixed in this follow-up PR:
1. Needed to unpack the `event` property
2. If we are left with no builders after filtering, need to avoid the super() call (otherwise we end up triggering ALL builders O_O)
vstinner pushed a commit that referenced this pull request Nov 1, 2023
GH-434 attempted to support triggering unstable builder with comment-based triggering
It had two flaws that are fixed in this follow-up PR:
1. Needed to unpack the `event` property
2. If we are left with no builders after filtering, need to avoid the super() call (otherwise we end up triggering ALL builders O_O)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0