Skip to content

feat(pro): packages upload goes straight to JCDS on a gateway profile whose distribution point is Jamf Cloud - #461

Merged
neilmartin83 merged 2 commits into
fix/gateway-upload-content-lengthfrom
feat/package-jcds-direct-upload
Oct 29, 2026
Merged

neilmartin83 merged 2 commits into
fix/gateway-upload-content-lengthfrom
feat/package-jcds-direct-upload

Conversation

@neilmartin83

Copy link
Copy Markdown
Member

Summary

On a platform gateway profile whose cloud distribution point is JAMF_CLOUD, pro packages upload now sends the binary to JCDS storage with the SDK's jcdsupload.Upload (POST /pro/v1/jcds/files, then S3) instead of POST /v1/packages/{id}/upload. The gateway is out of the data path, so its per-stream HTTP/2 window no longer limits the transfer. The existing refresh-inventory and hash-verification poll is unchanged. Same behaviour as terraform-provider-jamfplatform's feat/package-jcds-direct-upload.

  • Route choice (pro_packages_upload_route.go): the direct route needs the Platform SDK client, which exists only under gateway auth. It is taken only on a positive JAMF_CLOUD match. Instance profiles, other CDN types, unknown types and a failed read of the distribution point keep the API upload, because on any other distribution point the direct route leaves the file in JCDS storage and the record never links to it.
  • NONE preflight: a distribution point of NONE (or no record) is refused before the package record is created, since the upload could never be verified. A failed read does not refuse.
  • SDK pin: jamfplatform-go-sdk v1.11.0.

Stacked on fix/gateway-upload-content-length; retarget to main once that merges.

Test plan

  • go test ./..., go vet, gofmt
  • Unit tests: route per CDN type, NONE/absent refusal, failed read falls back to API, direct upload uses the file's base name
  • Live on an EU JAMF_CLOUD tenant (gateway profile) with -v: 1 MiB and 3 GiB files. GET /cloud-distribution-point, then POST /jcds/files, no /packages/{id}/upload; the 3 GiB run saw three 504s from refresh-inventory, then 204, and verified with a matching SHA3-512
  • Not exercised live: an S3 distribution point and an instance profile (covered by unit tests only)

Known: the SDK prints its own "returned Deprecation header" line to stderr on each direct upload. The CLI retry loop the provider has for failed uploads and the provider's NONE wording are not ported verbatim.

🤖 Generated with Claude Code

neilmartin83 and others added 2 commits October 28, 2026 18:17
… whose distribution point is Jamf Cloud

On the platform gateway a package upload is throttled by the gateway's
per-stream HTTP/2 window. When the tenant's cloud distribution point is
JAMF_CLOUD, send the binary to JCDS storage with jcdsupload.Upload (POST
/pro/v1/jcds/files, then S3) instead of POST /v1/packages/{id}/upload. The
existing refresh-inventory and hash verification poll is unchanged.

Only a gateway profile on JAMF_CLOUD takes the direct route. Instance
profiles, other CDN types, unknown types and a failed read of the
distribution point keep the API upload, because the direct route strands
the file in JCDS storage on any other distribution point.

A distribution point of NONE (or no record) is refused before the package
record is created, since the upload could never be verified.

Pins jamfplatform-go-sdk at v1.10.1-0.20261027182702-f6cb506dcae4, the
commit terraform-provider-jamfplatform uses, until a release carries
jcdsupload.

Wire-checked on an EU JAMF_CLOUD tenant with 1 MiB and 3 GiB files.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replaces the pseudo-version of the commit that first carried jcdsupload.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@neilmartin83
neilmartin83 force-pushed the feat/package-jcds-direct-upload branch from db5435c to efb7176 Compare October 28, 2026 18:17
@neilmartin83
neilmartin83 merged commit 22447e1 into main Oct 29, 2026
5 checks passed
@neilmartin83
neilmartin83 deleted the feat/package-jcds-direct-upload branch October 29, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants