-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(gitlab): Modify GitLab CI resource ids #4647
fix(gitlab): Modify GitLab CI resource ids #4647
Conversation
|
||
def generate_resource_key_recursive(conf: dict[str, Any] | list[str] | str, key: str, start_line: int, | ||
end_line: int) -> str: | ||
return _generate_resource_key_recursive(conf, key, start_line, end_line, set(), 0) |
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.
Instead of creating another method you can just set the last two arguments as optional params in generate_resource_key_recursive and set their default value to set() and zero.
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.
sounds good, but scanned_image_blocks
should be None
as default, otherwise you have a mutable object as default, which will result in some surprises, not good ones 😄
Seems the test results of test_runner_image_resources should also be changed somehow, since it currently also produces same resource for several images 😄 |
That's a limitation we have since strings do not have the start line and end line fields. |
* gitlab ci resource ids * lint --------- Co-authored-by: Eliran Turgeman <elturgeman@paloaltonetworks.com>
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
New/Edited policies (Delete if not relevant)
Description
Include a description of what makes it a violation and any relevant external links.
Fix
How does someone fix the issue in code and/or in runtime?
Checklist: