-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fixed wrong root identification in module detection #179
Merged
eranturgeman
merged 9 commits into
jfrog:dev
from
eranturgeman:fix-getExistingRootDir-incorrect-root-identification
Sep 16, 2024
Merged
Fixed wrong root identification in module detection #179
eranturgeman
merged 9 commits into
jfrog:dev
from
eranturgeman:fix-getExistingRootDir-incorrect-root-identification
Sep 16, 2024
Conversation
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
eranturgeman
temporarily deployed
to
frogbot
September 15, 2024 12:40
— with
GitHub Actions
Inactive
eranturgeman
added
bug
Something isn't working
safe to test
Approve running integration tests on a pull request
labels
Sep 15, 2024
github-actions
bot
removed
the
safe to test
Approve running integration tests on a pull request
label
Sep 15, 2024
eranturgeman
changed the title
Fixed wrong root identification in getExistingRootDir the checked wd is prefix to root but not a path prefix
Fixed wrong root identification in module detection
Sep 15, 2024
eranturgeman
added
the
safe to test
Approve running integration tests on a pull request
label
Sep 15, 2024
github-actions
bot
removed
the
safe to test
Approve running integration tests on a pull request
label
Sep 15, 2024
attiasas
reviewed
Sep 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…o fix-getExistingRootDir-incorrect-root-identification
attiasas
approved these changes
Sep 15, 2024
eranturgeman
temporarily deployed
to
frogbot
September 15, 2024 14:32
— with
GitHub Actions
Inactive
eranturgeman
added
the
safe to test
Approve running integration tests on a pull request
label
Sep 15, 2024
github-actions
bot
removed
the
safe to test
Approve running integration tests on a pull request
label
Sep 15, 2024
eranturgeman
temporarily deployed
to
frogbot
September 15, 2024 15:28
— with
GitHub Actions
Inactive
eranturgeman
added
the
safe to test
Approve running integration tests on a pull request
label
Sep 15, 2024
github-actions
bot
removed
the
safe to test
Approve running integration tests on a pull request
label
Sep 15, 2024
6 tasks
…o fix-getExistingRootDir-incorrect-root-identification # Conflicts: # utils/techutils/techutils_test.go
eranturgeman
had a problem deploying
to
frogbot
September 16, 2024 08:08
— with
GitHub Actions
Failure
eranturgeman
added
the
safe to test
Approve running integration tests on a pull request
label
Sep 16, 2024
github-actions
bot
removed
the
safe to test
Approve running integration tests on a pull request
label
Sep 16, 2024
eranturgeman
temporarily deployed
to
frogbot
September 16, 2024 09:26
— with
GitHub Actions
Inactive
eranturgeman
added
the
safe to test
Approve running integration tests on a pull request
label
Sep 16, 2024
github-actions
bot
removed
the
safe to test
Approve running integration tests on a pull request
label
Sep 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dev
branch.go vet ./...
.go fmt ./...
.In getExistingRootDir we find the highest common ancestor for every descriptor, and refer this descriptor to this common ancestor rather then its original working dir.
As part of the process we check under some condition, if the current wd is a prefix to the current root, and if so - wd is the new root.
We encountered a wrong identification in the following scenario: if wd is indeed a prefix to root but not a path prefix, we wrongfully take wd as the new root.
Example:
root = "dir1/dir2"
wd = "dir"
wd is indeed a prefix to root (by characters) but is not actually a path prefix since the path prefix to root is "dir1" and not "dir"
This PR adds fix for this issue so we identify if wd is a path prefix to the root
Also, this PR added a test case to TestGetTechInformationFromWorkingDir, that have failed due to the build, and is now added after the fix