name: LNM Backfill CI on: workflow_dispatch: inputs: mongo_uri: description: 'Staging Mongo URI (read-only snapshot)' required: true type: string since_commit: description: 'Git commit to compare (default HEAD)' required: false type: string dry_run: description: 'Dry run (no writes)' required: false default: true type: boolean jobs: lnm-backfill: runs-on: ubuntu-22.04 env: DOTNET_VERSION: '10.0.100' ARTIFACT_DIR: ${{ github.workspace }}/.artifacts steps: - name: Checkout uses: actions/checkout@v4 - name: Task Pack offline bundle fixtures run: python3 scripts/packs/run-fixtures-check.sh with: fetch-depth: 0 - name: Set up .NET SDK uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DOTNET_VERSION }} include-prerelease: true - name: Restore run: dotnet restore src/Concelier/StellaOps.Concelier.Backfill/StellaOps.Concelier.Backfill.csproj - name: Run backfill (dry-run supported) env: STAGING_MONGO_URI: ${{ inputs.mongo_uri }} run: | mkdir -p $ARTIFACT_DIR EXTRA=() if [ "${{ inputs.dry_run }}" = "true" ]; then EXTRA+=("--dry-run"); fi dotnet run --project src/Concelier/StellaOps.Concelier.Backfill/StellaOps.Concelier.Backfill.csproj -- --mode=observations --batch-size=500 --max-conflicts=0 --mongo "$STAGING_MONGO_URI" "${EXTRA[@]}" | tee $ARTIFACT_DIR/backfill-observations.log dotnet run --project src/Concelier/StellaOps.Concelier.Backfill/StellaOps.Concelier.Backfill.csproj -- --mode=linksets --batch-size=500 --max-conflicts=0 --mongo "$STAGING_MONGO_URI" "${EXTRA[@]}" | tee $ARTIFACT_DIR/backfill-linksets.log - name: Validate counts env: STAGING_MONGO_URI: ${{ inputs.mongo_uri }} run: | STAGING_MONGO_URI="$STAGING_MONGO_URI" ops/devops/lnm/backfill-validation.sh - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: lnm-backfill-artifacts path: ${{ env.ARTIFACT_DIR }}