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

fix(core): fix "repo" scan mode for remote actions #5660

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

thsig
Copy link
Collaborator

@thsig thsig commented Jan 23, 2024

What this PR does / why we need it:

Before this fix, remote actions (i.e. actions with source.repository.url set, not sources declared at the project level) didn't work correctly when using the new repo git scanning mode.

Also set the default git scanning mode back to repo, since this bug (which we've now fixed) was the reason we reverted to subtree.

The error arose because the base path wasn't being set to the locally cloned path of the remote source's repo early enough in the resolution process. This led to the repo scanning logic using the action's config directory instead of the cloned source directory as the repo root (thus ignoring the sources).

We've added a unit test that verifies that the base path is being set correctly when the action graph is initialized.

Which issue(s) this PR fixes:

Fixes #5625.

@thsig thsig requested a review from edvald January 23, 2024 21:17
@thsig thsig force-pushed the remote-action-repo-scan-fix branch from 4bc6d1e to 76e5545 Compare January 24, 2024 10:10
Before this fix, remote actions (i.e. actions with
`source.repository.url` set, not sources declared at the project level)
didn't work correctly when using the new `repo` git scanning mode.

Also set the default git scanning mode back to `repo`, since this bug
(which we've now fixed) was the reason we reverted to `subtree`.

The error arose because the base path wasn't being set to the locally
cloned path of the remote source's repo early enough in the resolution
process. This led to the repo scanning logic using the action's config
directory instead of the cloned source directory as the repo root
(thus ignoring the sources).

We've added a unit test that verifies that the base path is being set
correctly when the action graph is initialized.
@thsig thsig force-pushed the remote-action-repo-scan-fix branch from 76e5545 to 3417b8c Compare January 24, 2024 10:41
Copy link
Collaborator

@vvagaytsev vvagaytsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for fixing this! 👍

@vvagaytsev vvagaytsev enabled auto-merge January 24, 2024 10:46
@vvagaytsev vvagaytsev added this pull request to the merge queue Jan 24, 2024
Merged via the queue into main with commit d38f1c5 Jan 24, 2024
46 checks passed
@vvagaytsev vvagaytsev deleted the remote-action-repo-scan-fix branch January 24, 2024 11:30
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.

0.13: [Bug]: Regression in git scan mode after 0.13.19 with remote repository URLs
2 participants