Skip to content

feat(labels): add explicit remote label push command#65

Merged
TrevorBasinger merged 1 commit intomainfrom
tb/label-remote-push
Apr 17, 2026
Merged

feat(labels): add explicit remote label push command#65
TrevorBasinger merged 1 commit intomainfrom
tb/label-remote-push

Conversation

@TrevorBasinger
Copy link
Copy Markdown
Member

Summary

Add an explicit roar label push flow for mutating current remote labels without changing existing local-first roar label set behavior.

This wires roar to the new GLaaS API PATCH /api/v1/labels/current route and keeps the first client slice tightly scoped:

  • local label mutation remains local-only by default
  • remote mutation is explicit via roar label push
  • only current local user-managed labels are pushed
  • reserved/system-managed labels are excluded from remote mutation payloads

What changed

  • add roar label push <dag|job|artifact> <target>
  • add query-layer request/summary support for label push
  • add GLaaS client support for patching current labels
  • resolve DAG/job remote targets using register-equivalent canonical session hashes
  • patch remote labels with filtered user-managed metadata only
  • update fake GLaaS test server with PATCH /api/v1/labels/current
  • add focused query and CLI/integration coverage
  • document the new explicit push command in the README

Behavior notes

  • roar label set is unchanged and remains local-only
  • remote mutation uses patch-merge semantics from GLaaS
  • first-write remote creation is still not supported; if no remote current labels exist yet, GLaaS returns 404
  • DAG/job pushes target the same canonical session hash used by register/publish flows
  • artifact pushes target the artifact content hash
  • reserved/system labels are not sent to the remote API

Testing

Ran:

  • ruff check .
  • ruff format --check .
  • mypy roar
  • pytest tests/application/query/test_label.py tests/unit/test_label_service.py tests/integration/test_label_push_cli_integration.py tests/integration/test_put_cli_integration.py tests/happy_path/test_label_command.py

Also ran:

  • pytest -m "not live_glaas and not ebpf"

That broader run passed except for one unrelated environment-specific OSMO wheel/platform failure:

  • tests/backends/osmo/test_osmo_smoke.py::test_osmo_basic_workflow_submit_and_complete

@TrevorBasinger TrevorBasinger marked this pull request as ready for review April 17, 2026 19:47
Copy link
Copy Markdown
Member

@christophergeyer christophergeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super ! 🚢 it

@TrevorBasinger TrevorBasinger merged commit 6fbeac0 into main Apr 17, 2026
12 checks passed
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