Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

deperecated dependency: 100% failure #124

Closed
2 of 3 tasks
bilelmoussaoui opened this issue Nov 16, 2020 · 5 comments
Closed
2 of 3 tasks

deperecated dependency: 100% failure #124

bilelmoussaoui opened this issue Nov 16, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@bilelmoussaoui
Copy link

bilelmoussaoui commented Nov 16, 2020

Do the checklist before filing an issue:

Description

A clear and concise description of what the bug is.

See https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

and #114 for a PR that fixes the issue

Workflow code

Paste that part of your workflow yaml file that causes the bug in here.

Alternatively you can remove that code block and insert direct link to your workflow file.
Ensure that link points to the specific commit, and not just to the master branch.

Action output

/usr/bin/docker exec  d25f5c30aa8e784012badcab5bc6344c4bce5a4c72f595ca756380dfab46bd95 sh -c "cat /etc/*release | grep ^ID"
/__w/_temp/42a68bee-6546-42ed-9628-d75de2498306 --default-toolchain none -y
info: downloading installer
error: $HOME differs from euid-obtained home directory: you may be using sudo
error: $HOME directory: /github/home
error: euid-obtained home directory: /root
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: skipping toolchain installation


Rust is installed now. Great!

To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done
automatically.

To configure your current shell run source $HOME/.cargo/env
Error: Unable to process command '::add-path::/github/home/.cargo/bin' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Expected behavior

The $PATH to be properly set

Additional context

This will causes a lot of breakages out there I guess :P

@bilelmoussaoui bilelmoussaoui added the bug Something isn't working label Nov 16, 2020
wez added a commit to wezterm/wezterm that referenced this issue Nov 17, 2020
GitHub made a breaking change, and this may get us through
until this action is updated.

refs: actions-rs/toolchain#114
refs: actions-rs/toolchain#124
@wez
Copy link

wez commented Nov 17, 2020

There's more to resolving this than just bumping the dep.

Here's the workaround I'm going to use for the moment:

diff --git a/.github/workflows/gen_centos7.yml b/.github/workflows/gen_centos7.yml
index 94fefcb6..8419966d 100644
--- a/.github/workflows/gen_centos7.yml
+++ b/.github/workflows/gen_centos7.yml
@@ -53,12 +53,14 @@ jobs:
       shell: bash
       run: "git fetch --prune --unshallow"
     - name: "Install Rust"
-      uses: actions-rs/toolchain@v1
+      uses: actions-rs/toolchain@dependabot/npm_and_yarn/actions/core-1.2.6
       with:
          profile: "minimal"
          toolchain: "stable"
          override: true
          components: "rustfmt"
+      env:
+         ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
     - name: "Cache cargo"
       uses: actions/cache@v2
       with:

I think the full and righteous fix is to update the dep and to adjust the action to use the environment file mentioned on the linked documentation.

@wez
Copy link

wez commented Nov 17, 2020

I would advocate for renaming this issue: actions-rs/toolchain 100% failure rate for all users so that it doesn't get lost in the dependabot noise.

@bilelmoussaoui bilelmoussaoui changed the title Bump actions/core to 1.2.6 actions-rs/toolchain 100% failure rate for all users Nov 17, 2020
wez added a commit to wezterm/wezterm that referenced this issue Nov 17, 2020
* speculative fix for CI

GitHub made a breaking change, and this may get us through
until this action is updated.

refs: actions-rs/toolchain#114
refs: actions-rs/toolchain#124
@bilelmoussaoui
Copy link
Author

I would advocate for renaming this issue: actions-rs/toolchain 100% failure rate for all users so that it doesn't get lost in the dependabot noise.

Thanks. I have been looking at the source code on where the add-path is used without any luck.

@bilelmoussaoui bilelmoussaoui changed the title actions-rs/toolchain 100% failure rate for all users deperecated dependency: 100% failure Nov 17, 2020
ubnt-intrepid added a commit to ubnt-intrepid/polyfuse that referenced this issue Nov 17, 2020
@svartalf
Copy link
Member

Thank you for notification, @bilelmoussaoui! Fix was added and released as a new @v1 version; I apologize for not handling this deprecation issue earlier.

Can anyone in this thread additionally confirm that it works for them now?

@bilelmoussaoui
Copy link
Author

@svartalf thanks a lot for the quick fix, can confirm it works fine now 👍

wez added a commit to wezterm/wezterm that referenced this issue Nov 17, 2020
I don't think that actions-rs/toolchain#124
is 100% fixed, but this should fix our CI in the meantime.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants