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

Add mapper for SecureSourceManagerRepository #3120

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ericpang777
Copy link
Contributor

@ericpang777 ericpang777 commented Nov 7, 2024

Change description

Fixes #

Tests you have done

  • Run make ready-pr to ensure this PR is ready for review.
  • Perform necessary E2E testing for changed resources.

Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yuwenma for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ericpang777 ericpang777 reopened this Nov 7, 2024
@ericpang777
Copy link
Contributor Author

@gemmahou Chain PR off #3089. I can't make a branch in this repository though so unfortunately the diff includes the parent PR changes

@ericpang777 ericpang777 marked this pull request as ready for review November 7, 2024 17:21
@gemmahou gemmahou self-assigned this Nov 7, 2024
// MISSING: PscAllowedProjects
return out
}
func Repository_FromProto(mapCtx *direct.MapContext, in *pb.Repository) *krm.Repository {
Copy link
Collaborator

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

Copy link
Contributor Author

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

@@ -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 {
Copy link
Collaborator

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?

Copy link
Contributor Author

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()}
Copy link
Contributor Author

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

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.

2 participants