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

Gitpoller's commit index gets forced on all repositories, not just the tracked one. #6860

Open
TheOnlyJoey opened this issue Apr 25, 2023 · 2 comments
Labels

Comments

@TheOnlyJoey
Copy link

TheOnlyJoey commented Apr 25, 2023

I am getting unexpected behavior when using a setup such as:

c['change_source'].append(changes.GitPoller(
		'git@github.com:myorg/repo1.git',
		workdir='repo1', branch='develop',
		pollInterval=300))

gitrepo_1 = steps.Git(name="Git: Repository 1", repourl='git@github.com:myorg/repo1.git', method='clean', mode='full', branch='develop')
gitrepo_2 = steps.Git(name="Git: Repository 2", repourl='git@github.com:myorg/repo2.git', method='clean', mode='full', branch='develop',workdir="repo2")

This forces the second repo (which is not tracked by gitpoller) with an automatic checkout for the index of the gitpoller tracked repo, which causes: fatal: reference is not a tree: index.
It seems that buildbot enforces a git checkout -f index on every git step with the exact same index from the tracked commit when triggered by gitpoller.

This does not happen when I force build the worker, since it uses the correct commit for each repository individually. (Which is my expected behavior.)
Is there a way of working around this? is this a bug?
Thanks.

@TheOnlyJoey
Copy link
Author

Current workaround: Setting alwaysUseLatest as true on all Git steps that are not the GitPoller tracked repository circumvents this issue.

@p12tic p12tic added the bug label Jul 8, 2023
@tdesveaux
Copy link
Contributor

Tried to implement a fix for this here: https://github.com/tdesveaux/buildbot/tree/source/git/use-change-from-targetted-repository

Seeing the amount of changes required, maybe rather than considering this a bug, implementing a new GitClone step would be more appropriate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants