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

fix(*): proxyTemplate validation error #3937

Merged

Conversation

marcoferrer
Copy link
Contributor

@marcoferrer marcoferrer commented Feb 26, 2022

Summary

This PR resolves #3935

Not sure if tests are needed for this change or what would be the best way of going about adding them

Changelog: fix(proxytemplate): avoid validation error

@marcoferrer marcoferrer requested a review from a team as a code owner February 26, 2022 05:50
@marcoferrer marcoferrer force-pushed the bugfix-invalid-proxy-template-profile branch from 77c0749 to 4ea5227 Compare February 26, 2022 05:56
@jakubdyszkiewicz
Copy link
Contributor

Hey, @marcoferrer thanks for the fix! It looks good, I hope in the future (maybe with #3820 ) we can have a better approach than global variables + init().

You are right that we just recently added "dynamic" profile called Gateway.

When it comes to a test, you could add a use case in proxytemplate_validator_test.go with an example from the issue you reported. We just need to import gateway profile in BeforeEach/BeforeSuite

generator.RegisterProfile(ProfileGatewayProxy, nil) // value does not matter I think

or you could write E2E test for it here https://github.com/kumahq/kuma/blob/master/test/e2e/proxytemplate/proxy_template_universal.go or there https://github.com/kumahq/kuma/blob/master/test/e2e/gateway/gateway_universal.go

@michaelbeaumont michaelbeaumont changed the title bug fix for allowed proxy template imports fix: ProxyTemplate validation error Feb 28, 2022
@lahabana lahabana changed the title fix: ProxyTemplate validation error fix: proxyTemplate validation error Mar 2, 2022
@michaelbeaumont michaelbeaumont self-assigned this Mar 31, 2022
@michaelbeaumont michaelbeaumont force-pushed the bugfix-invalid-proxy-template-profile branch from 4ea5227 to 5a84e79 Compare March 31, 2022 15:59
@michaelbeaumont michaelbeaumont force-pushed the bugfix-invalid-proxy-template-profile branch from 5a84e79 to 0e59d8b Compare March 31, 2022 16:21
@michaelbeaumont michaelbeaumont changed the title fix: proxyTemplate validation error fix(*): proxyTemplate validation error Mar 31, 2022
@michaelbeaumont michaelbeaumont force-pushed the bugfix-invalid-proxy-template-profile branch from 0e59d8b to 1b55415 Compare March 31, 2022 16:29
@michaelbeaumont michaelbeaumont force-pushed the bugfix-invalid-proxy-template-profile branch from ca84939 to 1babfb7 Compare March 31, 2022 20:08
@michaelbeaumont michaelbeaumont force-pushed the bugfix-invalid-proxy-template-profile branch from 1babfb7 to b3e5e54 Compare March 31, 2022 20:10
@lahabana lahabana merged commit c48c6e4 into kumahq:master Apr 1, 2022
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.

Importing gateway-proxy in ProxyTemplates manifest results in error
4 participants