Firstyear / obs-service-cargo

OBS Source Service and utilities for Rust software packaging
Mozilla Public License 2.0
15 stars 9 forks source link

Service fails when vendoring devpod #85

Closed johanneskastl closed 1 month ago

johanneskastl commented 1 month ago

I wanted to use the service to vendor the rust-related dependencies for devpod that I am currently trying to package.

Unfortunately the service errors out:

merge: origin/v0.5.8 - not something we can merge
Already up to date.
f272463b3f136daf38abcee2dfc4427e1722f896
2024-05-25T14:59:25.665839Z  INFO cargo_vendor: 🎒 Starting OBS Service Cargo Vendor.
2024-05-25T14:59:25.665860Z  WARN cargo_vendor: ⚠  Cargo Vendor has been rewritten in rust!

This rewrite introduces some small changes to how vendoring functions for your package.

* cargo_config is no longer created - it's part of the vendor.tar now
    * You can safely remove lines related to cargo_config from your spec file

* multiple cargotoml files can be specified and share a single vendor.tar
    * If multiple cargo.toml files are present update does not work. This is a known
      limitation of the process

* cargo_audit is now part of cargo_vendor, meaning you don't have to configure it separately

2024-05-25T14:59:25.665933Z  INFO obs_service_cargo::utils: 🍿 Vendoring for src 'devpod'
2024-05-25T14:59:25.971239Z  INFO obs_service_cargo::utils: πŸ“— Project does not use a workspace!
2024-05-25T14:59:25.971449Z  INFO obs_service_cargo::vendor: ⏫ Updating dependencies before vendor
2024-05-25T14:59:26.959466Z ERROR obs_service_cargo::utils: stdoutput=""
2024-05-25T14:59:26.959534Z ERROR obs_service_cargo::utils: stderrput="    Updating crates.io index\n    Updating git repository `https://github.com/tauri-apps/plugins-workspace`\nerror: failed to get `tauri-plugin-log` as a dependency of package `devpod-desktop v0.1.0 (/tmp/.obs-service-cargo-vendornccuCi74/devpod/desktop/src-tauri)`\n\nCaused by:\n  failed to load source for dependency `tauri-plugin-log`\n\nCaused by:\n  Unable to update https://github.com/tauri-apps/plugins-workspace?branch=dev\n\nCaused by:\n  failed to find branch `dev`\n\nCaused by:\n  cannot locate remote-tracking branch 'origin/dev'; class=Reference (4); code=NotFound (-3)\n"
2024-05-25T14:59:26.959701Z ERROR obs_service_cargo::vendor: err=Failed to run command `cargo update`. Has exit code `101`. Standard Output Error: 
2024-05-25T14:59:26.959738Z ERROR obs_service_cargo::cli: err=kind: cargo vendor process failed
reason: Unable to execute cargo
2024-05-25T14:59:27.049904Z ERROR cargo_vendor: kind: cargo vendor process failed
reason: kind: cargo vendor process failed
reason: Unable to execute cargo
Error: kind: cargo vendor process failed
reason: kind: cargo vendor process failed
reason: Unable to execute cargo
Aborting: service call failed:  /usr/lib/obs/service/cargo_vendor --update true --src devpod --cargotoml desktop/src-tauri/Cargo.toml --outdir /home/Buildservice/Branches/Branch_devel_kubic/devpod/tmpl9pyyi1k.cargo_vendor.service

This is the configuration I used:

<services>
  <service name="obs_scm" mode="manual">
    <param name="url">https://github.com/loft-sh/devpod</param>
    <param name="scm">git</param>
    <param name="exclude">.git</param>
    <param name="revision">v0.5.8</param>
    <param name="versionformat">@PARENT_TAG@</param>
    <param name="changesgenerate">enable</param>
    <param name="versionrewrite-pattern">v(.*)</param>
  </service>
  <service name="set_version" mode="manual">
  </service>
  <service name="cargo_vendor" mode="manual">
    <param name="update">true</param>
    <param name="src">devpod</param>
    <param name="cargotoml">desktop/src-tauri/Cargo.toml</param>
  </service>
  <service name="go_modules" mode="manual">
  </service>
  <!-- services below are run at buildtime -->
  <service name="tar" mode="buildtime"/>
  <service name="recompress" mode="buildtime">
    <param name="file">*.tar</param>
    <param name="compression">gz</param>
  </service>
</services>

Not sure if this is an error on my side (most probably), the service or upstream.

Can you have a look, please?

Kind Regards Johannes

johanneskastl commented 1 month ago

I opened an issue with devpod, as (to me) it looks like a reference to a no-longer-existing branch (cannot locate remote-tracking branch 'origin/dev').

Firstyear commented 1 month ago

Yeah, this appears to be a devpod issue