Skip to content

Conversation

@Abogical
Copy link
Member

@Abogical Abogical commented Jan 19, 2026

Note: Copied from #34898 with updated snapshots, credit to @msessa.

Closes #34897

Reason for this change

The AccessEntry for kubectl provider should be included as a dependency of the kubectl ready barrier.

Description of changes

Add the kubectl AccessEntry to the explicit dependencies for the ready barrier resource

Description of how you validated changes

  • Updated unit test
  • Updated integration tests.

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team January 19, 2026 20:16
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK labels Jan 19, 2026
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 19, 2026
@Abogical Abogical added the pr/needs-integration-tests-deployment Requires the PR to deploy the integration test snapshots. label Jan 19, 2026
@Abogical Abogical had a problem deploying to deployment-integ-test January 19, 2026 20:17 — with GitHub Actions Error
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ✅SkippedFailed
Security Guardian Results384 ran384 passed
TestResult
No test annotations available

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ☑️SkippedFailed ❌️
Security Guardian Results with resolved templates384 ran376 passed8 failed
TestResult
Security Guardian Results with resolved templates
packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-al2023-nodegroup.js.snapshot/aws-cdk-eks-cluster-al2023-nodegroup-test.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-auto.js.snapshot/eks-auto-mode-empty-nodepools-stack.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-auto.js.snapshot/eks-auto-mode-stack.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-cluster-imported.js.snapshot/aws-cdk-eks-import-cluster-test.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-cluster-private-endpoint.js.snapshot/aws-cdk-eks-cluster-private-endpoint-test.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-cluster.js.snapshot/aws-cdk-eks-cluster.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-helm-asset.js.snapshot/aws-cdk-eks-helm-test.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk/aws-eks-v2-alpha/test/integ.eks-windows-ng.js.snapshot/aws-cdk-eks-cluster-windows-ng-test.template.json
iam-role-root-principal-needs-conditions.guard❌ failure

@Abogical Abogical force-pushed the eks-v2-alpha-dep-fix branch from 8554e9e to 109675f Compare January 19, 2026 20:28
@Abogical Abogical had a problem deploying to deployment-integ-test January 19, 2026 20:28 — with GitHub Actions Error
@Abogical Abogical changed the title Eks v2 alpha dep fix fix(eks-v2-alpha): ensure kubectl provider access entry is depended upon by downstream resources #34898 Jan 19, 2026
@Abogical Abogical changed the title fix(eks-v2-alpha): ensure kubectl provider access entry is depended upon by downstream resources #34898 fix(eks-v2-alpha): ensure kubectl provider access entry is depended upon by downstream resources Jan 20, 2026
@Abogical Abogical removed the pr/needs-integration-tests-deployment Requires the PR to deploy the integration test snapshots. label Jan 20, 2026
@Abogical Abogical force-pushed the eks-v2-alpha-dep-fix branch from 109675f to a912f56 Compare January 20, 2026 12:20
@Abogical
Copy link
Member Author

Snapshots successfully deployed locally.

Copy link
Contributor

@kumvprat kumvprat left a comment

Choose a reason for hiding this comment

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

Couple of high level comments :

  • Can we look into why the linter says snapshot updates are required, even though the snapshots have literally changed ? (add the exemption requested label with some clarification around why we are not changing the integ tests itself but only the snapshots)
  • Can we look into security guardian failures ? It looks like errors like these are the reason : Check was not compliant as property [Condition] is missing. Value traversed to [Path=/Resources/AdminRole38563C57/Properties/AssumeRolePolicyDocument/Statement/0[L:8,C:12] Value={"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:root"}}]. If this indeed an exception we can suppress this rule for eks v2 tests and if not we need to investigate as to the reason behind security guardian alerts.

@Abogical Abogical added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Jan 20, 2026
@aws-cdk-automation aws-cdk-automation dismissed their stale review January 20, 2026 13:24

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 20, 2026
@Abogical
Copy link
Member Author

  • Added linter exemption to add integration test. The linter checks if a change is made to the integ test script itself, not the snapshots.
  • Security guardian errors relevant to EKS v2 alpha seem to be false positives. The root role is added as a dependency, not as a resource that will be assumed.

@kumvprat
Copy link
Contributor

#36734 (comment)

Added linter exemption to add integration test. The linter checks if a change is made to the integ test script itself, not the snapshots.

Agreed, can we have a comment explaining why we are witnessing snapshot changes even though we didn't change any integration tests ? (a one-liner like : changed/added a critical dependency in core eks setup which leads to all integration test use case snapshot changes)

Security guardian errors relevant to EKS v2 alpha seem to be false positives. The root role is added as a dependency, not as a resource that will be assumed.

Can you expand on this a bit ? Looks like the errors below are allowing :root access to assume an AdminRole. So in effect we are assuming a role is it not ?

Check was not compliant as property [Condition] is missing. Value traversed to [Path=/Resources/AdminRole38563C57/Properties/AssumeRolePolicyDocument/Statement/0[L:8,C:12] Value={"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:root"}}].

@Abogical
Copy link
Member Author

@mergify
Copy link
Contributor

mergify bot commented Jan 20, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Jan 20, 2026

Merge Queue Status

✅ The pull request has been merged at 19947cb

This pull request spent 5 hours 13 minutes 18 seconds in the queue, including 31 minutes 30 seconds running CI.
The checks were run in-place.

Required conditions to merge

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 20, 2026
@mergify
Copy link
Contributor

mergify bot commented Jan 20, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Jan 20, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit e104f45 into main Jan 20, 2026
20 of 23 checks passed
@mergify mergify bot deleted the eks-v2-alpha-dep-fix branch January 20, 2026 22:01
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes star-contributor [Pilot] contributed between 25-49 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-eks-v2-alpha): kubectl-based resources may not be successfully created/deleted

4 participants