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

Default requireApproverJustification to false before diffing #3307

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

Conversation

maqiuyujoyce
Copy link
Collaborator

@maqiuyujoyce maqiuyujoyce commented Dec 4, 2024

Change description

Fixes the issue that there is always a diff when spec.ApprovalWorkflow.ManualApprovals.RequireApproverJustification is set to false in the KCC manifest. This issue happens because false is the default value for this field, and the default value is not returned by the PAM API.

Supported no change step for PrivilegedAccessManagerEntitlement to verify this change in mock test. (Credit to #3045 by @acpana.)

Also updated the testdata version for PAM from v1alpha1 to v1beta1.

Tests you have done

  • [N/A] 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 ask for approval from maqiuyujoyce. 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

Copy link
Collaborator

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

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

Could you add a test to reflect this change?

@maqiuyujoyce maqiuyujoyce added this to the 1.126 milestone Dec 4, 2024
@maqiuyujoyce maqiuyujoyce force-pushed the 202412-pam-default-values branch from acab2e7 to 18ce2b6 Compare December 17, 2024 07:03
@maqiuyujoyce
Copy link
Collaborator Author

Could you add a test to reflect this change?

Done!

@yuwenma
Copy link
Collaborator

yuwenma commented Dec 18, 2024

Could you add a test to reflect this change?

Done!

I saw you changed the test infra for PAM. We cannot do it because 1. if it is an infra change, we should PR review the infra separately and add test coverage to validate the infra change; 2. Adding If PAM then X, other Y in the core test infra introduces a big maintenance tech debt and should be avoided 3. The actual test suite still does not reflect how the PAM default behavior is changed before and after the code change.

I suggest we add a scenario test, and design the steps that can reflect the expected outcome of this fix.

@maqiuyujoyce maqiuyujoyce force-pushed the 202412-pam-default-values branch from 18ce2b6 to e271ec1 Compare December 19, 2024 10:54
@maqiuyujoyce maqiuyujoyce force-pushed the 202412-pam-default-values branch from e271ec1 to 17f4a44 Compare December 21, 2024 07:15
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