Skip to content

chore: fix registry test filter#5942

Merged
jdx merged 8 commits into
jdx:mainfrom
risu729:registry-test-fix
Aug 7, 2025
Merged

chore: fix registry test filter#5942
jdx merged 8 commits into
jdx:mainfrom
risu729:registry-test-fix

Conversation

@risu729

@risu729 risu729 commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Resolves #5914 (comment).

It failed with a mise error, and I didn't set pipefail, so it continued with an error.

The mise error seems to occur when mise exec is called with a < redirect, or mise exec is called twice in a row.
I don't have any ideas what's happening and I don't think it's a common problem, so I fix the workflow by installing the tools before mise exec, which works fine as a workaround.

action log
+++ mise x yj -- yj -t
DEBUG Version: 2025.8.7 linux-x64 (2025-08-06)
DEBUG Version: 2025.8.7 linux-x64 (2025-08-06)
DEBUG Version: 2025.8.7 linux-x64 (2025-08-06)
DEBUG ARGS: mise x yj -- yj -t
DEBUG ARGS: mise x jd -- jd -f merge /dev/fd/63 /dev/fd/62
DEBUG ARGS: mise x yj -- yj -t
DEBUG config: ~/work/mise/mise/mise.toml
DEBUG config: ~/work/mise/mise/mise.toml
DEBUG config: ~/work/mise/mise/mise.toml
DEBUG config: ~/work/mise/mise/mise.toml
DEBUG EnvResults { env_paths: ["/home/runner/work/mise/mise/target/debug", "/home/runner/work/mise/mise/node_modules/.bin"] }
DEBUG GET http://mise-versions.jdx.dev/yj
DEBUG starting new connection: http://mise-versions.jdx.dev/
DEBUG GET http://mise-versions.jdx.dev/yj
DEBUG starting new connection: http://mise-versions.jdx.dev/
DEBUG GET http://mise-versions.jdx.dev/jd
DEBUG starting new connection: http://mise-versions.jdx.dev/
DEBUG GET http://mise-versions.jdx.dev/yj 200 OK
DEBUG install_some_versions: yj@latest
INFO  yj@5.1.0               install
DEBUG GET https://api.github.com/repos/sclevine/yj/releases
DEBUG starting new connection: https://api.github.com/
DEBUG GET http://mise-versions.jdx.dev/jd 200 OK
DEBUG install_some_versions: jd@latest
INFO  jd@2.2.3               install
DEBUG GET https://api.github.com/repos/josephburnett/jd/releases
DEBUG starting new connection: https://api.github.com/
DEBUG GET http://mise-versions.jdx.dev/yj 200 OK
DEBUG install_some_versions: yj@latest
INFO  yj@5.1.0               install
DEBUG waiting for lock on ~/.cache/mise/lockfiles/5d784cf5eb0ef75e
DEBUG GET https://api.github.com/repos/sclevine/yj/releases 200 OK
DEBUG GET https://api.github.com/repos/sclevine/yj/releases/tags/v5.1.0
DEBUG GET https://api.github.com/repos/josephburnett/jd/releases 200 OK
DEBUG GET https://api.github.com/repos/josephburnett/jd/releases/tags/v2.2.3
DEBUG GET https://api.github.com/repos/sclevine/yj/releases/tags/v5.1.0 200 OK
INFO  yj@5.1.0               download yj-linux-amd64
DEBUG GET Downloading https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64 to ~/.local/share/mise/downloads/yj/5.1.0/yj-linux-amd64
DEBUG GET https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64
DEBUG starting new connection: https://github.com/
DEBUG GET https://api.github.com/repos/josephburnett/jd/releases/tags/v2.2.3 200 OK
INFO  jd@2.2.3               download jd-amd64-linux
DEBUG GET Downloading https://github.com/josephburnett/jd/releases/download/v2.2.3/jd-amd64-linux to ~/.local/share/mise/downloads/jd/2.2.3/jd-amd64-linux
DEBUG GET https://github.com/josephburnett/jd/releases/download/v2.2.3/jd-amd64-linux
DEBUG starting new connection: https://github.com/
DEBUG starting new connection: https://release-assets.githubusercontent.com/
DEBUG GET https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64 200 OK
INFO  yj@5.1.0               generate checksum yj-linux-amd64
INFO  yj@5.1.0               record size yj-linux-amd64
INFO  yj@5.1.0               extract yj-linux-amd64
INFO  yj@5.1.0             ✓ installed
INFO  yj@5.1.0               download yj-linux-amd64
DEBUG config: ~/work/mise/mise/mise.toml
DEBUG [aqua:sclevine/yj@5.1.0] list_bin_paths: ["/home/runner/.local/share/mise/installs/yj/5.1.0"]
DEBUG GET Downloading https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64 to ~/.local/share/mise/downloads/yj/5.1.0/yj-linux-amd64
DEBUG GET https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64
DEBUG starting new connection: https://github.com/
DEBUG updating 1 lockfiles
WARN  missing: yj@5.1.0
DEBUG EnvResults { env_paths: ["/home/runner/work/mise/mise/target/debug", "/home/runner/work/mise/mise/node_modules/.bin"] }
Error: 
   0: "yj" couldn't exec process: No such file or directory

Location:
   src/cli/exec.rs:128

