Skip to content

Generate with GoV2 and latest code-gen #109

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

Merged
merged 4 commits into from
Apr 9, 2025

Conversation

michaelhtm
Copy link
Member

@michaelhtm michaelhtm commented Feb 21, 2025

Description of changes:

  • Generate with GoV2
  • Remove unnecessary tests
  • Generate with latest code-gen to introduce
    ACK tags conversion with ordered keys

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from jlbutler and rushmash91 February 21, 2025 23:03
@ack-prow ack-prow bot added the approved label Feb 21, 2025
@michaelhtm
Copy link
Member Author

/close

Copy link

ack-prow bot commented Feb 25, 2025

@michaelhtm: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ack-prow ack-prow bot closed this Feb 25, 2025
@michaelhtm
Copy link
Member Author

/reopen

Copy link

ack-prow bot commented Feb 25, 2025

@michaelhtm: Reopened this PR.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ack-prow ack-prow bot reopened this Feb 25, 2025
@michaelhtm michaelhtm force-pushed the migrate/gov2 branch 3 times, most recently from 69ee64e to 1fd405e Compare March 14, 2025 20:55
ShowShardDetails: aws.Bool(true)
Copy link
Member

Choose a reason for hiding this comment

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

now it's crossing my mind.. it would be call if the code-gen it self handled the true -> aws.Bool(true) translation

Copy link
Member Author

Choose a reason for hiding this comment

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

cool?
yeaa ikk..it should infer whether field is pointer or non-pointer...

Comment on lines 17 to 27
"context"

"github.com/pkg/errors"

ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare"
"github.com/aws-controllers-k8s/runtime/pkg/requeue"
ackrtlog "github.com/aws-controllers-k8s/runtime/pkg/runtime/log"
svcsdk "github.com/aws/aws-sdk-go/service/memorydb"
svcsdk "github.com/aws/aws-sdk-go-v2/service/memorydb"
svcsdktypes "github.com/aws/aws-sdk-go-v2/service/memorydb/types"

svcapitypes "github.com/aws-controllers-k8s/memorydb-controller/apis/v1alpha1"
svcutil "github.com/aws-controllers-k8s/memorydb-controller/pkg/util"
Copy link
Member

Choose a reason for hiding this comment

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

order fix please

Copy link
Member Author

Choose a reason for hiding this comment

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

of course

The To/FromACKTags function signatures are changing with the next
code-gen release. This PR aims to ensure custom code adapts as well.
@@ -0,0 +1,17 @@
package util
Copy link
Member

Choose a reason for hiding this comment

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

license

Comment on lines 3 to 17
func Int32OrNil(val *int64) *int32 {
if val == nil {
return nil
}
ret := int32(*val)
return &ret
}

func Int64OrNil(val *int32) *int64 {
if val == nil {
return nil
}
ret := int64(*val)
return &ret
}
Copy link
Member

Choose a reason for hiding this comment

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

With generics you can make this one function

Copy link
Member Author

Choose a reason for hiding this comment

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

let me see..

Comment on lines +19 to 23
"github.com/aws/aws-sdk-go-v2/aws"
svcsdk "github.com/aws/aws-sdk-go-v2/service/memorydb"
svcsdktypes "github.com/aws/aws-sdk-go-v2/service/memorydb/types"
"github.com/samber/lo"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Copy link
Member

Choose a reason for hiding this comment

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

order

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Sweet, thanks @michaelhtm !

Copy link
Member

@rushmash91 rushmash91 left a comment

Choose a reason for hiding this comment

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

thanks @michaelhtm !!

@rushmash91
Copy link
Member

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2025
@ack-prow ack-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2025
Copy link

ack-prow bot commented Apr 8, 2025

@michaelhtm: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
memorydb-verify-attribution 6515796 link false /test memorydb-verify-attribution

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@rushmash91
Copy link
Member

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2025
Copy link

ack-prow bot commented Apr 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, michaelhtm, rushmash91

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [a-hilaly,michaelhtm,rushmash91]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow bot merged commit dcb0bc0 into aws-controllers-k8s:main Apr 9, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants