Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: don't give up if installing optional dependencies fails #860

Closed
nlsandler opened this issue Sep 9, 2024 · 1 comment · Fixed by #879
Closed

Suggestion: don't give up if installing optional dependencies fails #860

nlsandler opened this issue Sep 9, 2024 · 1 comment · Fixed by #879
Labels
bug Something isn't working upstream

Comments

@nlsandler
Copy link

Currently, if installing a dependency fails, including optional dependencies like darcs and mercurial, the entire action fails. It would be useful if the action continued instead of giving up after failing to install an optional dependency, so it can still be used in cases where, for whatever reason, these can't be installed.

For example, this action currently doesn't work on the Ubuntu 24.04 image because of actions/runner-images#10476. Using this on the ubuntu-24.04 image results in:

  /usr/bin/sudo apt-get --yes install bubblewrap darcs g++-multilib gcc-multilib mercurial musl-tools rsync
  Reading package lists...
  Building dependency tree...
  Reading state information...
  Package darcs is not available, but is referred to by another package.
  This may mean that the package is missing, has been obsoleted, or
  is only available from another source
  
  E: Package 'darcs' has no installation candidate
Error: The process '/usr/bin/sudo' failed with exit code 100

The full logs of the failing job is here.

This is an issue with the Ubuntu image rather than the setup-ocaml action, but it would be nice if this action were better able to recover from this sort of issue.

@shym
Copy link

shym commented Sep 11, 2024

I ended up in exactly the same in a case where I need to use the 24.04 image to get more recent packages that I need to run my tests. I worked around the problem by using a simple script called sudo and prepended in $PATH to install only what is available.
But beyond that use case, it could make sense to expose a key to tune the list of packages that should be installed, so that you could avoid installing optional packages, even when available, if you know you won’t need them (to save time, network, energy, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants