Skip to content

fix(region-info): integ use standalone package #34782

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phuhung273
Copy link
Contributor

Issue # (if applicable)

Closes #34692

Reason for this change

Description of changes

  • Modify integ.elastic-beanstalk-hostedzoneid to use standalone @aws-cdk/region-info. We still have integ.elastic-beanstalk-environment-target using monolithic one
  • Remove duplicate exports
    "./core/lib/errors": "./core/lib/errors.js",
    "./core/lib/helpers-internal": "./core/lib/helpers-internal/index.js",
    "./core/lib/metadata-resource": "./core/lib/metadata-resource.js",
    "./core/lib/prop-injectable": "./core/lib/prop-injectable.js",
    "./core/lib/errors": "./core/lib/errors.js",

Describe any new or updated permissions being added

Description of how you validated changes

Reproducing:

  1. Change integ to use standalone @aws-cdk/region-info
  2. Build integ
  3. Remove export in packages/aws-cdk-lib/package.json
  4. Build aws-cdk-lib
  5. Run integ > error
$ yarn integ test/aws-route53-targets/test/integ.elastic-beanstalk-hostedzoneid.js
yarn run v1.22.22
$ integ-runner --language javascript test/aws-route53-targets/test/integ.elastic-beanstalk-hostedzoneid.js

Verifying integration test snapshots...

node:internal/modules/cjs/loader:641
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './core/lib/errors' is not defined by "exports" in /workspaces/aws-cdk/node_modules/aws-cdk-lib/package.json
    at exportsNotFound (node:internal/modules/esm/resolve:322:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:670:9)
    at resolveExports (node:internal/modules/cjs/loader:634:36)
    at Module._findPath (node:internal/modules/cjs/loader:724:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1211:27)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/workspaces/aws-cdk/packages/@aws-cdk/region-info/lib/fact.js:8:18)
    at Module._compile (node:internal/modules/cjs/loader:1469:14) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v20.18.3

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 June 21, 2025 00:29
@github-actions github-actions bot added star-contributor [Pilot] contributed between 25-49 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1 labels Jun 21, 2025
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.

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

✅ A exemption request has been requested. Please wait for a maintainer's review.

@phuhung273
Copy link
Contributor Author

Exemption Request: no need snapshot change

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Jun 21, 2025
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: e9aeac0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@ozelalisen ozelalisen self-assigned this Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. star-contributor [Pilot] contributed between 25-49 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test(region-info): integ test to ensure region info works as expected
3 participants