Closed j-rivero closed 11 months ago
As I first measure I think that we would need https://github.com/ignition-tooling/release-tools/pull/237 in order to get refspecs from branches (not only PRs) Edited: not the root cause of problem I think.
An hypothesis: that job has different parameters as input: SRC_BRANCH
but also sha1
which is hidden to the user when called manually.
sha1
parameter things are good: DEST_BRANCH
and other parameters are populated with GitHub values in the shell step before the script is called. sha1
variable which is empty at that moment and that could trigger the storm on new builds.The workaround at the moment is to always use the Github integration and avoid manual calls.
I'm seen the same problem today after using gazebo-ci-manual_any
.
I just cancelled a gazebo-ci-pr_any-homebrew-amd64
job since those jobs have been running excessively
https://build.osrfoundation.org/job/ignition_gazebo-ci-pr_any-ubuntu_auto-amd64/ is currently running excessively and I believe it's self-triggering
The problem is that when we call it manually: before the mapping happens in shell, the Git configuration tries to get sha1 variable which is empty at that moment and that could trigger the storm on new builds.
My knowledge of the groovy scripts is limited, but maybe we can guard against triggering builds for empty sha1 values? e.g.
- branch('${sha1}')
+ if (sha1?.trim()) {
+ branch('${sha1}')
+ }
I think a solution for this would be to create separate jobs that can be started manually and tell people not to manually trigger ci-pr_any
jobs anymore. I've opened #354 to track this proposed approach.
the following job is running away today: https://build.osrfoundation.org/job/ign_gui-pr-win/
the following job is running away today: https://build.osrfoundation.org/job/ign_gui-pr-win/
Looking into the root cause of it. There was an empty sha1
parameter, the git plugin trigger new builds to try to cover the multiple candidate revisions that it founds:
No credentials specified
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/ignitionrobotics/ign-gui.git # timeout=10
Fetching upstream changes from https://github.com/ignitionrobotics/ign-gui.git
> git --version # timeout=10
> git fetch --tags --progress -- https://github.com/ignitionrobotics/ign-gui.git +refs/pull/*:refs/remotes/origin/pr/* +refs/heads/*:refs/remotes/origin/* # timeout=10
Seen branch in repository origin/HiDPI_scaling
Seen branch in repository origin/add_config_extension
Seen branch in repository origin/add_depth_visualization
Seen branch in repository origin/adlarkin/cpplint_fixes
Seen branch in repository origin/ahcorde-patch-1
...
Seen branch in repository origin/update_dome_versions
Seen 246 remote branches
> git show-ref --tags -d # timeout=10
Multiple candidate revisions
Scheduling another build to catch up with ign_gui-pr-win
The triggering was not being a user but:
[Started by an SCM change](https://build.osrfoundation.org/job/ign_gui-pr-win/578/pollingLog/)
--
| Revision: 48d596c37c1421446fc39b5298a9a73323fc1223 origin/mingfei-sun/fix-name-inconsistency-in-hello_plugin-e-1559537202850
That branch has not been touched in the last two years and the ghrbp plugin and seems like there is a polling operation going on which is not configured in any way in DSL as far as I can tell.
I've notice a weird thing: the crontab
configuration in ghrbp plugin is being set to H/5 0 0 0 0 0
when open the configuration GUI of the job manually while DSL is setting the spec to empty. This weird/missconfigured behavior could be behind the polling operations somehow. I've discovered that together with spec
there is another xml
parameter, will try to fix it in a PR.
My knowledge of the groovy scripts is limited, but maybe we can guard against triggering builds for empty sha1 values? e.g.
Sorry forgot to comment: groovy scripts are used to create the Jenkins jobs, evaluating the sha1 in groovy DSL will run during job generation, not during the job execution. But the idea is good, I will implement something similar as a workaround.
Have not seen the problem in the last 3 years. Closing it, please reopen if it appears again,
There is a problem for jobs using integration with github pull requests once called manually that could potentially triggered hundreds of builds depending on the branch passed as parameter. Example: https://build.osrfoundation.org/view/main/view/CI%20ABI%20jobs/job/gazebo-abichecker-any_to_any-ubuntu_auto-amd64/230
Parameters
Log
This line seems the origin of the disaster