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

Improve registry validation #1429

Merged
merged 2 commits into from
Aug 1, 2024
Merged

Improve registry validation #1429

merged 2 commits into from
Aug 1, 2024

Conversation

Tansito
Copy link
Member

@Tansito Tansito commented Aug 1, 2024

Summary

Fix #1428

Let's simplify the logic of the registry validation to allow that if a registry is not specified the provider can use any registry that it wants. Specifically useful for development.

@Tansito Tansito requested review from akihikokuroda, IceKhan13 and psschwei and removed request for akihikokuroda August 1, 2024 18:31
)
if not provider_instance.registry or not image.startswith(
raise ValidationError(f"{provider} is not valid provider.")
if provider_instance.registry and not image.startswith(
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure here that provider_instance always has registry attribute?

Copy link
Member Author

Choose a reason for hiding this comment

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

you mean if the registry from provider_instance can be None? The answer is yes. What I'm trying to do here is that if it's None it's ok, we accept any value in the image.

Copy link
Member Author

Choose a reason for hiding this comment

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

Until now we were forcing it to have a value but there are situations where it can has no sense like in local development.

Copy link
Collaborator

@akihikokuroda akihikokuroda left a comment

Choose a reason for hiding this comment

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

LGTM

@Tansito Tansito requested a review from IceKhan13 August 1, 2024 19:30
@Tansito Tansito merged commit 65cda73 into main Aug 1, 2024
10 checks passed
@Tansito Tansito deleted the fix-registry-validation branch August 1, 2024 20:13
Tansito added a commit that referenced this pull request Aug 1, 2024
Tansito added a commit that referenced this pull request Aug 1, 2024
* Applied #1429 in 0.14

* Update 0.14 patch version

* Updated helm lock
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.

Allow upload functions without registry in development
3 participants