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 issue with relative paths in Container.push_path #949

Merged
merged 7 commits into from
Jun 15, 2023

Conversation

yanksyoon
Copy link
Contributor

@yanksyoon yanksyoon commented Jun 12, 2023

This PR fixes the error caused by duplicate paths in container.push_path().

Please see #948 .

QA steps

Please replace with how we can verify that the change works.

QA steps here
Running `tox`

Documentation changes

No changes required.

Bug reference

Fixes #948

Changelog

  • Fixes bug in container.push_path, which caused FileNotFoundError when pushing paths to the container.

@benhoyt
Copy link
Collaborator

benhoyt commented Jun 12, 2023

This looks like a good find, thanks! Presumably we don't have a test of this code path -- is it possible to add one?

@yanksyoon
Copy link
Contributor Author

I've added another test function, that is similar to the existing one. The difference being that it's changing working directory before each tests so that the relative paths are "truly" relative :). Please let me know if further changes are required!

Thank you!

ops/model.py Show resolved Hide resolved
test/test_helpers.py Outdated Show resolved Hide resolved
test/test_model.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Excellent, tests look much simpler now -- thanks.

@benhoyt benhoyt changed the title fix: duplicate path Fix issue with relative paths in Container.push_path Jun 15, 2023
@benhoyt benhoyt merged commit cbaec52 into canonical:main Jun 15, 2023
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.

Container.push_path duplicates src_path
2 participants