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

Build: use is_active method to know if the build should be skipped #8179

Merged
merged 2 commits into from
May 18, 2021

Conversation

humitos
Copy link
Member

@humitos humitos commented May 13, 2021

Currently we are using only project.skip to know if the build for this
particular project has to be skipped after the task was triggered. However, if
the if the project belongs to an organization and the organization is disabled
those builds already queued will be built.

This commit uses is_active for project.skip field in the API response, that
takes care of this case.

This helps us if we found that an organization already triggered many builds
and we need to cancel all of them. With this change, just by doing
organization.disable=True will make kill them all at built time instead of
processing them.

Currently we are using only `project.skip` to know if the build for this
particular project has to be skipped after the task was triggered. However, if
the if the project belongs to an organization and the organization is disabled
those builds already queued will be built.

This commit uses `is_active` for `project.skip` field in the API response, that
takes care of this case.

This helps us if we found that an organization _already_ triggered many builds
and we need to cancel all of them. With this change, just by doing
`organization.disable=True` will make kill them all at built time instead of
processing them.
@humitos humitos merged commit 8909c2a into master May 18, 2021
@humitos humitos deleted the humitos/use-is-active-for-skip branch May 18, 2021 07:11
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