Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
.github/workflows/fleet-desired.yml merge=generated-artifact
.github/workflows/heal-publish.yml merge=generated-artifact
.github/workflows/heal.yml merge=generated-artifact
.github/workflows/instrument-dispatch.yml merge=generated-artifact
.github/workflows/microvm-shakedown.yml merge=generated-artifact
.github/workflows/witnesses.yml merge=generated-artifact
.gitignore merge=generated-artifact
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/instrument-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Generated by gunbc.instrument_dispatch_workflow expected_instrument_dispatch_yml — do not hand-edit.
# Authority: gunbc.instrument_dispatch_workflow instrument_dispatch_workflow; regen via tools.generated_artifact_gate main_wet.
name: instrument-dispatch
run-name: instrument-dispatch ${{ inputs.label }}
on:
workflow_dispatch:
inputs:
label:
description: The rostered instrument to run (gunbc.instrument_targets); the run executes `gunbc test <label>` at the dispatched ref.
required: true
options: [//gunbc/instruments:dag-emit-real-grammar-round-trips]
type: choice
permissions:
contents: read
concurrency: instrument-dispatch
jobs:
instrument:
runs-on: [self-hosted, linux, arm64]
timeout-minutes: 240
permissions:
contents: read
steps:
- name: Seed the run's receipt before anything that can fail
id: seed_receipt
run: |
set -e
'mkdir' '-p' "$RUNNER_TEMP"'/instrument-dispatch'
'echo' 'instrument-dispatch label='"$INSTRUMENT_LABEL"' revision='"$GITHUB_SHA"' run='"$GITHUB_RUN_ID"' attempt='"$GITHUB_RUN_ATTEMPT" > "$RUNNER_TEMP"'/instrument-dispatch/receipt.txt'
'echo' 'not-started' > "$RUNNER_TEMP"'/instrument-dispatch/stdout.txt'
'echo' 'exit=not-started' > "$RUNNER_TEMP"'/instrument-dispatch/exit.txt'
shell: bash
env:
INSTRUMENT_LABEL: ${{ inputs.label }}
- name: Checkout
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
persist-credentials: false
- name: Isolate toolchain homes
run: |-
# dissolve-on: ci_toolchain_home_isolation_script -- orch-emitted foreign-executor prelude step wiping and setting HOME/CARGO_HOME/RUSTUP_HOME under RUNNER_TEMP so concurrent runner slots stop sharing one toolchain; leaf rm/echo strings remain until a typed per-job filesystem-and-environment effect lands on host_effect_apply (shell-to-intent Phase 2). This obligation covers THIS carrier and ci_isolate_toolchain_script, which share that terminal construction; ci_pin_rustup_default_script carries its own obligation because it does not
rm -rf "$RUNNER_TEMP/rustup" "$RUNNER_TEMP/cargo"
echo "HOME=$RUNNER_TEMP" >> "$GITHUB_ENV"
echo "CARGO_HOME=$RUNNER_TEMP/cargo" >> "$GITHUB_ENV"
echo "RUSTUP_HOME=$RUNNER_TEMP/rustup" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7
with:
components: rustfmt
cache: false
rustflags: -D warnings
- name: Pin rustup default (isolated RUSTUP_HOME has no default toolchain)
run: |-
# dissolve-on: ci_pin_rustup_default_script -- orch-emitted foreign-executor step selecting a rustup default toolchain inside an isolated RUSTUP_HOME, which starts with none, and resolving the cargo binary that selection implies. The leaf rustup/command/echo strings remain until a typed TOOLCHAIN-SELECTION effect lands on host_effect_apply -- NOT the filesystem-and-environment effect ci_toolchain_home_isolation_script waits on, which is why this is a separate obligation: that effect landing alone would leave this carrier standing
rustup default "$(rustup show active-toolchain | awk '{print $1; exit}')"
if [ -x "$CARGO_HOME/bin/cargo" ]; then CARGO_BIN="$CARGO_HOME/bin/cargo"; else CARGO_BIN="$(command -v cargo || true)"; fi
if [ -z "$CARGO_BIN" ]; then echo "::error::no cargo binary: neither the isolated $CARGO_HOME/bin/cargo shim nor PATH carries one"; exit 1; fi
echo "CARGO_BIN=$CARGO_BIN" >> "$GITHUB_ENV"
- name: Build the compiler
id: build_witness_fold
run: |+
GUNBC_FLOOR_LOG='gunbc-floor-cmd.log'
'set' '+e'
'set' '-o' 'pipefail'
('sh' '-e' '-c' 'cargo build --release -p v1-compiler --bin gunbc') 2>&1 | 'tee' "$GUNBC_FLOOR_LOG"
GUNBC_FLOOR_EXIT="$?"
GUNBC_FLOOR_RECEIPT='gunbc-floor-outcome.txt'
GUNBC_FLOOR_CLASS='structural'
GUNBC_FLOOR_SIGNATURE=''
if '[' "$GUNBC_FLOOR_EXIT" '-eq' '126' ']'; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='CommandInvokedCannotExecute'; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' "$GUNBC_FLOOR_EXIT" '-eq' '127' ']'; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='CommandNotFound'; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' "$GUNBC_FLOOR_EXIT" '-eq' '0' ']'; then GUNBC_FLOOR_CLASS='none'; GUNBC_FLOOR_SIGNATURE=''; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' '-f' "$GUNBC_FLOOR_LOG" ']' && 'grep' '-q' 'MemoryStallRefusedPageThrash' "$GUNBC_FLOOR_LOG"; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='MemoryStallRefusedPageThrash'; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' '-f' "$GUNBC_FLOOR_LOG" ']' && 'grep' '-q' 'The runner has received a shutdown signal' "$GUNBC_FLOOR_LOG"; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='RunnerLost'; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' '-f' "$GUNBC_FLOOR_LOG" ']' && 'grep' '-q' 'sccache: error: failed to execute compile' "$GUNBC_FLOOR_LOG"; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='SccacheFailedToExecuteCompile'; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' '-f' "$GUNBC_FLOOR_LOG" ']' && 'grep' '-q' '(exit status: 254)' "$GUNBC_FLOOR_LOG"; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='SccacheRustcWrapperExit254'; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' '-f' "$GUNBC_FLOOR_LOG" ']' && 'grep' '-q' 'sccache: encountered fatal error' "$GUNBC_FLOOR_LOG"; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='SccacheFatalError'; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' '-f' "$GUNBC_FLOOR_LOG" ']' && 'grep' '-q' 'failed to spawn' "$GUNBC_FLOOR_LOG"; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='ProcessSpawnFailure'; fi
if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' && '[' '-f' "$GUNBC_FLOOR_LOG" ']' && 'grep' '-q' 'Resource temporarily unavailable' "$GUNBC_FLOOR_LOG"; then GUNBC_FLOOR_CLASS='infra'; GUNBC_FLOOR_SIGNATURE='ResourceTemporarilyUnavailable'; fi
if (! '[' '-f' "$GUNBC_FLOOR_RECEIPT" ']') || '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']' || ('[' "$GUNBC_FLOOR_CLASS" '=' 'infra' ']' && (! ('[' '-f' "$GUNBC_FLOOR_RECEIPT" ']' && 'grep' '-q' 'class=structural' "$GUNBC_FLOOR_RECEIPT"))) || ('[' "$GUNBC_FLOOR_CLASS" '=' 'none' ']' && (! ('[' '-f' "$GUNBC_FLOOR_RECEIPT" ']' && 'grep' '-q' 'class=structural' "$GUNBC_FLOOR_RECEIPT")) && (! ('[' '-f' "$GUNBC_FLOOR_RECEIPT" ']' && 'grep' '-q' 'class=infra' "$GUNBC_FLOOR_RECEIPT"))); then 'printf' 'class=%s\nsignature=%s\nexit=%s\n' "$GUNBC_FLOOR_CLASS" "$GUNBC_FLOOR_SIGNATURE" "$GUNBC_FLOOR_EXIT" > "$GUNBC_FLOOR_RECEIPT"; if '[' "$GUNBC_FLOOR_CLASS" '=' 'infra' ']'; then 'echo' '::error title=environment::floor_class='"$GUNBC_FLOOR_CLASS"' signature='"$GUNBC_FLOOR_SIGNATURE"' exit='"$GUNBC_FLOOR_EXIT"'; this is not a verdict about the diff. Attempt receipt: '"$GUNBC_FLOOR_RECEIPT"; fi; if '[' "$GUNBC_FLOOR_CLASS" '=' 'structural' ']'; then 'echo' '::error title=subject::floor_class='"$GUNBC_FLOOR_CLASS"' exit='"$GUNBC_FLOOR_EXIT"'; read the step log for the subject defect'; fi; fi
'exit' "$GUNBC_FLOOR_EXIT"

