Skip to content
Source
Sign inSign up

Update a shared module

CI / Speed and debugging

Update a shared module

Someone moved the tag of a shared module, and now the plan of your workflows stops with an error, so no job runs. Read what changed with src ci update, then commit the new pin, or pin another version.

2 min read

You need a repository that imports a src: module, and the src CLI, logged in.

When a tag moves

Someone can move the tag v1.0.0 to another commit. Then the tag names a commit that src.lock does not pin. The forge does not plan the workflows, so no job runs. A push records a failed run with the error. The new code of the module runs only after you pin it.

The failed run on the CI tab shows the error. The Run workflow form shows it too, for the branch that you enter:

The workflows of main could not be read: acme/ci-steps@v1.0.0 moved: it points at 9c8d7e6 now, but .source/src.lock pins 3f2a1b9. Run `src ci update` to review the change and pin it.

1. See what changed

Run src ci update for that import. It shows what changed in the module:

src ci update acme/ci-steps@v1.0.0
acme/ci-steps@v1.0.0: moved from 3f2a1b9 to 9c8d7e6
  changed pnpm.ts: 1 line added, 1 removed
Wrote .source/src.lock.
Synced acme/ci-steps@v1.0.0 at 9c8d7e6: 1 file.
Wrote .source/tsconfig.json.

2. Read the new code

Read the new code in .source/.modules/acme/ci-steps@v1.0.0/.

3. Accept it, or pin another version

  • If you accept the new code, commit src.lock and push.
  • If you do not accept it, import another tag or a commit. Then run src ci update again.

Done

The plan reads your workflows again, and the jobs run the code that you read and pinned.

Tip

A commit never moves. To pin a module for good, import it at a commit: src:acme/ci-steps@<40-character commit>/pnpm.ts.