Repository navigation
feat(output): --select adds non-summary fields as columns, in select order - #455
Merged
neilmartin83 merged 2 commits intoOct 29, 2026
Merged
Conversation
ktn-jamf
force-pushed
the
feat/select-extra-columns
branch
from
October 26, 2026 22:43
e87c8f3 to
8d9a985
Compare
table, csv and plain output on a list command is a curated summary, so a --select path outside it was dropped without a word and the only route to the field was -o json | jq. AddSelectColumns resolves such a path against the full record and adds a column headed by the path; an array of scalars is joined with "; ". A path no record carries adds nothing, and the formatter now names a --select path that matched no field even when other paths did, for parsed JSON lists as well as rows. The OutputFormatter interface gains SelectPaths so the generated list commands can read the paths. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The renderers sorted columns alphabetically, so --select name,serial,x wrote x before serial and a consumer reading columns by position got the wrong one. columnKeys now orders by the select paths when one is set; a path naming an object keeps its flattened keys together. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
neilmartin83
force-pushed
the
feat/select-extra-columns
branch
from
October 28, 2026 18:17
8d9a985 to
eed3483
Compare
grahampugh
approved these changes
Oct 29, 2026
neilmartin83
added a commit
that referenced
this pull request
Oct 29, 2026
…ckage (#458) ## Problem Jamf Pro computes no hash for some large packages even after `cloudTransferStatus` is `READY` (reported in grahampugh/jamf-upload#418). Wire-checked on a Jamf Pro tenant reporting MD5 only: | | 300 MB | 2 GB | |---|---|---| | create | `md5` populated within the first polls | `READY`, every hash field empty, never filled | | replace (300 MB → 2 GB, same filename) | | old `md5` kept ~6 min during transfer, then cleared when `size` flipped; no new hash | Before this change `pro packages upload` polled for the full 10 minutes and ended on a generic "timed out" warning, exit 0. ## Change - Once the package is `READY` at the new file's size and no matching hash is present, allow a 20s grace (`verifyGrace`), then report the upload as **unverified** instead of waiting out `verifyTimeout`. - The warning distinguishes create, replace (previous hash cleared or left stale), and a replace where old and new sizes are identical, which size cannot confirm. - Exit code is unchanged (0, the file was uploaded). A hash mismatch still fails as before. - `previousHashes` records the record's prior `size`; `fileHashes` carries the local byte length. ## Stacked Based on `feat/select-extra-columns` (#455) so the `termSafe(err)` change on the same `WARNING:` line in #453 does not conflict. Merge after #455; the diff here is only `pro_packages_upload.go` and its test. ## Testing - `TestVerifyPackageUpload_UnverifiedWhenREADYAtTheRightSize` covers the three cases and asserts the wait ends at the grace, not the timeout. - `go test -count=1 ./internal/commands`, `make lint` (0 issues), `make fmt` clean. - Live, with a binary built from this branch at its first commit (45s grace, before it was shortened to 20s), against random 300 MB and 2 GB files (test packages since deleted). Poll counts below are at 45s; the warnings and the verified paths are unaffected by the shorter grace, which was not re-run live: - **Create 2 GB:** "READY and its size matches (2147483648 bytes), but Jamf Pro computed no hash for it; integrity NOT verified", after 7 polls. - **Replace 2 GB with an identical-size file:** "replaced by a file of identical size (2147483648 bytes), so the replace cannot be confirmed by size, and Jamf Pro computed no new hash; integrity NOT verified", after 6 polls. - **Replace 300 MB with 2 GB:** "…computed no hash for it (the previous hash was cleared or left stale by the replace); integrity NOT verified". The old MD5 lingered ~12 polls while READY, which is why the grace only starts once the size matches. - **Replace 2 GB with 300 MB:** verified normally ("Verified: server hash matches local hash") on the first poll, no warning. - **Create 300 MB:** verified on the first poll. - All exited 0 and none waited out the 10-minute timeout. - Grace is 20s because both 300 MB cases were verified on the first poll. Only a 300 MB size was measured on one tenant (MD5-only, S3-style); mid sizes between 300 MB and 1 GB are unmeasured. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Stacked on the
--pageprojection PR, which is stacked on #453.Problem
Table, csv and plain output on a list command is a curated summary row. A
--selectpath outside it was dropped without a word, and the only route to the field was-o json | jq:Columns were also always alphabetical, so
--select name,serial,xwrotexbeforeserial.Change
output.AddSelectColumnsresolves a--selectpath the summary does not carry against the full record and adds a column headed by the path. A path no record carries adds nothing."; ". Objects and arrays of objects stay compact JSON.--selectpath that matched no field even when other paths matched, for rows and for parsed JSON lists.--select's order (orderBySelect). Output change: with--select, columns were alphabetical and now follow the order given. Without--selectnothing changes.registry.OutputFormattergainsSelectPaths(); the Pro and Platform list templates pass it toselectTableColumns/platform.SelectTableColumns. Generated files are regenerated.Not covered
Hand-written renderers (
pro report,pro overview,config list) are #358. No--array-sepor per-element expansion.Verification
go test ./...,golangci-lint run,gofumptclean.pro-nmartin(two computers with capable users):Table output matches. The
"; "join for several users is covered by unit tests only.🤖 Generated with Claude Code
Related
--select.