- name: Require isolated toolchain homes
run: |
if [ -z "${CARGO_HOME:-}" ] || [ -z "${RUSTUP_HOME:-}" ]; then echo "::error::ToolchainHomesNotIsolated CARGO_HOME=${CARGO_HOME:-unset} RUSTUP_HOME=${RUSTUP_HOME:-unset} -- the isolation step did not run, so this job shares a toolchain with every other runner slot on this host and a concurrent install can replace a binary mid-run" >&2; exit 1; fi
if: "!cancelled()"
- name: Run the dispatched instrument
id: instrument
run: |
set -e
status='0'
'target/release/gunbc' 'test' "$INSTRUMENT_LABEL" > "$RUNNER_TEMP"'/instrument-dispatch/stdout.txt' || status="$?"
'cat' "$RUNNER_TEMP"'/instrument-dispatch/stdout.txt'
'echo' 'exit='"$status" > "$RUNNER_TEMP"'/instrument-dispatch/exit.txt'
'[' "$status" '=' '0' ']'
shell: bash
env:
INSTRUMENT_LABEL: ${{ inputs.label }}
- name: Upload the run's receipt and output
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: instrument-dispatch-receipt
path: ${{ runner.temp }}/instrument-dispatch
if-no-files-found: error
retention-days: 30
if: always()
5 changes: 5 additions & 0 deletions dag/gunbc/generated_artifact.dag
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type GeneratedArtifact
| FleetConvergeYamlArtifact
| FleetDesiredAdmissionYamlArtifact
| MicrovmShakedownYamlArtifact
| InstrumentDispatchYamlArtifact
| HealWorkflowYamlArtifact
| HealPublisherWorkflowYamlArtifact
| GitignoreArtifact
Expand Down Expand Up @@ -174,6 +175,7 @@ fn artifact_location(a: GeneratedArtifact) -> ArtifactLocation {
FleetConvergeYamlArtifact => ArtifactLocation { directory: ".github/workflows", name: "fleet-converge.yml" }
FleetDesiredAdmissionYamlArtifact => ArtifactLocation { directory: ".github/workflows", name: "fleet-desired.yml" }
MicrovmShakedownYamlArtifact => ArtifactLocation { directory: ".github/workflows", name: "microvm-shakedown.yml" }
InstrumentDispatchYamlArtifact => ArtifactLocation { directory: ".github/workflows", name: "instrument-dispatch.yml" }
HealWorkflowYamlArtifact => ArtifactLocation { directory: ".github/workflows", name: "heal.yml" }
HealPublisherWorkflowYamlArtifact => ArtifactLocation { directory: ".github/workflows", name: "heal-publish.yml" }
GitignoreArtifact => ArtifactLocation { directory: ".", name: ".gitignore" }
Expand Down Expand Up @@ -265,6 +267,7 @@ fn artifact_commit_policy(a: GeneratedArtifact) -> CommitPolicy {
FleetConvergeYamlArtifact => CommitRequired { consumer: GithubActionsWorkflow }
FleetDesiredAdmissionYamlArtifact => CommitRequired { consumer: GithubActionsWorkflow }
MicrovmShakedownYamlArtifact => CommitRequired { consumer: GithubActionsWorkflow }
InstrumentDispatchYamlArtifact => CommitRequired { consumer: GithubActionsWorkflow }
HealWorkflowYamlArtifact => CommitRequired { consumer: GithubActionsWorkflow }
HealPublisherWorkflowYamlArtifact => CommitRequired { consumer: GithubActionsWorkflow }
RoadmapArtifact => CommitRequired { consumer: ProjectDocumentation }
Expand Down Expand Up @@ -323,6 +326,7 @@ fn artifact_eq(a: GeneratedArtifact, b: GeneratedArtifact) -> Bool {
FleetConvergeYamlArtifact => match b { FleetConvergeYamlArtifact => true _ => false }
FleetDesiredAdmissionYamlArtifact => match b { FleetDesiredAdmissionYamlArtifact => true _ => false }
MicrovmShakedownYamlArtifact => match b { MicrovmShakedownYamlArtifact => true _ => false }
InstrumentDispatchYamlArtifact => match b { InstrumentDispatchYamlArtifact => true _ => false }
HealWorkflowYamlArtifact => match b { HealWorkflowYamlArtifact => true _ => false }
HealPublisherWorkflowYamlArtifact => match b { HealPublisherWorkflowYamlArtifact => true _ => false }
GitignoreArtifact => match b { GitignoreArtifact => true _ => false }
Expand Down Expand Up @@ -398,6 +402,7 @@ fn artifact_producer(a: GeneratedArtifact) -> DeclarationRef {
FleetConvergeYamlArtifact => decl_ref(module_path: "gunbc.fleet_converge_workflow", decl_name: "expected_fleet_converge_yml")
FleetDesiredAdmissionYamlArtifact => decl_ref(module_path: "gunbc.fleet_desired_admission_workflow", decl_name: "expected_fleet_desired_yml")
MicrovmShakedownYamlArtifact => decl_ref(module_path: "gunbc.runner_microvm_shakedown_workflow", decl_name: "expected_microvm_shakedown_yml")
InstrumentDispatchYamlArtifact => decl_ref(module_path: "gunbc.instrument_dispatch_workflow", decl_name: "expected_instrument_dispatch_yml")
HealWorkflowYamlArtifact => decl_ref(module_path: "gunbc.heal_workflow", decl_name: "expected_heal_workflow_yml")
HealPublisherWorkflowYamlArtifact => decl_ref(module_path: "gunbc.heal_publisher_workflow", decl_name: "expected_heal_publisher_workflow_yml")
GitignoreArtifact => decl_ref(module_path: "gunbc.gitignore_emit", decl_name: "expected_gitignore")
Expand Down
8 changes: 7 additions & 1 deletion dag/gunbc/generated_artifact_emit.dag
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import v2.extdeps.languages.swift.rows { SwiftRowEmitted, SwiftRowEmissionRefuse
import gunbc.approve_ios_swift_wire { expected_approve_ios_wire_swift }
import gunbc.approve_ios_swift_protocol_vector_tests { expected_approve_ios_protocol_vector_tests_swift }
import product.printed_chassis.cadquery_realization { CouponProgramGeneration, CouponProgramGenerated, CouponProgramRefused, expected_coupon_cadquery_program }
import gunbc.generated_artifact { GeneratedArtifact, WitnessFloorYamlArtifact, FleetConvergeYamlArtifact, FleetDesiredAdmissionYamlArtifact, MicrovmShakedownYamlArtifact, HealWorkflowYamlArtifact, HealPublisherWorkflowYamlArtifact, GitignoreArtifact, GitattributesArtifact, CargoConfigArtifact, RoadmapArtifact, DesignArtifact, DesignFailureModesArtifact, DesignRungDropsArtifact, ContributorOnboardingArtifact, RunnerDeployArtifact, GithooksPrePushArtifact, GithooksPreCommitArtifact, GeneratedArtifactMergeDriverArtifact, AutoinstallUserDataArtifact, RunnerHostSudoersArtifact, PlanArtifact, Stage0CrateLayoutGeneratedDagArtifact, Stage0CrateLayoutGeneratedRsArtifact, Stage0CratePartitionGeneratedDagArtifact, Stage0ExecutableAssemblyGeneratedDagArtifact, Stage0LinkedPartitionCratesArtifact, SeedRetentionFrontierGeneratedRsArtifact, V1InterpreterDispatchGeneratedRsArtifact, EvaluationBudgetConsequenceGeneratedRsArtifact, ReleaseLocusSeedConstantsGeneratedRsArtifact, FileTransportRealizationGeneratedRsArtifact, Fci1BoundedExecutionContextArtifact, WholeCorpusCompileMeasuredRootDemandsArtifact, ApprovalDeviceVectorsArtifact, ApproveIosProjectYmlArtifact, ApproveIosProtocolSwiftArtifact, ApproveIosWireSwiftArtifact, ApproveIosProtocolVectorTestsSwiftArtifact, artifact_path, artifact_commit_policy, CommitRequired, NotCommitted, GitProtocol, CargoToolchain, GithubActionsWorkflow, ProjectDocumentation, HostReconciler, CompilerRunInput, CrossLanguageClientTest, XcodeProjectGenerator, SwiftCompiler }
import gunbc.generated_artifact { GeneratedArtifact, WitnessFloorYamlArtifact, FleetConvergeYamlArtifact, FleetDesiredAdmissionYamlArtifact, MicrovmShakedownYamlArtifact, InstrumentDispatchYamlArtifact, HealWorkflowYamlArtifact, HealPublisherWorkflowYamlArtifact, GitignoreArtifact, GitattributesArtifact, CargoConfigArtifact, RoadmapArtifact, DesignArtifact, DesignFailureModesArtifact, DesignRungDropsArtifact, ContributorOnboardingArtifact, RunnerDeployArtifact, GithooksPrePushArtifact, GithooksPreCommitArtifact, GeneratedArtifactMergeDriverArtifact, AutoinstallUserDataArtifact, RunnerHostSudoersArtifact, PlanArtifact, Stage0CrateLayoutGeneratedDagArtifact, Stage0CrateLayoutGeneratedRsArtifact, Stage0CratePartitionGeneratedDagArtifact, Stage0ExecutableAssemblyGeneratedDagArtifact, Stage0LinkedPartitionCratesArtifact, SeedRetentionFrontierGeneratedRsArtifact, V1InterpreterDispatchGeneratedRsArtifact, EvaluationBudgetConsequenceGeneratedRsArtifact, ReleaseLocusSeedConstantsGeneratedRsArtifact, FileTransportRealizationGeneratedRsArtifact, Fci1BoundedExecutionContextArtifact, WholeCorpusCompileMeasuredRootDemandsArtifact, ApprovalDeviceVectorsArtifact, ApproveIosProjectYmlArtifact, ApproveIosProtocolSwiftArtifact, ApproveIosWireSwiftArtifact, ApproveIosProtocolVectorTestsSwiftArtifact, artifact_path, artifact_commit_policy, CommitRequired, NotCommitted, GitProtocol, CargoToolchain, GithubActionsWorkflow, ProjectDocumentation, HostReconciler, CompilerRunInput, CrossLanguageClientTest, XcodeProjectGenerator, SwiftCompiler }
import gunbc.generated_artifact_registry { committed_generated_artifacts, heal_regenerated_after_provisional_merge_paths }
import gunbc.whole_corpus_compile_demand_projection { expected_whole_corpus_compile_measured_root_demands_json }
import gunbc.generated_workflow_provenance {
Expand All @@ -19,6 +19,7 @@ import gunbc.generated_workflow_provenance {
import gunbc.fleet_converge_workflow { expected_fleet_converge_yml, FleetConvergeYamlGenerated, FleetConvergeYamlGenerationRefused }
import gunbc.fleet_desired_admission_workflow { expected_fleet_desired_yml, FleetDesiredGenerationOutcome, FleetDesiredGenerated, FleetDesiredGenerationRefused }
import gunbc.runner_microvm_shakedown_workflow { expected_microvm_shakedown_yml, MicrovmShakedownWorkflowGenerated, MicrovmShakedownWorkflowGenerationRefused }
import gunbc.instrument_dispatch_workflow { expected_instrument_dispatch_yml, InstrumentDispatchWorkflowGenerated, InstrumentDispatchWorkflowGenerationRefused }
import gunbc.heal_workflow { expected_heal_workflow_yml, HealWorkflowGenerated, HealWorkflowGenerationRefused }
import gunbc.heal_publisher_workflow { expected_heal_publisher_workflow_yml, HealPublisherWorkflowGenerated, HealPublisherWorkflowGenerationRefused }
import gunbc.witness_floor_workflow { WitnessFloorGenerationOutcome, WitnessFloorGenerated, WitnessFloorGenerationRefused }
Expand Down Expand Up @@ -97,6 +98,10 @@ fn artifact_generate_unadorned(a: GeneratedArtifact) -> ArtifactGenerationOutcom
MicrovmShakedownWorkflowGenerated { content } => artifact_generated(content: content)
MicrovmShakedownWorkflowGenerationRefused { reason } => ArtifactGenerationRefused { reason: reason }
}
InstrumentDispatchYamlArtifact => match expected_instrument_dispatch_yml() {
InstrumentDispatchWorkflowGenerated { content } => artifact_generated(content: content)
InstrumentDispatchWorkflowGenerationRefused { reason } => ArtifactGenerationRefused { reason: reason }
}
HealWorkflowYamlArtifact => match expected_heal_workflow_yml() {
HealWorkflowGenerated { content } => artifact_generated(content: content)
HealWorkflowGenerationRefused { reason } => ArtifactGenerationRefused { reason: reason }
Expand Down Expand Up @@ -255,6 +260,7 @@ fn artifact_extra_valid(a: GeneratedArtifact, generated: ArtifactGenerationOutco
FleetConvergeYamlArtifact => ci_yml_parses(path: artifact_path(a: a))
FleetDesiredAdmissionYamlArtifact => ci_yml_parses(path: artifact_path(a: a))
MicrovmShakedownYamlArtifact => ci_yml_parses(path: artifact_path(a: a))
InstrumentDispatchYamlArtifact => ci_yml_parses(path: artifact_path(a: a))
HealWorkflowYamlArtifact => ci_yml_parses(path: artifact_path(a: a))
HealPublisherWorkflowYamlArtifact => ci_yml_parses(path: artifact_path(a: a))
GitignoreArtifact => true
Expand Down
Loading