Skip to content

Conversation

@a-hilaly
Copy link
Member

@a-hilaly a-hilaly commented Mar 3, 2023

[fixes https://github.com/aws-controllers-k8s/community/issues/1647]

Completes aws-controllers-k8s/runtime#117

This patch adds a tiny modification to the controllers main.go that
passes the resource names to ackCfg.Validate method.

Needs a new runtime release.
/hold

Signed-off-by: Amine Hilaly [email protected]

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 added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 3, 2023
@ack-prow ack-prow bot requested review from RedbackThomson and vijtrip2 March 3, 2023 03:47
@ack-prow ack-prow bot added the approved label Mar 3, 2023
@a-hilaly a-hilaly force-pushed the drift-remediation/resource-validation branch from 5046b61 to 28d5f3c Compare March 6, 2023 15:43
if err := ackCfg.Validate(); err != nil {
managerFactories := svcresource.GetManagerFactories()
resourceKinds := make([]string, 0, len(managerFactories))
for _, mf := range managerFactories {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should just pass the entire GroupKind, so that different downstream validation can use whichever naming and casing it needs

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed. Changed to GroupKinds

@RedbackThomson RedbackThomson changed the title Passe registered resource names to config.Validate Pass registered resource names to config.Validate Mar 6, 2023
@a-hilaly a-hilaly force-pushed the drift-remediation/resource-validation branch from 28d5f3c to 6ef3d4f Compare March 6, 2023 20:09
@a-hilaly a-hilaly force-pushed the drift-remediation/resource-validation branch 2 times, most recently from 0753eca to af878bc Compare April 13, 2023 16:21
@a-hilaly
Copy link
Member Author

/unhold

@ack-prow ack-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 13, 2023
@a-hilaly
Copy link
Member Author

/retest

@a-hilaly
Copy link
Member Author

/test s3-controller-test

@a-hilaly
Copy link
Member Author

/retest

2 similar comments
@a-hilaly
Copy link
Member Author

/retest

@a-hilaly
Copy link
Member Author

/retest

@a-hilaly
Copy link
Member Author

/test all


if err := ackCfg.Validate(); err != nil {
managerFactories := svcresource.GetManagerFactories()
resourceGroupKinds := make([]schema.GroupVersionKind, 0, len(managerFactories))
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: These are now GVKs

Completes aws-controllers-k8s/runtime#117

This patch adds a tiny modification to the controllers `main.go` that
passes the resource names to `ackCfg.Validate` method.

Needs a new runtime release.
/hold

Signed-off-by: Amine Hilaly <[email protected]>
@a-hilaly a-hilaly force-pushed the drift-remediation/resource-validation branch from af878bc to 3a51a86 Compare April 19, 2023 17:08
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.

👍 thanks Amine!

@a-hilaly
Copy link
Member Author

/retest

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.

👍

@jaypipes
Copy link
Collaborator

jaypipes commented May 1, 2023

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label May 1, 2023
@ack-prow
Copy link

ack-prow bot commented May 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [A-Hilaly,RedbackThomson,jaypipes]

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 6657565 into aws-controllers-k8s:main May 1, 2023
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