-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 v0 ref resolution #7415
fix v0 ref resolution #7415
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Fixes | ||
body: Fix v0 ref resolution | ||
time: 2023-04-19T22:09:10.155137-04:00 | ||
custom: | ||
Author: MichelleArk | ||
Issue: "7408" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -338,8 +338,8 @@ def MockNode(package, name, resource_type=None, **kwargs): | |
search_name = name if version is None else f"{name}.v{version}" | ||
unique_id = ( | ||
f"{str(resource_type)}.{package}.{name}" | ||
if version is None | ||
else f"{str(resource_type)}.{package}.{name}.v{version}" | ||
# if version is None | ||
# else f"{str(resource_type)}.{package}.{name}.v{version}" | ||
Comment on lines
+341
to
+342
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this PR is already merged, but did we mean to leave these commented? If so, maybe we want to delete them altogether in a follow-up PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh no! I did mean to just rip those out. I'll clean it up in a follow-up PR |
||
) | ||
node = mock.MagicMock( | ||
__class__=cls, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ | |
- name: versioned | ||
latest_version: 2 | ||
versions: | ||
- v: 0 | ||
- v: 1 | ||
- v: 2 | ||
- v: 3 | ||
|
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.
Unfortunately not possible to test on the model nodes directly (e.g.
models[0]
) because these are MagicMock objects andparser.parse_file
callsnode.patch
under the hood, which mocks the actual patching functionality. @gshank - We'd brought up moving thenode.patch
method to the PatchParser itself which would make the parsers more testable too - I'm working on opening a tech debt issue for it.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.
Yes, another good reason to do it.