Version:
   2025.8.7 linux-x64 (2025-08-06)

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 2 frames hidden ⋮                               
   3: mise::cli::exec::Exec::run::{{closure}}::{{closure}}::h1c9b1ce63df8dc51
      at <unknown source file>:<unknown line>
   4: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::hfbf1dfa1c7124c54
      at <unknown source file>:<unknown line>
   5: mise::cli::exec::Exec::run::{{closure}}::hc16abb7e85b66888.49755<unknown>
      at <unknown source file>:<unknown line>
   6: mise::cli::Commands::run::{{closure}}::h83731c52b0c1d2f1.49732<unknown>
      at <unknown source file>:<unknown line>
   7: mise::cli::Cli::run::{{closure}}::ha0cdb2b6709825cd.49694<unknown>
      at <unknown source file>:<unknown line>
   8: tokio::runtime::runtime::Runtime::block_on::h1670429a1ee5f4e5
      at <unknown source file>:<unknown line>
   9: mise::main::h5952510e40af4251
      at <unknown source file>:<unknown line>
  10: std::sys::backtrace::__rust_begin_short_backtrace::h397b2a66038df40e
      at <unknown source file>:<unknown line>
  11: main<unknown>
      at <unknown source file>:<unknown line>
  12: __libc_start_main<unknown>
      at <unknown source file>:<unknown line>
  13: _start<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
DEBUG starting new connection: https://release-assets.githubusercontent.com/
DEBUG starting new connection: https://release-assets.githubusercontent.com/
DEBUG GET https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64 200 OK
DEBUG GET https://github.com/josephburnett/jd/releases/download/v2.2.3/jd-amd64-linux 200 OK
INFO  yj@5.1.0               generate checksum yj-linux-amd64
INFO  yj@5.1.0               record size yj-linux-amd64
INFO  yj@5.1.0               extract yj-linux-amd64
INFO  yj@5.1.0             ✓ installed
DEBUG config: ~/work/mise/mise/mise.toml
DEBUG [aqua:sclevine/yj@5.1.0] list_bin_paths: ["/home/runner/.local/share/mise/installs/yj/5.1.0"]
DEBUG updating 1 lockfiles
DEBUG EnvResults { env_paths: ["/home/runner/work/mise/mise/target/debug", "/home/runner/work/mise/mise/node_modules/.bin"] }
INFO  jd@2.2.3               generate checksum jd-amd64-linux
INFO  jd@2.2.3               record size jd-amd64-linux
INFO  jd@2.2.3               extract jd-amd64-linux
INFO  jd@2.2.3             ✓ installed
DEBUG config: ~/work/mise/mise/mise.toml
DEBUG [aqua:josephburnett/jd@2.2.3] list_bin_paths: ["/home/runner/.local/share/mise/installs/jd/2.2.3"]
DEBUG updating 1 lockfiles
DEBUG EnvResults { env_paths: ["/home/runner/work/mise/mise/target/debug", "/home/runner/work/mise/mise/node_modules/.bin"] }

@risu729 risu729 changed the title chore: enable pipefail in registry test chore: fix registry test filter Aug 6, 2025
@risu729 risu729 marked this pull request as ready for review August 6, 2025 18:44
Copilot AI review requested due to automatic review settings August 6, 2025 18:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a registry test filter workflow by addressing a mise exec error that occurred when using redirects or calling mise exec multiple times. The fix involves pre-installing tools to avoid the problematic mise exec behavior.

  • Pre-install required tools (jd and yj) before executing commands
  • Add explicit shell configuration with pipefail option
  • Add debug output to display changed tools

Comment thread .github/workflows/registry.yml
@jdx

jdx commented Aug 6, 2025

Copy link
Copy Markdown
Owner

bugbot run

with:
install_args: jd yj
- id: diff
shell: bash # -eo pipefail

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Pipeline Fails to Exit Early on Errors

The diff step's shell is set to bash, but the intended -eo pipefail flags (indicated by a comment) are missing. This prevents the step from failing fast on pipeline errors, which the PR description states was the exact issue this change aimed to fix.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

was this intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, but it's not necessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I didn't describe it well.
shell: bash uses bash --noprofile --norc -eo pipefail {0} instead of bash -e {0}.
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsshell

<(mise x yj -- yj -t < registry.toml) \
| jq -r '[.tools // {} | keys[]] | join(" ")' \
)
echo $changed_tools

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Debug Code Left in Workflow

The echo $changed_tools line in the workflow is debug code that was accidentally left in. It serves no functional purpose and adds unnecessary output to the CI logs.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

wrong

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I left it for debugging purposes in the future. Should I remove it?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I was saying cursor was wrong

@jdx jdx merged commit e214d94 into jdx:main Aug 7, 2025
32 of 33 checks passed
@risu729 risu729 deleted the registry-test-fix branch August 7, 2025 10:18
jdx pushed a commit that referenced this pull request Aug 11, 2025
### 📦 Registry

- add bob
([aqua:MordechaiHadad/bob](https://github.com/MordechaiHadad/bob)) by
[@TyceHerrman](https://github.com/TyceHerrman) in
[#5914](#5914)
- support usage on FreeBSD by [@risu729](https://github.com/risu729) in
[#5973](#5973)
- filter out installer for podman by
[@risu729](https://github.com/risu729) in
[#5974](#5974)
- use pipx aqua backend by [@itochan](https://github.com/itochan) in
[#5971](#5971)

### 📚 Documentation

- add documentation for os field in tool configuration by
[@jdx](https://github.com/jdx) in
[#5947](#5947)

### Chore

- **(ci)** accept @ in regular expressions for new registry PR titles by
[@mst-mkt](https://github.com/mst-mkt) in
[#5969](#5969)
- fix registry test filter by [@risu729](https://github.com/risu729) in
[#5942](#5942)
- fix registry test by [@risu729](https://github.com/risu729) in
[#5953](#5953)

### New Contributors

- @itochan made their first contribution in
[#5971](#5971)
- @mst-mkt made their first contribution in
[#5969](#5969)
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.

3 participants