Repository navigation
Orchestration - #143
Open
pbuncic wants to merge 182 commits into
Open
Orchestration#143pbuncic wants to merge 182 commits into
pbuncic wants to merge 182 commits into
Conversation
…o the pipeline name
…ation, daily copy
The worker recomputes each bits-manifests certification and compares it with what was signed; events are sent to the audit-log service and checked against its head. certify: build_by_arch, s3_probe with a digest cache.
The worker keeps each certified BOM's bytes and follows bits-manifests as versions of the set, every change an event; the shadow also computes each certification from the set; GET /ops/certified.
With BITS_CRED_PROXY_AGENT_SOCKET the backend and the worker hold no GitLab token or store key, only the credentials proxy's gate tokens.
Pushed by make unlock from an encrypted bundle (tools/service-secrets.py);
Both were installed only by the image; the credentials proxy needs boto3. test_credproxy skips the S3 client test where boto3 is missing.
The proxy decodes the path once, so a project or group path's %2F must be sent as %252F.
BITS_ORCH_STORE_ANONYMOUS=1: unsigned requests at BITS_ORCH_S3_ENDPOINT (https).
Console pre-approval, store BOMs, certify group, admin and key policy; no signing.
A retry resumes and a stack seen before costs nothing; fresh hashing waits for signing.
certifier.py signs each pre-approved build via the signer proxy and writes it through a worker-only store writer, under CANARY/ until M8b; canary.py matches it against the CI's certification of the same build.
A cached copy was never refreshed, so build nodes kept trusting their first manifest and gc swept by stale roots. A failed fetch now trusts nothing from that manifest (rebuild; gc and cleanup refuse) instead of an older copy.
The store pass ran serially, twice per certified build. Packages now go 8 at a time (BITS_PUBLISH_JOBS), and bits certify uses the BOM the publish step wrote when it matches what this publish would write, but for who and when.
Concurrent certification MRs got 405 while GitLab rechecked them after another merged. Pending states are retried for 5 min; other refusals fail at once. With sha, only the validated head is merged, and an already-merged MR must match it.
Concurrent certification MRs made every comparison 'rebased'. The worker's and the CI's sets now only have to agree for the architecture; packages' provenance is not compared; a base the set never takes in is 'unbased'.
Already-installed packages were reused silently. The summary counts installed, from-store and built packages, names the latter with the reason, keeps the reason in the build manifest and pushes the counts to the build-host metrics.
An unchanged signed manifest is a 304: the local copy, whose sha256 is kept with its ETag, stays and is verified as before. Weak ETags are never sent; a truncated download is a failed fetch.
key4hep::gcc15 built as x86_64-el9-gcc15 and missed every certified -opt tarball of the same hash. Such a chain now gets opt before any overlay, exempt from valid_defaults, so the same binaries always land under one qualified arch.
… only in step with it
A link to the venv's Python runs the base Python, without the venv's packages: CI's has no yaml, so bits stopped before printing its help.
Inside "...", bash 3.2 keeps the quotes of a ${x//pat/"rep"}, so the
other build type's tree was never found on macOS.
Only a NUL byte makes a file binary then; macOS grep in a UTF-8 locale skipped text with invalid UTF-8 (e.g. Latin-1), which GNU grep rewrote.
SimpleNamespace takes a mapping only from 3.13 on; before, the strict symlink test raised TypeError.
Fetching, finalizing, done, uploaded, linked and reused lines now look like the spinner's, with --builders too; no spaces are left after ': done'.
sh ends a script whose '.' finds no file, so on macOS the rpm/dpkg answers were dropped and only the checks' versions recorded.
relocate-me.sh relocates to the physical path; on macOS the temp dir is under /var, which is /private/var.
After --console, $BITS_CONSOLE_URL and system: console_url, the site's console.backend_url (bits.cern.ch at CERN), as bits trace already does.
The approval printed only the link, silently, without the Python module qrcode; it now says the module is missing and how to install it.
The order a setting is looked for in, the CERN values now in 10-CERN.yaml, how another site masks them, and the console URL default; CHANGELOG.
A build made with the CLI had no builds row: never scanned nor in the vulnerability views. Once certified it is recorded as pipeline 0's (migration 18 reserves it), its community the approved group.
Once a day the worker records each release's open findings by severity and their risk (migration 19), earlier builds at their publish days; GET /ops/sbom/history serves them with today's point afresh.
It was taken for a commit and failed at checkout, leaving a clone behind.
…e is redone A clone left by a failed or killed run stopped every later build.
… and queue Read-only, for the community named; admins as before, vulnerabilities theirs.
…ay so A runner tagged bits-host-<name> is a host; build-hosts.yaml is no longer read.
Migration 20; /ops/schedules for a community's admins to edit, anyone to read; times in the instance's time zone (site console.time_zone).
One build per platform with the fan-out's variables; missed nights, overlaps, certification under the schedule's standing approval.
Runs follow their builds; /ops/nightlies; POST /ops/schedules/{id}/run.
…host Actions host.pause, host.resume (the host's runners in GitLab) and host.refresh (its builder images, a pipeline pinned to it).
Action host.prune (a pipeline pinned to the host); per-host target, 200 GiB unless saved. # Conflicts: # console-backend/README.md
GET /ops/worker, from the worker's step events; errors for overall admins. # Conflicts: # CHANGELOG.md # console-backend/console_backend/orch/api.py
phases.failed_in from the job's marks (migration 21). # Conflicts: # CHANGELOG.md
GET /ops/admin/ci-var?key=BITS_DESIRED_REF. # Conflicts: # CHANGELOG.md
phases.host is bits-host-<name> of a pinned build, else the runner's description.
The community's defaults_overlay last, as DEFAULTS too; --day, the weekday of the night.
Variants are defaults chains put before its own; a run is one cell (migration 22).
Heads read with git protocol v2 over HTTPS; a moved head, settled, builds every cell (migration 23).
WORKFLOWS Phase 4 gains steps 4 and 5; release notes summarise both.
This branch has not been deployed
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.
Orchestration: certification by bits-orchestrator, SBOM scanning, build plan, several stores
This merges
orchestrationintomain: 148 commits since35b7773, with contributions from Juan Miguel Carceller (#134, #136, #138), Maria Folina (#139, #142) and Akrit Kumar Behera (#131).CHANGELOG.md(Unreleased) lists every change by area; the main lines are below.bits-orchestrator (console-backend)
BITS_ORCH_OWNS_SET=1it owns the certified set: it writes numbered per-architecture manifests toMANIFESTS/, mirrors the set to bits-manifests and marks the store (MANIFESTS/orchestrator.json). Admins take builds or packages out withdecertifyanddecertify-package; the worker then withdraws them from the signed manifests. bits then defers:bits certifystops after the approval andbits signrefuses the store.bits tracereports who built, published and approved a file on CVMFS.bits
build_requirespackages if a package is found. #141;--fetch-build-requiresrestores the old behaviour). The store is listed in parallel, and certified listings are cached in<work dir>/.store-cache/. An end-of-build summary says why each package was built.--remote-storeand--write-storecan we support multiple S3 buckets? #130). Builds work offline when a read store can't be reached, andfetch_cachecaches a recipe's own downloads (Caching Support for additional sources. #129).trust_manifest_prefixaccepts several prefixes, and manifest sequence numbers prevent rollback to an older manifest.references:(CPEs and purls), versions of system packages,sbom: toolfor host tools, and version pins.bits upgradesets new versions in the recipes from a console upgrade plan.--symlink-packages-from(Adding an feature that help us create symlink of packages that are already deployed on cvmfs. #131, Akrit Kumar Behera): links packages from a deployed tree without modulefiles (CMS) into the work directory. Strict mode needs a matching.build-hashand, with signed reuse on, a certified one; aSYMLINK_STAGErecipe-repository hook handles SCRAM. The companion cms.bits change is a separate PR.q,enter,load,setenv) work from CVMFS without Python or a work directory, replacingbitsenv. A release with a complete view is set up through the view'ssetup.sh.site.d/NN-<name>.yaml,bits statushashes that now match the build's (--set,--docker, source form), regroupedbits -h, and CVMFS publish fixes.Compatibility
BUILD_EPOCHstays 0. The new hash-excluded inputs arereferences:,sbom:,system_package:and theSYMLINK_STAGEhook.opt(e.g.key4hep::gcc15→key4hep::gcc15::opt). This puts those builds under the-optarchitecture, where the certified tarballs are.lcgapp-bits-testing.bitsenvis removed.rebuilt_because,references,pinned_by,sbom,symlinked_from,symlink_policy); the schema version is unchanged.console-backend/README.md). Without them the backend behaves as before.Merging
mainhasd3ea1a6(grep -R→-rinbuild_template.sh), which this branch has ascfa3bbe. The merge is clean. Onmainalone,test_build_epochfails because that commit didn't updateCOVERED_SHA256; the merge fixes it.Testing
test_build_epochpasses on the merge result.