Skip to content

Remove duplicate Jenkins push trigger - #6166

Open
JP0P wants to merge 1 commit into
developfrom
codex/remove-duplicate-jenkins-trigger
Open

Remove duplicate Jenkins push trigger#6166
JP0P wants to merge 1 commit into
developfrom
codex/remove-duplicate-jenkins-trigger

Conversation

@JP0P

@JP0P JP0P commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove the redundant githubPush() trigger from the multibranch Jenkins pipeline.

Why

GitHub Branch Source already handles repository push events for this multibranch pipeline. The declarative githubPush() block persists a second, generic GitHub push trigger on each child job, adding a repository-wide SCM-polling path alongside Branch Source.

This is a known source of build amplification. Builds #160 and #161 both built commit 7795512, and Jenkins attempted to queue another testMaestro build while #166 was running. Historical incidents with more than two duplicates may include additional webhook, indexing, replay, or queue causes; this PR removes one redundant trigger path but does not claim comprehensive deduplication.

disableConcurrentBuilds() remains enabled. It prevents simultaneous execution of the same child job, but duplicate requests may still remain queued.

Controlled reproduction

We reproduced this scheduling path in an isolated edge-tester multibranch probe before applying the equivalent trigger removal:

  • Probe builds Fix android build #7 and Close side menu when pressing settings #8 ran the exact same commit (39f7dd1a). Fix android build #7 had both BranchEventCause and GitHubPushCause; Close side menu when pressing settings #8 had only GitHubPushCause.
  • While Fix android build #7 was running, an unrelated push to the same repository caused the generic GitHub trigger to poll the probe. Because the current revision had not completed yet, polling reported Changes found and queued Close side menu when pressing settings #8. disableConcurrentBuilds() delayed the duplicate but did not deduplicate it.
  • After removing only githubPush(), two separate probe revisions each built exactly once. Three unrelated repository pushes and two same-revision webhook replays produced no generic polling, queued duplicate, or additional build.
  • A full multibranch repository scan then examined all 42 branches, reported no changes for eligible pipelines, and queued no builds. This also makes periodic indexing unlikely to be the cause of the historical same-commit pairs we observed.

This is controlled before/after evidence that the redundant generic trigger can create the observed duplicates and that removing it prevents that scheduling path. It does not rule out every possible future source of duplicate requests.

Risk

Low. The final diff only removes three lines of Jenkins trigger configuration.

  • GitHub Branch Source continues handling push builds.
  • Branch-index triggering and the periodic multibranch scan remain available.
  • Manual builds and disableConcurrentBuilds() remain unchanged.
  • No application, build, artifact, test, deployment, or retry logic changes.

Both trigger mechanisms use Jenkins' /github-webhook/ endpoint, so githubPush() is not an independent delivery fallback. Any duplicate or missing webhook-delivery investigation is separate from removing this redundant scheduling path.

Validation

  • After the updated Jenkinsfile ran, the child job no longer persisted GitHubPushTrigger.
  • The duplicate seen during the transition occurred while the child still had its previously persisted trigger configuration.
  • The current testMaestro job configuration contains no generic GitHub push trigger.
  • A separate edge-tester rollout removed the same generic trigger while retaining immediate, targeted GitHub-triggered builds through Branch Source.
  • CI and security checks pass.

Children that have not executed the updated Jenkinsfile may retain the old persisted trigger, and replaying a pre-change build can restore it.

@JP0P
JP0P marked this pull request as draft August 19, 2026 02:27
@JP0P
JP0P force-pushed the codex/remove-duplicate-jenkins-trigger branch from b7f1ba3 to 5cc6634 Compare August 19, 2026 21:07
@JP0P
JP0P marked this pull request as ready for review August 19, 2026 21:07
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.

1 participant