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

Error: /bin/sh: 1: az: not found in v1.0.5 #62

Closed
jnsvd opened this issue Nov 15, 2021 · 2 comments
Closed

Error: /bin/sh: 1: az: not found in v1.0.5 #62

jnsvd opened this issue Nov 15, 2021 · 2 comments
Assignees
Labels
need-to-triage Requires investigation

Comments

@jnsvd
Copy link

jnsvd commented Nov 15, 2021

We're getting the following output in the pipeline run logs since v1.0.5 is released:

Run azure/CLI@v1
  with:
    inlineScript: az login --identity --only-show-errors
  echo "TOKEN=$(az acr login --name <redacted>.azurecr.io \
      --expose-token \
      --output tsv \
      --query accessToken \
      --only-show-errors)" >> $GITHUB_ENV

    azcliversion: agentazcliversion
  env:
    EXPOSE_DOMAIN_NAME: <redacted>
    ACR_RELEASE: <redacted>.azurecr.io
    ENVIRONMENT_REPOSITORY_STAGING: <redacted>
    VERSION: 2.0.259
    POI_REGISTRY: <redacted>.azurecr.io
    JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.13-8/x64
Error: Error: Command failed: az version
/bin/sh: 1: az: not found

Error: /bin/sh: 1: az: not found

Warning: Error: EISDIR: illegal operation on a directory, unlink '/runner/_work/_temp'
cleaning up container...
Warning: Error: No such container: MICROSOFT_AZURE_CLI_1636963334349_CONTAINER

(node:12389) UnhandledPromiseRejectionWarning: Error: Command failed: az version
/bin/sh: 1: az: not found

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)
(node:12389) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12389) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

When using previous version 1.0.4 (by configuring uses: azure/CLI@1.0.4) no such errors are observed and the build is completing successfully.

@jnsvd jnsvd added the need-to-triage Requires investigation label Nov 15, 2021
@t-dedah
Copy link
Contributor

t-dedah commented Nov 15, 2021

Hi @jnsvd We released a new version v1.0.6 with a fix for the above issue. Please test and let us know if you are still facing the issue.

PS - v1 is now pointing to v1.0.6 so the above workflow requires no changes.

@jnsvd
Copy link
Author

jnsvd commented Nov 15, 2021

@t-dedah I confirm the fix is working, thank you for the fast response!

@jnsvd jnsvd closed this as completed Nov 15, 2021
avaitonis added a commit to UK-Export-Finance/mdm-api that referenced this issue Mar 29, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [Azure/cli](https://togithub.com/Azure/cli) | action | patch | `1.0.4`
-> `v1.0.7` |
| [node](https://togithub.com/nodejs/node) | stage | minor |
`18.9-alpine3.16` -> `18.15-alpine3.16` |

---

### Release Notes

<details>
<summary>Azure/cli</summary>

### [`v1.0.7`](https://togithub.com/Azure/cli/releases/tag/v1.0.7):
GitHub Action for Azure CLI v1.0.7

[Compare Source](https://togithub.com/Azure/cli/compare/v1.0.6...v1.0.7)

-   Upgraded action to use node 16 instead of node 12
- Upgrade [@&#8203;actions/core](https://togithub.com/actions/core) to
^1.10.0
- Resolved other minor issues like
[Azure/cli#87
and
[Azure/cli#84

### [`v1.0.6`](https://togithub.com/Azure/cli/releases/tag/v1.0.6):
GitHub Action for Azure CLI v1.0.6

[Compare Source](https://togithub.com/Azure/cli/compare/v1.0.5...v1.0.6)

Resolved customer issue: `Error: /bin/sh: 1: az: not found in v1.0.5`
[Azure/cli#62

### [`v1.0.5`](https://togithub.com/Azure/cli/releases/tag/v1.0.5):
GitHub Action for Azure CLI v1.0.5

[Compare Source](https://togithub.com/Azure/cli/compare/1.0.4...v1.0.5)

Resolved compatibility issues between az cli version on agent and
container.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/UK-Export-Finance/mdm-api).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMi4xIiwidXBkYXRlZEluVmVyIjoiMzUuMjIuMSJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-to-triage Requires investigation
Projects
None yet
Development

No branches or pull requests

3 participants