fix(ci): pre-clone manifest deps in workflow, drop in-image clone (closes #173) #38
No reviewers
Labels
No Label
tier:high
tier:low
tier:medium
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#38
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/issue173-publish-workspace-server-image"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
publish-workspace-server-image.ymlcould not run on Gitea Actions becauseDockerfile.tenantstage 3 rangit cloneagainst private Gitea repos from inside the Docker build context — no auth path. Every workspace-server rebuild required a manual operator-host push (today's all-day pain).AUTO_SYNC_TOKEN= devops-engineer persona PAT is naturally available).Dockerfile.tenantnow COPYs from.tenant-bundle-deps/, populated by the new "Pre-clone manifest deps" step. The Gitea token never enters the image.Files changed
.github/workflows/publish-workspace-server-image.yml— new "Pre-clone manifest deps" step beforedocker buildx build. Fail-fast ifAUTO_SYNC_TOKENis empty.scripts/clone-manifest.sh— optionalMOLECULE_GITEA_TOKENenv embeds basic-auth (oauth2:<token>) in the clone URL; redacted in log output. Anonymous fallback preserved.workspace-server/Dockerfile.tenant— drop stage 3 (templates clone), COPY from.tenant-bundle-deps/instead. Header documents the prereq + the manual operator-host build path..gitignore— ignore/.tenant-bundle-deps/so a local build can't accidentally commit cloned repos.Local verification
Ran
MOLECULE_GITEA_TOKEN=<persona-PAT> bash scripts/clone-manifest.sh manifest.json /tmp/.../ws /tmp/.../org /tmp/.../plugins:Display URLs correctly redacted to
oauth2:***.Hostile self-review (3 weakest spots)
AUTO_SYNC_TOKENsemantic overload — same persona PAT is used for both auto-sync push and manifest clone. If someone scopes it down further later, this workflow silently breaks. Mitigation: workflow comment now documents the dependency.mainHEAD; could addactions/cachekeyed onmanifest.jsonhash later if it matters.docker buildx build -f Dockerfile.tenantlocally without first pre-cloning gets aCOPYfailure. Mitigation: Dockerfile header documents the prereq.Test plan
:staging-<sha>+:staging-latestto ECR without manual operator interventiondocker pushfrom operator hostCloses #173.
LGTM — Option B as recommended; locally verified clone-manifest.sh against persona token (37/37 repos, 4.9MB).