codecov-circleci-orb icon indicating copy to clipboard operation
codecov-circleci-orb copied to clipboard

[BUG] Broken on Alpine

Open chipshort opened this issue 11 months ago • 4 comments

Describe the bug

The orb doesn't work if it's run inside an Alpine Linux Docker image.

     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
                            Wrapper-0.1.0
                                  
==> Bypassing validation...
/bin/sh: syntax error: unexpected "("

Exited with code exit status 2

To Reproduce

Use this job definition on the https://github.com/CosmWasm/cosmwasm repo.

  coverage:
    docker:
      - image: rust:1.84.1-alpine3.21
    environment:
      # Limit the number of parallel jobs to avoid OOM crashes during doc testing
      RUST_TEST_THREADS: 8
    resource_class: medium+
    steps:
      - checkout
      - run:
          name: Install necessary packages
          command: |
            apk update
            apk add mold clang curl coreutils llvm19-dev zlib-static clang19-static
      - run:
          name: Install grcov
          command: |
            rustup component add llvm-tools-preview
            cargo install grcov --locked
      - run:
          name: Install codecov uploader
          command: |
            #download Codecov CLI
            curl -Os https://cli.codecov.io/v10.1.0/alpine/codecov
            chmod +x codecov
            ./codecov --help
      - run:
          name: Run tests with coverage
          command: |
            mkdir -p reports
            cargo test -p cosmwasm-crypto --all-features

            grcov . -s packages/crypto --binary-path ./target/debug -t lcov -o ./reports/crypto.info
          environment:
            RUSTFLAGS: "-Clinker=clang -Clink-arg=-fuse-ld=/usr/bin/mold -Cinstrument-coverage"
            LLVM_PROFILE_FILE: "cosmwasm-%p-%m.profraw"
      - codecov/upload:
          binary: ./codecov
          files: reports/crypto.info
          disable_search: true
          flags: cosmwasm-crypto

Regression

This used to work with orb version 4.1.0

Versions

See the job definition. Use the latest version of the orb:

orbs:
  codecov: codecov/[email protected]

Commit and CI link

https://github.com/CosmWasm/cosmwasm/pull/2391/commits/593199dc91078f1335b7ad0f959398563e36999d

Additional context

The problem seems very similar to this issue: https://github.com/codecov/codecov-circleci-orb/issues/8

chipshort avatar Feb 20 '25 17:02 chipshort

@chipshort can you run this with verbose: true?

thomasrockhu-codecov avatar Feb 20 '25 21:02 thomasrockhu-codecov

Hi, verbose produces the same output: https://app.circleci.com/pipelines/github/CosmWasm/cosmwasm/8531/workflows/fd14d111-8b54-4573-84a4-a349aa5dfc7a/jobs/138206

     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
                            Wrapper-0.1.0
                                  
==> Bypassing validation...
/bin/sh: syntax error: unexpected "("

Exited with code exit status 2

Corresponding commit: https://github.com/CosmWasm/cosmwasm/commit/78e360e177383266adb3ba12828bf980c6e3e05f

chipshort avatar Feb 21 '25 12:02 chipshort

@chipshort the wrapper is not meant to be run like this. I would suggest either running the CLI as is or use the orb

thomasrockhu-codecov avatar Feb 27 '25 21:02 thomasrockhu-codecov

I tried using the CLI directly first, but couldn't get it to work. I'll try again soon. I would use the orb if it was working, but it's not. That's the point of this issue.

chipshort avatar Mar 03 '25 08:03 chipshort