migrate reviewer to agentic platform - phase 1#141
Conversation
|
/review |
9efbf05 to
ffcf021
Compare
fa86cde to
7de6094
Compare
|
/review |
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
This PR migrates the credential and signed-commit modules from action-local dist/ directories (.github/actions/*/dist/) to a centralized dist/ at the repository root, switches the build toolchain from Rollup to Vite, and consolidates the Vitest config into vite.config.ts.
Changes reviewed:
action.yml: path updated to../../../dist/credentials.js✅ correct relative depth (3 levels up from.github/actions/setup-credentials/)release.yml/update-docker-agent-version.yml: path replacements only — logic unchanged ✅vite.config.ts(new): auto-discovery ofsrc/<name>/index.tsentries, correctexternalpattern covering bothnode:prefixed and bare built-in modules,inlineDynamicImports: falsecorrectly set for multi-entry builds ✅package.json: clean swap of Rollup plugins for Vite;vitest run integrationcorrectly uses Vitest's filter argument ✅tsconfig.json: updatedexcludelist to match new file layout ✅- All credential and signed-commit source files: pure renames (
similarity index 100%) with no content changes — existing logic preserved ✅
No bugs found in the added code.
96b7a7d to
9d4b09a
Compare
Signed-off-by: Derek Misler <derek.misler@docker.com>
9d4b09a to
93b7062
Compare
| runs: | ||
| using: node24 | ||
| main: dist/setup-credentials.js | ||
| main: ../../../dist/credentials.js |
There was a problem hiding this comment.
this feels weird, sure, but once everything moves to TS, this whole action isn't needed anymore, so it's only temporary.
| echo "Pass 1: staging dist/ and creating temp commit..." | ||
| if [ ! -d .github/actions/setup-credentials/dist ] || [ -z "$(ls -A .github/actions/setup-credentials/dist)" ]; then | ||
| echo "::error::setup-credentials/dist/ is missing or empty — build may have failed" | ||
| if [ ! -f "$GITHUB_WORKSPACE/dist/credentials.js" ]; then |
There was a problem hiding this comment.
this line here is the primary motivation for this PR, to get all of the .js files in a single directory at the root of the repo.
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
This PR cleanly migrates the build system from Rollup to Vite and consolidates the action artifacts into a unified dist/ directory. No bugs were found in the changed code.
What was reviewed:
vite.config.ts: Auto-discovery of entry points viasrc/<name>/index.tsis correct;defineConfigfromvitest/configis the right import for a combined Vite+Vitest config; external modules cover bothnode:-prefixed and bare builtin names correctly;inlineDynamicImports: falsewith multiple entries is safe since the release workflow usesfind dist/ -type fwhich includes any generated chunks.action.yml: Path../../../dist/credentials.jscorrectly resolves todist/credentials.jsat repo root, matching Vite's[name].jsoutput for thecredentialsentry.- Workflow changes: All references to
$GITHUB_WORKSPACE/dist/signed-commit.jsand$GITHUB_WORKSPACE/dist/credentials.jsare correct; replacingCAGENT_DIR=$(pwd)with$GITHUB_WORKSPACEis actually more robust (survives directory changes in the step). tsconfig.json: Correctly excludesvite.config.tsin place of the deletedvitest.config.ts.- Test config consolidation: Vitest project names (
unit,integration) match the--projectflags inpackage.jsonscripts.
Related Issues
Closes: https://github.com/docker/gordon/issues/416
Summary
Migrate the build system from Rollup to Vite and consolidate action artifacts into a single
dist/directory at the root level. This phase 1 migration prepares the codebase for integration with the agentic platform by simplifying the build pipeline, reducing dependencies, and centralizing built artifacts.Changes
package.jsonand removed all Rollup-related plugins (@rollup/plugin-commonjs,@rollup/plugin-json,@rollup/plugin-node-resolve,@rollup/plugin-typescript,rollup-plugin-node-externals)setup-credentialsandsigned-commitartifacts into a singledist/root directory (dist/credentials.jsanddist/signed-commit.js).github/actions/setup-credentials/action.ymlto reference../../../dist/credentials.jsinstead of the localdist/subdirectory.github/workflows/release.yml,update-consumers.yml, andupdate-docker-agent-version.ymlto:dist/file checks instead of per-action directory checks$GITHUB_WORKSPACE/dist/signed-commit.jsand$GITHUB_WORKSPACE/dist/credentials.jsfor signed commit CLI invocationpackage.jsontest scripts to use Vitest project-based configuration (--project unitand--project integration)biome.jsonto simplify theorganizeImportsaction configurationTest plan
pnpm buildto verify Vite builds both credential and signed-commit modules intodist/pnpm testandpnpm test:integrationto verify test suite runs with new Vitest project configurationpnpm lintandpnpm actionlintto verify code quality checks pass