Skip to content

Add docs/developer.md - #74

Merged
esnible merged 1 commit into
mainfrom
docs-developer
Aug 19, 2026
Merged

Add docs/developer.md#74
esnible merged 1 commit into
mainfrom
docs-developer

Conversation

@esnible

@esnible esnible commented Aug 19, 2026

Copy link
Copy Markdown
Member

Notes a contributor otherwise has to reconstruct from the Makefile and the CI workflow.

Building against a local clone of cortex — so Cortex plugins can be developed without building containers or pushing to test a change:

go mod edit -replace \
  github.com/rossoctl/cortex/authbridge/authlib=/path/to/cortex/authbridge/authlib
go mod edit -dropreplace github.com/rossoctl/cortex/authbridge/authlib

The path must end in authbridge/authlib, not the repository root — authlib is a nested module with its own go.mod. Also covers why the directive must not be committed (go mod tidy rewrites require lines and drops authlib's go.sum entries while it is active, failing CI's tidy check even after the replace is gone) and the go.work alternative, which lives in a gitignored file and so cannot be committed by accident.

Running the tests — narrowing a run with -run, and the seven commands CI runs, with why the three test passes are separate: -count=1 defeats the cache, -race is kept apart so an ordinary failure is not reported as a race, and -shuffle=on matters here because the suite mutates HOME and cobra flag state.

docs/README.md gains a cross-reference under its existing Tests heading.

Docs only; no code changes. Every command in the file was run before it was written down.

Assisted by Claude.

Covers two things a contributor otherwise has to work out from the Makefile and
the CI workflow.

Building against a local clone of cortex, so a Cortex plugin can be developed
without building containers or pushing to test a change: the `go mod edit
-replace` and `-dropreplace` pair, with the detail that the path must end in
authbridge/authlib rather than the repository root, since authlib is a nested
module with its own go.mod. Includes why the directive must not be committed —
`go mod tidy` rewrites require lines and drops authlib's go.sum entries while it
is active, which fails CI's tidy check even after the replace is gone — and the
go.work alternative, which lives in a gitignored file and so cannot be committed
by accident.

Running the tests: narrowing a run with -run while iterating, and the seven
commands CI runs, with why the three test passes are separate. -count=1 defeats
the cache so a green result cannot stand in for a run that never happened,
-race is apart from the plain pass so an ordinary failure is not reported as a
race, and -shuffle=on matters here because the suite mutates HOME and cobra flag
state.

docs/README.md gains a cross-reference under its existing Tests heading, so the
new file is discoverable rather than orphaned.

Assisted by Claude.

Signed-off-by: Ed Snible <snible@us.ibm.com>
@esnible
esnible merged commit bd0fa53 into main Aug 19, 2026
2 checks passed
@esnible
esnible deleted the docs-developer branch August 19, 2026 17:47
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.

1 participant