Skip to content

document is not defined#161

Merged
derekmisler merged 1 commit into
docker:mainfrom
derekmisler:document-is-not-defined
May 4, 2026
Merged

document is not defined#161
derekmisler merged 1 commit into
docker:mainfrom
derekmisler:document-is-not-defined

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

@derekmisler derekmisler commented May 4, 2026

Summary

Fixes the "document is not defined" error in the GitHub Action by configuring Vite to use Node.js-compatible package variants. Also improves error handling for credential fetching and updates workflow dependencies.

Changes

  • Vite configuration: Added resolve.conditions to force Node.js exports (instead of browser variants) for packages like @aws-sdk/*, and disabled modulePreload polyfill since this is a Node.js-only action
  • Error handling: Changed AWS Secrets Manager error from core.info to core.setFailed so the workflow properly fails when required credentials cannot be fetched
  • Workflow dependencies: Updated pnpm/action-setup to v6.0.5 and actions/setup-node to v6.4.0 across all workflows

Test plan

  • Verify the action runs without "document is not defined" errors
  • Confirm workflows fail appropriately when AWS Secrets Manager is unavailable
  • Run existing test suite to ensure no regressions

Closes: https://github.com/docker/gordon/issues/484

@derekmisler derekmisler self-assigned this May 4, 2026
@derekmisler derekmisler force-pushed the document-is-not-defined branch from 8f7b1db to 023689e Compare May 4, 2026 14:35
@derekmisler
Copy link
Copy Markdown
Contributor Author

/review

@derekmisler derekmisler force-pushed the document-is-not-defined branch from 023689e to fac138e Compare May 4, 2026 14:37
Copy link
Copy Markdown
Contributor

@docker-agent docker-agent Bot left a comment

Choose a reason for hiding this comment

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

Assessment: 🔴 CRITICAL

This PR introduces a critical credential-flow bug that will cause every workflow using the new composite setup-credentials action to fail at runtime. One medium and one low finding also need attention. See inline comments for details.

Comment thread .github/actions/setup-credentials/action.yml
Comment thread .github/workflows/self-review-pr.yml
Comment thread .github/workflows/self-review-pr.yml
@derekmisler derekmisler force-pushed the document-is-not-defined branch from fac138e to 5c5810c Compare May 4, 2026 14:55
@derekmisler derekmisler marked this pull request as ready for review May 4, 2026 14:58
@derekmisler derekmisler requested a review from a team as a code owner May 4, 2026 14:58
@derekmisler derekmisler enabled auto-merge (squash) May 4, 2026 15:15
Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler force-pushed the document-is-not-defined branch from 5c5810c to 6aab2fb Compare May 4, 2026 15:25
@derekmisler derekmisler merged commit 46b6259 into docker:main May 4, 2026
11 checks passed
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