Skip to content

Conversation

vijtrip2
Copy link
Contributor

@vijtrip2 vijtrip2 commented Sep 8, 2021

Issue #, if available: aws-controllers-k8s/community#937

Description of changes:

  • For implementation of AWSResource.MetaObject, we were returning the complete resource.
  • This change only returns 'ObjectMeta' from AWSResource which is the implementation of 'metav1.Object' inside resource struct
  • returning only the relevant members helps in metadata comparison correctly with ackcompare.MetaV1ObjectEqual

  • Unit tests successful
  • Successful local kind e2e test for newly generated dynamodb controller

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

@RedbackThomson
Copy link
Contributor

I believe we are using MetaObject as part of the adoption reconciler. Would you mind verifying these still work as intended, as well? Just a simple smoke test should suffice.

@RedbackThomson RedbackThomson changed the title Only return MetaObject from AWSResource.MetaObject() call. Only return MetaObject from AWSResource.MetaObject() call Sep 8, 2021
@vijtrip2
Copy link
Contributor Author

vijtrip2 commented Sep 8, 2021

I believe we are using MetaObject as part of the adoption reconciler. Would you mind verifying these still work as intended, as well? Just a simple smoke test should suffice.

Tested with sagemaker adopt_endpoint test and it passes

tests/test_adopt_endpoint.py::TestAdoptedEndpoint::test_smoke 
[gw0] [100%] PASSED tests/test_adopt_endpoint.py::TestAdoptedEndpoint::test_smoke 

@RedbackThomson
Copy link
Contributor

Thanks!
/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2021
@ack-bot
Copy link
Collaborator

ack-bot commented Sep 8, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RedbackThomson, vijtrip2

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 [RedbackThomson,vijtrip2]

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

@ack-bot ack-bot merged commit 0dad432 into aws-controllers-k8s:main Sep 8, 2021
@vijtrip2 vijtrip2 deleted the metadata_comparison branch September 8, 2021 20:58
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