-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): versioning fix for remote sources (#5735)
<!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first pull request, please read our contributor guidelines in the https://github.com/garden-io/garden/blob/main/CONTRIBUTING.md file. 2. Please label this pull request according to what type of issue you are addressing (see "What type of PR is this?" below) 3. Ensure you have added or run the appropriate tests for your PR. 4. If the PR is unfinished, add `WIP:` at the beginning of the title or use the GitHub Draft PR feature. 5. Please add at least two reviewers to the PR. Currently active maintainers are: @edvald, @thsig, @eysi09, @shumailxyz, @stefreak, @TimBeyer, @mkhq, and @vvagaytsev. --> **What this PR does / why we need it**: Before this fix, we were including the relative path to a file from project root in the string to be hashed when calculating versions. This was problematic when linking remote sources, since the chosen name and path of the locally linked repo would be factored into the version (resulting in unwanted cache misses). This was fixed by using the relative path from the directory containing the file's parent config. For example, an action's directory should be able to be moved around or renamed without it affecting the version of that action. **Which issue(s) this PR fixes**: Fixes #5501.
- Loading branch information
Showing
18 changed files
with
90 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...jects/include-exclude/module-a/garden.yml → ...ojects/include-exclude/build-a/garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
kind: Module | ||
name: module-a | ||
kind: Build | ||
name: a | ||
type: test | ||
include: ["yes.txt", "somedir/*"] | ||
exclude: ["somedir/nope.txt"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...jects/include-exclude/module-b/garden.yml → ...ojects/include-exclude/build-b/garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
kind: Module | ||
name: module-b | ||
kind: Build | ||
name: b | ||
type: test | ||
# test both dir name and relative path | ||
exclude: ["nope.*", "./dir1", "dir2"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...jects/include-exclude/module-c/garden.yml → ...ojects/include-exclude/build-c/garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
kind: Module | ||
name: module-c | ||
kind: Build | ||
name: c | ||
type: test | ||
include: ["*.txt"] | ||
exclude: ["nope.*"] |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters