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

Allow disabling the search for tags fallback #37

Closed
wants to merge 1 commit into from

Conversation

JAVGan
Copy link
Contributor

@JAVGan JAVGan commented Nov 7, 2024

When searching for the image existence, by defaut, the library first search it from its name and if not found by the tags. However, there are certain situations which the latter search (tags) may not be executed.

This commit preserves the default experience of the library while allowing to disable the tags search fallback wheenver the new publishing metadata attribute search_tags is set to False.

Refers to SPSTRAT-451

When searching for the image existence, by defaut, the library first
search it from its name and if not found by the tags. However, there are
certain situations which the latter search (tags) may not be executed.

This commit preserves the default experience of the library while
allowing to disable the tags search fallback wheenver the new publishing
metadata attribute `search_tags` is set to `False`.

Refers to SPSTRAT-451
@JAVGan
Copy link
Contributor Author

JAVGan commented Nov 7, 2024

@lslebodn @jajreidy @rohanpm PTAL

@rohanpm rohanpm self-requested a review November 8, 2024 02:16
Copy link
Member

@rohanpm rohanpm left a comment

Choose a reason for hiding this comment

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

I'm a little uneasy with this change. Ultimately I'll release it if you want, as at the end of the day it's just taking a feature you've added and making it optional, and I wouldn't have objected if it had been implemented that way in the first place.

However this does feel a bit like there's a flaw in the way the data is being managed, and rather than addressing it you're adding a flag which can be optionally used to work around the problem.

No explanation is given of the scenarios where a caller should pass search_tags=True and where they should pass search_tags=False. Can you easily explain when the caller might want to do one or the other? Are you sure there's even a way to programmatically make that decision?

In other words, when you said we can add the option "False" in our tooling for this particular case, what exactly is "this particular case"? And if it's OK to disable searching by tag in that case, why isn't it OK to disable it in all cases - i.e. why is the feature needed at all.

@JAVGan
Copy link
Contributor Author

JAVGan commented Nov 8, 2024

@rohanpm The search for tags feature is important for the Stratosphere workflow and I initially thought that I could avoid it for the community workflow in order to solve a bug, but actually that won't be necessary.

I agree this change is not ideal for the upstream library so I'm going to close it.

I've talked with Lukas and we can pass an additional tag to the community workflow to avoid the issue, but the problem is that we desire to avoid adding it to the S3 object. I'll open a new MR to allow adding custom tags just for snapshots/amis and the problem will be solved, without having to use this PR's alternative which seems to be ugly.

Thanks for the review and let's keep the search for tags as it is.

@JAVGan JAVGan closed this Nov 8, 2024
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