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

Change stored version to v1beta3 #3463

Merged
merged 13 commits into from
Jul 16, 2024
Merged

Conversation

andriisoldatenko
Copy link
Contributor

@andriisoldatenko andriisoldatenko commented Jul 15, 2024

Description

This PR has all changes requires to use stored version as v1beta3 including:

  • Replace "github.com/Dynatrace/dynatrace-operator/pkg/api/v1beta2/dynakube" to "github.com/Dynatrace/dynatrace-operator/pkg/api/v1beta3/dynakube" mostly everywhere, except few files;
  • move conversion logic to v1beta3 package;

How can this be tested?

Make sure we store every CR (dynakube) using v1beta3, some testing ideas:

  • Apply dynakube v1beta1 -> stored as v1beta3
  • Apply dynakube v1beta2 -> stored as v1beta3
  • Apply dynakube v1beta3 -> stored as v1beta3

Optional:

  • Install the previous release, add dynakube v1beta2, and then upgrade the operator using this PR.

@andriisoldatenko andriisoldatenko changed the title gs Change stored version to v1beta3 Jul 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 88.43931% with 40 lines in your changes missing coverage. Please review.

Project coverage is 57.68%. Comparing base (b6b9122) to head (965bd51).

Files Patch % Lines
pkg/api/v1beta3/dynakube/validation/validation.go 50.00% 13 Missing ⚠️
pkg/api/v1beta3/dynakube/validation/oneagent.go 92.95% 3 Missing and 2 partials ⚠️
pkg/api/v1beta3/dynakube/dynakube_webhook.go 0.00% 3 Missing ⚠️
pkg/api/v1beta3/dynakube/validation/api_url.go 89.65% 2 Missing and 1 partial ⚠️
cmd/webhook/builder.go 0.00% 2 Missing ⚠️
pkg/api/v1beta2/dynakube/convert_from.go 84.61% 1 Missing and 1 partial ⚠️
.../v1beta2/dynakube/validation/namespace_selector.go 66.66% 1 Missing and 1 partial ⚠️
pkg/api/v1beta3/dynakube/dynakube_status.go 0.00% 2 Missing ⚠️
...g/api/v1beta3/dynakube/validation/csi_daemonset.go 87.50% 1 Missing and 1 partial ⚠️
pkg/api/v1beta3/dynakube/validation/istio.go 77.77% 1 Missing and 1 partial ⚠️
... and 3 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3463      +/-   ##
==========================================
+ Coverage   57.28%   57.68%   +0.39%     
==========================================
  Files         344      354      +10     
  Lines       19796    20006     +210     
==========================================
+ Hits        11340    11540     +200     
- Misses       7216     7226      +10     
  Partials     1240     1240              
Flag Coverage Δ
unittests 57.68% <88.43%> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andriisoldatenko andriisoldatenko marked this pull request as ready for review July 15, 2024 12:35
@andriisoldatenko andriisoldatenko requested a review from a team as a code owner July 15, 2024 12:35
Copy link
Contributor

@0sewa0 0sewa0 left a comment

Choose a reason for hiding this comment

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

Only a partial review, didn't check everything yet
Checked all files, no further comments

cmd/webhook/builder.go Outdated Show resolved Hide resolved
pkg/api/v1beta1/dynakube/convert_from_test.go Outdated Show resolved Hide resolved
pkg/api/v1beta1/dynakube/convert_to.go Outdated Show resolved Hide resolved
pkg/api/v1beta1/dynakube/convert_to_test.go Outdated Show resolved Hide resolved
pkg/api/v1beta2/dynakube/convert_to.go Outdated Show resolved Hide resolved
pkg/api/v1beta2/dynakube/convert_to.go Outdated Show resolved Hide resolved
pkg/api/v1beta2/dynakube/convert_to_test.go Outdated Show resolved Hide resolved
pkg/api/v1beta2/dynakube/dynakube_webhook.go Outdated Show resolved Hide resolved
@andriisoldatenko andriisoldatenko force-pushed the change-stored-version-to-v1beta3 branch from a8e981e to 39ed827 Compare July 15, 2024 13:46
aorcholski
aorcholski previously approved these changes Jul 15, 2024
pkg/api/v1beta2/dynakube/test/certs_test.go Outdated Show resolved Hide resolved
pkg/api/v1beta2/dynakube/test/proxy_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@0sewa0 0sewa0 left a comment

Choose a reason for hiding this comment

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

tested scenarios: (all cloudnative)

  • Upgrade from main with a previous DynaKube present
  • Apply v1beta2 DynaKube
  • Apply v1beta3 DynaKube

@aorcholski aorcholski merged commit 0b2c1f9 into main Jul 16, 2024
19 checks passed
@aorcholski aorcholski deleted the change-stored-version-to-v1beta3 branch July 16, 2024 11:54
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.

None yet

4 participants