| License | Apache-2.0 |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
Singular.Registry.Candidate
Description
Resolves the candidate revision for the row runners (#91): the
CANDIDATE_SHA override wins for smoke runs, else the invocation
repository's git rev-parse HEAD, else the RELEASE-COMMIT file a
published release archive carries at its root — the archive is not a
git checkout, so the file is found by walking up from the working
directory (the runners execute from offchain/ inside the extracted
archive). A revision that cannot be established fails closed, never
"unknown".
Synopsis
- data CandidateSource
- resolveCandidate :: IO (Either String (String, Bool, CandidateSource))
- sourceName :: CandidateSource -> String
Documentation
data CandidateSource Source #
Where a resolved candidate revision came from.
Constructors
| CandidateFromEnv | The |
| CandidateFromGitHead | The invocation repository's |
| CandidateFromReleaseCommit | The |
Instances
| Show CandidateSource Source # | |
Defined in Singular.Registry.Candidate Methods showsPrec :: Int -> CandidateSource -> ShowS Source # show :: CandidateSource -> String Source # showList :: [CandidateSource] -> ShowS Source # | |
| Eq CandidateSource Source # | |
Defined in Singular.Registry.Candidate Methods (==) :: CandidateSource -> CandidateSource -> Bool Source # (/=) :: CandidateSource -> CandidateSource -> Bool Source # | |
resolveCandidate :: IO (Either String (String, Bool, CandidateSource)) Source #
Candidate revision, derived not told: an explicit override wins for
smoke runs, else the invocation repository's HEAD, else the
RELEASE-COMMIT file of the release archive the working directory sits
in. A revision that cannot be established fails closed — never
"unknown". Worktree cleanliness rides along as before: a git status
that cannot be read counts as dirty.
sourceName :: CandidateSource -> String Source #
Stable name for the source, as recorded in a run's meta.json.