-
Notifications
You must be signed in to change notification settings - Fork 231
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
Add mapper for SecureSourceManagerRepository #3120
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
// MISSING: PscAllowedProjects | ||
return out | ||
} | ||
func Repository_FromProto(mapCtx *direct.MapContext, in *pb.Repository) *krm.Repository { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this generated or manually added? The generator should only have SecureSourceManagerRepositorySpec_To/FromProto and SecureSourceManagerRepositoryObservedState_To/FromProto, and other helper functions. This may not come from the generator? I also do not think we need Repository_ToFromProto function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was generated, I didn't touch anything
apis/securesourcemanager/v1alpha1/securesourcemanagerrepository_types.go
Outdated
Show resolved
Hide resolved
@@ -58,3 +61,20 @@ func OperationMetadata_EndTime_ToProto(mapCtx *direct.MapContext, in *string) *t | |||
mapCtx.Errorf("OperationMetadata_EndTime_ToProto not implemented") | |||
return nil | |||
} | |||
|
|||
func SecureSourceManagerRepositoryObservedState_FromProto(mapCtx *direct.MapContext, in *pb.Repository) *krm.SecureSourceManagerRepositoryObservedState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why this is not generated to mappers.generated.go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure... I initially thought it is because the ObservedState struct wasn't populated with fields, but it does have one now..
// MISSING: Name | ||
// MISSING: Description | ||
if in.GetInstance() != "" { | ||
out.InstanceRef = &krm.SecureSourceManagerInstanceRef{External: in.GetInstance()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gemmahou I moved this function here, to rename the instance ref from &refs.*SecureSourceManagerInstanceRef
to &krm.SecureSourceManagerInstanceRef
Change description
Fixes #
Tests you have done
make ready-pr
to ensure this PR is ready for review.