git-plugin icon indicating copy to clipboard operation
git-plugin copied to clipboard

Use poll env when checking for ls-remote branches.

Open timbrown5 opened this issue 2 years ago • 2 comments

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

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

Types of changes

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

timbrown5 avatar Sep 26 '23 15:09 timbrown5

Is there any update on this?

timbrown5 avatar Oct 11 '23 09:10 timbrown5

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 avatar Nov 10 '23 04:11 MarkEWaite