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(ci): fix pinned enterprise tag #3508

Merged
merged 1 commit into from
Feb 8, 2023
Merged

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Feb 8, 2023

What this PR does / why we need it:

This PR unpins the enterprise tag that we set in integration tests. This way the nightly tests and locally run tests will respect TEST_KONG_IMAGE and TEST_KONG_TAG through

// KongImage is the Kong image to use in lieu of the default.
func KongImage() string {
return os.Getenv("TEST_KONG_IMAGE")
}
// KongTag is the Kong image tag to use in tests.
func KongTag() string {
return os.Getenv("TEST_KONG_TAG")
}
and
if image, tag := testenv.KongImage(), testenv.KongTag(); image != "" {
if tag == "" {
return nil, nil, fmt.Errorf("TEST_KONG_IMAGE requires TEST_KONG_TAG")
}
kongbuilder = kongbuilder.WithProxyImage(image, tag)
}

Special notes for your reviewer:

This is just unblocking and kicking the can down the road. We need to figure out an approach for this.

Related: Kong/kubernetes-testing-framework#542

  • If we set a default in ktf then we'd need to bump that every GW release, release ktf and then use that version in KIC
  • If we set a default in KIC (in CI just like this PR does it?) then we need to maintain it here
  • If we add a mechanism in KIC that always returns the latest GW tag:
    • This will get this data from Github so without tokens we have to take into account rate limiting
    • Without changing code and/or ktf version a version that we test against might change, hence surprises might happen.
  • Any other ideas?

Since that essentially sets a value in chart's values we're basically overriding what's set there by default. So we're sort of having a special case for enterprise whereas CE has it's tag set in respective chart's version values.

@pmalek pmalek added the area/ci label Feb 8, 2023
@pmalek pmalek self-assigned this Feb 8, 2023
@pmalek pmalek marked this pull request as ready for review February 8, 2023 09:16
@pmalek pmalek requested a review from a team as a code owner February 8, 2023 09:16
@pmalek pmalek force-pushed the fix-pinned-enterprise-gw-tag branch from 0676f47 to 71557d2 Compare February 8, 2023 10:10
@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 74.0% // Head: 73.9% // Decreases project coverage by -0.1% ⚠️

Coverage data is based on head (71557d2) compared to base (1084eb6).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3508     +/-   ##
=======================================
- Coverage   74.0%   73.9%   -0.1%     
=======================================
  Files        118     118             
  Lines      13886   13886             
=======================================
- Hits       10277   10264     -13     
- Misses      2952    2961      +9     
- Partials     657     661      +4     
Impacted Files Coverage Δ
...nternal/controllers/gateway/udproute_controller.go 71.6% <0.0%> (-2.2%) ⬇️
internal/dataplane/kongstate/service.go 66.0% <0.0%> (-1.3%) ⬇️
internal/dataplane/parser/parser.go 90.7% <0.0%> (-0.9%) ⬇️
internal/dataplane/parser/backendref.go 100.0% <0.0%> (ø)
internal/dataplane/parser/wrappers_refchecker.go 64.4% <0.0%> (ø)
...ternal/controllers/gateway/httproute_controller.go 69.7% <0.0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@czeslavo
Copy link
Contributor

czeslavo commented Feb 8, 2023

Since that essentially sets a value in chart's values we're basically overriding what's set there by default. So we're sort of having a special case for enterprise whereas CE has it's tag set in respective chart's version values.

This is kinda by design as the helm chart doesn't really have a default for EE proxy image (well, it has a comment).

IMO the best would be to have that handled on the chart level (as you noticed it is handled for CE). Maybe we should add something like image.edition that would accept {community, enterprise} and pin defaults to them to be used when this is specified?

Copy link
Contributor

@czeslavo czeslavo left a comment

Choose a reason for hiding this comment

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

Approving as a quick solution for unblocking

@pmalek
Copy link
Member Author

pmalek commented Feb 8, 2023

IMO the best would be to have that handled on the chart level (as you noticed it is handled for CE). Maybe we should add something like image.edition that would accept {community, enterprise} and pin defaults to them to be used when this is specified?

That would be easier for us to customize perhaps but a breaking change for the end users.

Imagine upgrading from CE to EE and having to move the image and tag you specified to CE and switch that toggle you mentioned.

@pmalek pmalek merged commit d5ac6f6 into main Feb 8, 2023
@pmalek pmalek deleted the fix-pinned-enterprise-gw-tag branch February 8, 2023 14:12
@pmalek pmalek added the fix label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants