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

Cachi2 prefetching is making changes on a source #712

Open
eskultety opened this issue Oct 25, 2024 · 1 comment
Open

Cachi2 prefetching is making changes on a source #712

eskultety opened this issue Oct 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@eskultety
Copy link
Member

We only use a working copy of the input source repository for the Yarn backends. All other package manager backends work on top of the input source directly which may result in some operations we perform dirtying the repo which is completely undesirable.
Unlike #707 the global fix isn't as straight forward since the main issue only pops up with integration tests which also compare the contents of our .build-config.json file where we fill out incorrect path data for all project_files, using the temporary working copy path instead of the actual input repo.

We need to make sure that while all operations are performed on top of the working copy, any generated build-config data are tied to the original input repo path as the temporary working copy is discarded by the time both .build-config.json and SBOM are dumped to the disk.

Extends: #707

@eskultety
Copy link
Member Author

We'll need to pass around 2 paths in the request blob - one for the working copy for all operations and one for the original repository path for logging and formatting purposes.

brunoapimentel added a commit to brunoapimentel/cachi2 that referenced this issue Jan 20, 2025
To avoid unintended source code modifications, Cachi2 makes a copy of
the source directory when some package managers are used (currently,
it's being done just for yarn).

This creates a problem with project files, since the absolute path of
files now is pointing to the temporary working copy. The solution
introced by this patch reverts these paths back to the original source
dir path.

This is intended to be a quick fix, and should only be kept until we
solve #712¹.

¹containerbuildsystem#712

Signed-off-by: Bruno Pimentel <[email protected]>
brunoapimentel added a commit to brunoapimentel/cachi2 that referenced this issue Jan 20, 2025
To avoid unintended source code modifications, Cachi2 makes a copy of
the source directory when some package managers are used (currently,
it's being done just for yarn).

This creates a problem with project files, since the absolute path of
files now is pointing to the temporary working copy. The solution
introced by this patch reverts these paths back to the original source
dir path.

This is intended to be a quick fix, and should only be kept until we
solve #712¹.

¹containerbuildsystem#712

Signed-off-by: Bruno Pimentel <[email protected]>
brunoapimentel added a commit to brunoapimentel/cachi2 that referenced this issue Jan 20, 2025
To avoid unintended source code modifications, Cachi2 makes a copy of
the source directory when some package managers are used (currently,
it's being done just for yarn).

This creates a problem with project files, since the absolute path of
files now is pointing to the temporary working copy. The solution
introced by this patch reverts these paths back to the original source
dir path.

This is intended to be a quick fix, and should only be kept until we
solve #712¹.

¹containerbuildsystem#712

Signed-off-by: Bruno Pimentel <[email protected]>
brunoapimentel added a commit to brunoapimentel/cachi2 that referenced this issue Jan 21, 2025
To avoid unintended source code modifications, Cachi2 makes a copy of
the source directory when some package managers are used (currently,
it's being done just for yarn).

This creates a problem with project files, since the absolute path of
files now is pointing to the temporary working copy. The solution
introced by this patch reverts these paths back to the original source
dir path.

This is intended to be a quick fix, and should only be kept until we
solve containerbuildsystem#712.

Signed-off-by: Bruno Pimentel <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Jan 21, 2025
To avoid unintended source code modifications, Cachi2 makes a copy of
the source directory when some package managers are used (currently,
it's being done just for yarn).

This creates a problem with project files, since the absolute path of
files now is pointing to the temporary working copy. The solution
introced by this patch reverts these paths back to the original source
dir path.

This is intended to be a quick fix, and should only be kept until we
solve #712.

Signed-off-by: Bruno Pimentel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant