Skip to content

feat: Add contributorInsights field to Table resource #127

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

michaelhtm
Copy link
Member

Issue #2408

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 requested review from a-hilaly and rushmash91 April 1, 2025 01:46
@ack-prow ack-prow bot added the approved label Apr 1, 2025
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Thanks @michaelhtm! left a few comments in line

@@ -590,6 +600,10 @@ func customPreCompare(
if a.ko.Spec.DeletionProtectionEnabled == nil {
a.ko.Spec.DeletionProtectionEnabled = aws.Bool(false)
}

if a.ko.Spec.ContributorInsights == nil && *b.ko.Spec.ContributorInsights == string(svcsdktypes.ContributorInsightsStatusDisabled) {
Copy link
Member

Choose a reason for hiding this comment

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

b.ko.Spec.ContributorInsights is always non nil? would something like this work?

if a.ko.Spec.ContributorInsights == nil {
    b.ko.Spec.ContributorInsights = a.ko.Spec.ContributorInsights
}

Copy link
Member Author

Choose a reason for hiding this comment

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

so the default value of this field is DISABLED..
if the user completely removes this field, and the insight is ENABLED, i thought we could disable it...

Copy link
Member Author

Choose a reason for hiding this comment

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

QQ: Should the ContributorInsights field accept ENABLED/DISABLED? or ENABLE/DISABLE?
i realized the output of the describe is different than the update after i generated..what do you think?

case svcsdktypes.ContributorInsightsStatusDisabled:
ko.Spec.ContributorInsights = aws.String(string(svcsdktypes.ContributorInsightsActionDisable))
default:
ko.Spec.ContributorInsights = aws.String(string(resp.ContributorInsightsStatus))
Copy link
Member

Choose a reason for hiding this comment

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

how about just ko.Spec.ContributorInsights = aws.String(string(resp.ContributorInsightsStatus)) are the other cases necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

describe returns: enabled, disabled, enabling, disabling
update accepts: enable, disable

converting them here makes the delta easier...

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we just requeue if it's in a transition state and assume that if we reach this block of code it's either DISABLED or ENABLED?

Copy link
Member Author

Choose a reason for hiding this comment

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

the requeue is happening at the end of sdkFind..inside isTableContributorInsightsUpdating that i'm adding

Copy link

ack-prow bot commented Apr 1, 2025

@michaelhtm: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
dynamodb-verify-attribution ac49864 link false /test dynamodb-verify-attribution

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@rushmash91 rushmash91 left a comment

Choose a reason for hiding this comment

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

thanks @michaelhtm !
/lgtm

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

ack-prow bot commented Apr 1, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, michaelhtm, rushmash91

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,michaelhtm,rushmash91]

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 278651e into aws-controllers-k8s:main Apr 1, 2025
6 of 7 checks passed
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