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

Add support for cancelation of builds with snapshot dependencies #78

Conversation

arnaudmathias
Copy link
Contributor

In the current state, the plugin assumes that if a target build in the queue, it will always run the latest revision and will not try to cancel it.

This is not always the case for builds with snapshot dependency.
Based on the teamcity configuration, a snapshot dependencies can enforce the revision of a queued build if one of the dependencies has already started

For example:
Triggering a build A with a snapshot dependency B configured with "Enforce revisions synchronization".
As soon as B leave the queue, it will enforce the revision on the build A, if the VCS root is the same for both builds

The plugin now will ensure the revision of the target build is correct before skipping it and will cancel any non reused dependencies.

@jmecosta
Copy link
Collaborator

jmecosta commented Oct 8, 2021

thanks for this, quick question. now by default for each push for example on a Pull request the hook will send several more rest requests to teamcity to find the dependencies right? if this is the case, we have some network constraints and our infra will start bothering us why we are sending more http requests from the application... Can this be a opt in option? We don't really use dependencies so the extra requests just slows us down

@arnaudmathias
Copy link
Contributor Author

If the target build doesn't have any dependencies, it will be one more request to TeamCity.
But I understand the network constraints, I will make the cancel of dependencies an opt-in option

In the current state, the plugin assumes that if a target build in the queue
it will always run the latest revision and will not try to cancel it.

This is not always the case for builds with snapshot dependency. Based
on the teamcity configuration, a snapshot dependencies can enforce the
revision of a queued build if one of the dependencies has already started

For example:
Triggering a build A with a snapshot dependency B configured with "Enforce revisions synchronization".
As soon as B leave the queue, it will enforce the revision on the build A, if the VCS root is the same for both builds

The plugin now will ensure the revision of the target build is correct
before skipping it and will with an opt-in option cancel any non reused dependencies.
@jmecosta jmecosta merged commit 24b15e8 into TrimbleSolutionsCorporation:master Oct 10, 2021
@jmecosta
Copy link
Collaborator

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.

None yet

2 participants