Skip to content

fix: cloud runs resolve the pipeline by repo identity#139

Merged
markovejnovic merged 2 commits into
mainfrom
fix/cloud-pipeline-resolution
Jun 11, 2026
Merged

fix: cloud runs resolve the pipeline by repo identity#139
markovejnovic merged 2 commits into
mainfrom
fix/cloud-pipeline-resolution

Conversation

@markovejnovic

@markovejnovic markovejnovic commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Draft — blocked on a crates.io publish. See "Release ordering" below. CI is red until harmont-cloud 0.1.3 is published.

What

hm run --backend cloud 404'd with pipeline_not_found: the CLI sent the bare DSL slug (ci), but the org's pipeline is stored under the namespaced global slug (harmont-dev-harmont-cli-ci, from GitHub discovery). The CLI never knew the global slug.

This derives owner/repo from the worktree's git remote and submits via the new SDK submit_repo_buildPOST /api/v0/organizations/:org/builds, which resolves the pipeline by (repo_name, source_slug). Watch/cancel/log endpoints are still addressed by the global slug — so the CLI now takes that slug from the pipeline_slug the server returns on the created build.

A remoteless worktree (no origin) fails cloud runs with a clear doctrine error instead of a confusing 404.

Changes

  • parse_repo_name + git_remote_repo_name (hm/src/commands/run/mod.rs) + unit tests covering https/ssh/scp/unparseable.
  • SourceMeta.repo_name: Option<String>; populated from the git remote.
  • CloudBackend submits NewRepoBuild and watches/cancels by build.pipeline_slug.

No Cargo.toml change needed: the existing harmont-cloud = "0.1" requirement already covers the new 0.1.3 (the SDK change is additive → a patch bump).

⚠️ Release ordering

The Rust SDK is consumed from crates.io, but 0.1.3 (with submit_repo_build + Build.pipeline_slug) is not published yet — its source is in the companion simci PR #77. To finish:

  1. Merge simci PR feat(sdk): rename TS package to @harmont/hm; fix example .py pipelines #77.
  2. Publish harmont-cloud-raw@0.1.3 then harmont-cloud@0.1.3 to crates.io.
  3. Here: cargo update -p harmont-cloud -p harmont-cloud-raw to pull 0.1.3 into Cargo.lock, then mark ready. CI goes green.

Verification

Locally verified green against the unpublished SDK via a temporary [patch.crates-io] path override (removed before commit): cargo build, cargo clippy --all-targets -- -D warnings, and cargo test (191 passed) all clean.

🤖 Generated with Claude Code

hm run derives owner/repo from the git remote and submits via
submit_repo_build (POST /organizations/:org/builds), which resolves the
pipeline by (repo_name, source_slug). Watch/cancel use the global slug the
server returns on the build.
@markovejnovic markovejnovic force-pushed the fix/cloud-pipeline-resolution branch from ebb91a5 to a85a867 Compare June 11, 2026 00:35
repo+source build submission is now available from crates.io.
@markovejnovic markovejnovic marked this pull request as ready for review June 11, 2026 00:40
@markovejnovic markovejnovic merged commit 36a52b7 into main Jun 11, 2026
16 of 18 checks passed
@markovejnovic markovejnovic deleted the fix/cloud-pipeline-resolution branch June 11, 2026 00:42
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