Repository navigation
Conversation
… honour --output json (#1014)
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Fixes #1014
Stacked on #1016 (fix/1013), which is stacked on #1012 (fix/989) and the pipeline stack #988 → #980 → #972 → #957 → #942 → #931. The diff here is only the top commit.
What
spawn pipeline statusnow prints the run id thatspawn pipeline collect --runtakes, and lists the pipeline's other runs:ListObjectsV2per 1000 runs, of the common prefixes under<s3_prefix>/runs/ins3_bucket. That is the same listingcollectalready used for its no-outputs hint, now exported aspipeline.ListRunIDs(pkg/pipelineis not on the public surface).Run: - (launched before run ids; collect it without --run).s3:ListBucketon the bucket) does not failstatus. It prints a warning on stderr and shows the rest.JSON:
statusused to ignore--output jsonentirely and always print text. It now prints the stored record, aspipeline list --output jsondoes, plus two fields:run_idis always present. It is""on a legacy record; the record itself omits it when empty.runsholds every run id found, oldest first. It is[]when there are none, andnullwithruns_errorset when the runs could not be listed.status --helpanddocs-gen/pipeline.mddescribe this, andexamples/pipelines/README.mdnow says where to find run ids.Tests
cmd/pipeline_status_test.gocovers:run_id,runs,runs_error, the record's own fields);statusRunIDs/ListRunIDsagainst a two-page fake S3: the bucket, thepfx/runs/prefix, the/delimiter, every page, and[]notnilfor an empty listing.I checked each assertion against a revert that compiles. There were eight reverts (drop the Run line; drop the other-runs block; skip JSON; drop the
run_idoverride; nil empty listing; keeprunson error; oldest-first order; cap that keeps the oldest). Each one made at least one test fail, and none of them failed to build.make check: everything passes except the known Docker-onlyTestGenerateWrapper_ChownFixesCrossUIDStickyUnlink_Docker(no Docker here).make check-nested: all 9 modules clean.make check-docs: clean. Semgrep--config=autoon the changed files: 0 findings.Not covered
runStatusPipeline's own wiring (DynamoDB get → S3 list →writePipelineStatuswithgetOutputFormat() == "json") is not exercised: that would need AWS, and no AWS resources were used. This PR is CLI-only, so no Lambda redeploy is needed.