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

Use poll env when checking for ls-remote branches. #1511

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

timbrown5
Copy link

@timbrown5 timbrown5 commented Sep 26, 2023

The core issue is that params are not resolved until the start of the build (i.e. not valid in the Polling context).

The git ls-remote code-path uses an empty env when checking for branches - which means params in a branch spec don't get resolved.
I have updated the code to use the pollEnv variable when evaluating these params - as these .

Some additional background - we have tried the workaround of setting 'Force workspace when polling'. This seems to fix the issue for permanent nodes, but we use a lot of EC2 nodes where it breaks once the node that last ran a job gets culled.

Checklist

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • Documentation in README has been updated as necessary
  • Online help has been added and reviewed for any new or modified fields
  • I have interactively tested my changes
  • Any dependent changes have been merged and published in upstream modules (like git-client-plugin)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

@timbrown5 timbrown5 requested a review from a team as a code owner September 26, 2023 15:41
@timbrown5
Copy link
Author

Is there any update on this?

@MarkEWaite
Copy link
Contributor

Is there any update on this?

Sorry for the delay @timbrown5 . I'll try to review it within the next 2-4 weeks. Changing the polling process has a number of areas where I need to be especially to not change (regress) existing behavior.

@MarkEWaite MarkEWaite added the bug Incorrect or flawed behavior label Nov 23, 2023
@github-actions github-actions bot added the tests Automated test addition or improvement label Dec 29, 2023
@MarkEWaite MarkEWaite removed the tests Automated test addition or improvement label Apr 7, 2024
@github-actions github-actions bot added the tests Automated test addition or improvement label Jul 29, 2024
MarkEWaite added a commit to MarkEWaite/docker-lfs that referenced this pull request Jul 29, 2024
Incremental that includes:

* Use poll env when checking for ls-remote branches
  jenkinsci/git-plugin#1511

* Optionally report the most recent commit as the changelog of a new build
  jenkinsci/git-plugin#1565
  https://issues.jenkins.io/browse/JENKINS-4162
  https://issues.jenkins.io/browse/JENKINS-14138
  https://issues.jenkins.io/browse/JENKINS-26354
  https://issues.jenkins.io/browse/JENKINS-68030

* Generate and revoke access tokens with standard UI components
  jenkinsci/git-plugin#1597

* Do not assume HttpResponse is a functional interface
  jenkinsci/git-plugin#1590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or flawed behavior tests Automated test addition or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants