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

CLOUDP-228587: Migrate Maintenance Window #1880

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

roothorp
Copy link
Collaborator

All Submissions:

  • Have you signed our CLA?
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if there is one).
  • Update docs/release-notes/release-notes-template.md if your changes should be included in the release notes for the next release.

@roothorp roothorp added the hold Do not merge for now label Oct 22, 2024
Comment on lines +12 to +14
type MaintenanceWindow struct {
*project.MaintenanceWindow
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need the wrapping if we are not adding more fields?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Honestly I was just following the layout of previous translation layers - however I was considering including the projectID in this struct rather than having to pass it down every time. Does that sound like a good idea?

Comment on lines +16 to +22
func NewMaintenanceWindow(spec *project.MaintenanceWindow) *MaintenanceWindow {
if spec == nil {
return nil
}
// No slices so no normalization needed
return &MaintenanceWindow{MaintenanceWindow: spec}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Without the wrapping we would also not need this.

"github.com/stretchr/testify/require"
)

func TestRoundtrip_MaintenanceWindow(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI gofuzz supports integration with dvyukovgo-fuzz which in turns means we might be able to make our fuzz tests official go fuzz tests, with the language support that this brings.
No need to change for this one, but maybe we could explore it going forward.

Copy link
Collaborator

@josvazg josvazg left a comment

Choose a reason for hiding this comment

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

LGTM

About the wrapping, it is not a blocker, but also not sure of the benefit of wrapping such type in this particular case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold Do not merge for now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants