Skip to content

Comment out _find_image_pull_secrets_values_paths().#168

Open
Cyclam wants to merge 2 commits intomainfrom
achurchard/remove-apparently-unnecessary-method
Open

Comment out _find_image_pull_secrets_values_paths().#168
Cyclam wants to merge 2 commits intomainfrom
achurchard/remove-apparently-unnecessary-method

Conversation

@Cyclam
Copy link
Copy Markdown
Collaborator

@Cyclam Cyclam commented Mar 28, 2024

I cannot see that this method actually does anything. I commented it out and haven't seen any problems in the various tests I've run, though these haven't been comprehensive.

For now, I'm just leaving as commented out, so that if it turns out it is needed, it's easier to spot what's gone wrong, and fix.

If we've still not hit problems after some soak time, we should delete the code.

@Cyclam Cyclam requested a review from sunnycarter as a code owner March 28, 2024 12:07
@jordlay
Copy link
Copy Markdown
Collaborator

jordlay commented Apr 3, 2024

Do not merge until webhooks story is done (not the current one, new one that will be raised and link here). We do need this, spoke to Jacob

@@ -242,9 +242,12 @@ def _generate_artifact_profile(self) -> AzureArcKubernetesArtifactProfile:
"""
logger.debug("Generating artifact profile for Helm chart input.")
image_pull_secrets_values_paths: Set[str] = set()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is what the function updates according to Jacob. So we cannot remove this code

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for checking Jordan. Can we make this clearer in the code? Perhaps either rename the matches argument image_pull_secrets_values_paths, or doc it much more clearly?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I had a thought on how to refactor this so we have a clear return value rather than the hard to read modification of a passed by reference variable.

Wrap the current recursive method in an outer method that sets up the initial variable, and returns a clear final value for image_pull_secrets_values_paths.

Expect it can wait till I'm back.

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.

2 participants