Skip to content

Conversation

@a-hilaly
Copy link
Member

@a-hilaly a-hilaly commented Apr 22, 2022

Issue aws-controllers-k8s/community#1239

Currently, the code generator doesn't correctly generate delta comparison
functions for secret fields, because the runtime doesn't contain any
helper functions that can help in computing the delta of
SecretKeyReference and SecretKeyReference slices.

This patch adds two functions to help compare two instances or slices
of SecretKeyReference.

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

Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

@a-hilaly very cool! I have a few changes to request inline but this is a great start!

Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

How are we doing on this one, @a-hilaly?

@a-hilaly a-hilaly force-pushed the delta-secret-key-reference branch from 224f1fc to 3dcf440 Compare June 17, 2022 15:29
@a-hilaly a-hilaly requested a review from jaypipes June 17, 2022 15:35
@@ -0,0 +1,103 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Rename this file. Maybe we could move it under pkg/compare/secrets/reference.go? Then when we do value comparison that can go under value.go?

Copy link
Contributor

Choose a reason for hiding this comment

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

This comment still stands. The file is named pkg/compare/reference.go, it is not clear that it involves secrets.

@jaypipes
Copy link
Collaborator

@a-hilaly how we doing on this one?

@a-hilaly a-hilaly force-pushed the delta-secret-key-reference branch from 3dcf440 to 4180d7a Compare June 29, 2022 18:08
@a-hilaly
Copy link
Member Author

@RedbackThomson @jaypipes updated the PR pleasr retake a look

Issue aws-controllers-k8s/community#1239

Currently the code generator doesn't correctly generate delta comparison
functions for secret fields, because the runtime doesn't contain any
helper functions that can help in computing the delta of
`SecretKeyReference` and `SecretKeyReference` slices.

This patch adds two functions to help comparing two instance or slices
of `SecretKeyReference`. `SliceSecretKeyReferenceEqual` also return two
arrays containing the added and removed list of secret key references.
@a-hilaly a-hilaly force-pushed the delta-secret-key-reference branch from 4180d7a to d868886 Compare June 29, 2022 19:27
Copy link
Contributor

@RedbackThomson RedbackThomson left a comment

Choose a reason for hiding this comment

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

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2022
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: A-Hilaly, RedbackThomson

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

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 6dd4a27 into aws-controllers-k8s:main Jun 29, 2022
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.

4 participants