Skip to content

feat(artifacts): list and download pipeline-run artifacts#42

Open
arseniy-pplx wants to merge 1 commit into
TangleML:masterfrom
arseniy-pplx:transfer/artifact-list-download
Open

feat(artifacts): list and download pipeline-run artifacts#42
arseniy-pplx wants to merge 1 commit into
TangleML:masterfrom
arseniy-pplx:transfer/artifact-list-download

Conversation

@arseniy-pplx

Copy link
Copy Markdown

Summary

  • extend tangle sdk artifacts get with --list, --out-dir, --only and --include-children
  • accept a run id or root execution id for listing and fetching artifact output
  • JSON-encode inline values as <name>.json; stream signed-URL content to a file with owner-only permissions on POSIX (0o600; Windows ACLs are not adjusted) under a sanitized artifact name
  • refuse symlinks, collisions and path traversal; check the initial signed-URL host and every redirect hop against loopback, private, link-local and CGNAT address literals by default
  • validate --query top-level and nested shapes (tasks/executions/components/artifact_ids) as clean CLI errors; null per-entry output filters mean all outputs (same as []), and an explicit --query '{}' is a valid empty query rather than a missing one
  • add the public TangleApiClient.request_raw seam so artifact fetching does not depend on private client methods

Context

The current CLI reports artifact metadata but cannot retrieve artifact contents. This completes the pipeline-run output workflow while keeping large files streaming and applying conservative filesystem, redirect and error-redaction safeguards. Self-hosted deployments with private-network object storage can opt out with TANGLE_ALLOW_INTERNAL_ARTIFACT_HOSTS=1; the host-literal guard is a conservative default, not a DNS-rebinding defense.

Testing

  • uv run pytest tests/test_artifacts.py tests/test_artifacts_cli.py tests/test_client.py
  • uvx ruff check on the touched source files
  • uv lock --check
  • git diff --check

Extend tangle sdk artifacts get with list, out-dir, only and include-children modes. Inline values are JSON-encoded; signed-URL content streams to owner-only (POSIX 0o600) files with path, collision, symlink, redirect and internal-address checks. Signed URLs are redacted from errors. Query top-level and nested shapes are validated as clean errors, null per-entry output filters select all outputs (same as an empty list), and an explicit empty --query object stays distinct from an absent one. A public TangleApiClient.request_raw seam keeps artifact fetching independent of private client methods.
@arseniy-pplx
arseniy-pplx marked this pull request as ready for review July 20, 2026 18:10
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.

1 participant