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

update style guide, accordingly to recent changes for all import changes for CR #3462

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

andriisoldatenko
Copy link
Contributor

@andriisoldatenko andriisoldatenko commented Jul 15, 2024

Description

This PR update style-guide accordingly to https://dt-rnd.atlassian.net/browse/K8S-10064

How can this be tested?

Read it and compare with #3451 changes

@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

All modified and coverable lines are covered by tests ✅

Project coverage is 57.25%. Comparing base (7677e1f) to head (9a7bef9).

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3462   +/-   ##
=======================================
  Coverage   57.25%   57.25%           
=======================================
  Files         344      344           
  Lines       19791    19791           
=======================================
  Hits        11331    11331           
  Misses       7222     7222           
  Partials     1238     1238           
Flag Coverage Δ
unittests 57.25% <ø> (ø)

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.

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.

looks good, maybe we could mention exceptions?

example:
Incase multiple versions of the same CR is used (conversion, webhook manager configuration, etc.), use the name of the CR as part of the package alias:

package abc
import (
   dynakubev1beta2  "github.com/Dynatrace/dynatrace-operator/pkg/api/v1beta2/dynakube"
   dynakubev1beta3  "github.com/Dynatrace/dynatrace-operator/pkg/api/v1beta3/dynakube"
)
package abc
import (
	edgeconnectv1alpha1 "github.com/Dynatrace/dynatrace-operator/pkg/api/v1alpha1/edgeconnect"
	edgeconnectv1alpha2 "github.com/Dynatrace/dynatrace-operator/pkg/api/v1alpha2/edgeconnect"
)

Sidenote:
Maybe having dkv1beta2 \ ecv1alpha1 instead of dynakubev1beta2 \ edgeconnectv1alpha1 for aliases be better 🤔

@andriisoldatenko
Copy link
Contributor Author

package abc
import (
	edgeconnectv1alpha1 "github.com/Dynatrace/dynatrace-operator/pkg/api/v1alpha1/edgeconnect"
	edgeconnectv1alpha2 "github.com/Dynatrace/dynatrace-operator/pkg/api/v1alpha2/edgeconnect"
)

done in 9a7bef9

@andriisoldatenko
Copy link
Contributor Author

@andriisoldatenko andriisoldatenko enabled auto-merge (squash) July 15, 2024 08:54
@andriisoldatenko andriisoldatenko merged commit fc77efd into main Jul 15, 2024
19 checks passed
@andriisoldatenko andriisoldatenko deleted the update-style-guide branch July 15, 2024 08:57
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