Add docs/developer.md - #74
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
The path must end in
authbridge/authlib, not the repository root — authlib is a nested module with its owngo.mod. Also covers why the directive must not be committed (go mod tidyrewritesrequirelines and drops authlib'sgo.sumentries while it is active, failing CI's tidy check even after the replace is gone) and thego.workalternative, 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=1defeats the cache,-raceis kept apart so an ordinary failure is not reported as a race, and-shuffle=onmatters here because the suite mutatesHOMEand cobra flag state.docs/README.mdgains 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.