-
Notifications
You must be signed in to change notification settings - Fork 71
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
PythonMutator: Fix relative path error #2253
PythonMutator: Fix relative path error #2253
Conversation
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.
Can you elaborate on what was broken and/or how it manifested?
@@ -120,7 +126,7 @@ func TestPythonMutator_loadResources(t *testing.T) { | |||
|
|||
assert.Equal(t, []dyn.Location{ | |||
{ | |||
File: "src/examples/job1.py", | |||
File: pathlib.Join(rootPath, "src/examples/job1.py"), |
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.
I suspect you need to use filepath
here as well, or it won't test equal on Windows.
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.
👍 , I keep forgetting which one is which
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.
The version referenced in the PR summary doesn't exist, can you update?
@@ -166,11 +166,11 @@ func TestLoadOutput(t *testing.T) { | |||
} | |||
|
|||
func TestParsePythonLocations(t *testing.T) { | |||
expected := dyn.Location{File: "foo.py", Line: 1, Column: 2} | |||
expected := dyn.Location{File: "/tmp/my_project/foo.py", Line: 1, Column: 2} |
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.
You can run filepath.Clean
to make is platform native.
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
@pietern I've updated comments for relative vs. absolute paths and added more tests covering both cases |
Changes
Fix relative path errors in the Python mutator that was failing during deployment since v0.239.1.
Before that:
As a result, the bundle was deployed, but the deployment state wasn't updated.
Tests
Unit tests, adding acceptance tests in #2254