Comments (24)
@umed i was also annoyed about building a docker image in my github workflow.
I don't really know why it's using docker for this... maybe to work on all operating systems.
In my case i use linux for building, i don't use this action anymore, i call the bash script directly. My job step looks like this:
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: |-
curl -s https://codecov.io/bash | bash -s -- \
-F "unittests" \
-Z || echo 'Codecov upload failed'
from codecov-action.
Hi all,
Sorry I've been so quiet on this thread, but I want y'all to know that your concerns about the Docker image have not fallen on deaf ears. We released a new version of our Action today that does not rely on Docker images anymore and is instead fully JavaScript based (@v1.0.4). It is significantly faster, has no lengthy image build times, and also includes support for macOS and Windows builds.
Ib
from codecov-action.
@teohhanhui I'd like to learn more on why it's not a trivial task.
If the concern is that the base image (debian:stretch-slim
) will drift apart from CodeCov requirements at some point and will no longer be compatible with code in entrypoint.sh
, then having a central build is strictly an improvement. The build will be broken, but at least the last successful image will be reused by CodeCov users.
Instead now, if such situation occurs, all users will be broken until you release a new version.
If the concern is to build CodeCov image every time debian image updates, then why not just put it on GitHub Actions or Docker Hub for automated build on a schedule, say, once a week?
from codecov-action.
This is normal for all actions that use a Dockerfile
. I think it'll be fine once GitHub implements Docker build caching. Pulling a pre-built image comes with downsides (and requires a lot more infrastructure from the action's author).
from codecov-action.
not the always to have latest build of debian:stretch-slim
is the best solution, sometime you should have fixed version of your dependencies that you have validated and ensure that everything is fine with them. So, you can update version of debian:stretch-slim
per each release (major, minor)
from codecov-action.
@teohhanhui I told you how it could be done you didn't bring me any arguments
from codecov-action.
@teohhanhui, that doesn't matter will they implement or not, building that image is stealing build time of projects that use this action.
from codecov-action.
Thank you, @krisboit. Your solution looks pretty good! I will use it!
from codecov-action.
@teohhanhui the only infrastructure is to add workflow that builds docker image and pushes it to docker hub or github packages. If that's a problem I can try to create PR with that.
from codecov-action.
You have to somehow keep the images always up to date with upstream changes. That's no easy task.
from codecov-action.
@teohhanhui you can create base image with codecov-action (let's name it codecov-action-base
) and Dockerfile that uses as base image our codecov-action-base
from codecov-action.
yeah, that doesn't solve problem with being "up-to-date"
from codecov-action.
oh, so it must be up to date, 'cause it builds during my build process 😄
from codecov-action.
I meant if we separate Dockerfile on base
that builds in your repo and runner
that builds in my repo that will have only two lines like:
FROM base:v1.0.3
ENTRYPOINT ...
from codecov-action.
@teohhanhui we can control whether it updated or not by tag version
from codecov-action.
Sorry for not being clear. That's not what I meant.
If there are pre-built Docker images for codecov-action
, then they'd need to be kept up-to-date with the base image (debian:stretch-slim
). This is not a trivial task.
from codecov-action.
@teohhanhui if you don't like my solution that doesn't mean your solution is better. So, I see no problems here if you don't want to make changes I just move to different product. Thanks!
from codecov-action.
@umed It's not my product. I'm not related to Codecov in any way. 😄 I'm just sharing why it's not as simple as you think it is.
from codecov-action.
hey @ibrahim0814 , could you help us with that?
from codecov-action.
I can create pull request with my solution
from codecov-action.
I told you how it could be done you didn't bring me any arguments
If there are pre-built Docker images for codecov-action, then they'd need to be kept up-to-date with the base image (debian:stretch-slim). This is not a trivial task.
from codecov-action.
@teohhanhui what's problem to create new release to update your base image?
from codecov-action.
If the concern is to build CodeCov image every time debian image updates, then why not just put it on GitHub Actions or Docker Hub for automated build on a schedule, say, once a week?
That might work, sure. But I'd say it's not worth spending the effort before seeing if GitHub Actions will implement Docker build layer caching. (They're going to General Availability soon in November, and they promised caching, not sure what's the scope though...)
from codecov-action.
Here's the first fallback from always rebuilding the image, since I've been using this action for only 3 weeks. An intermittent problem on repository serving mirror has costed me one build, for no good reason.
I'm not saying that pre-built Docker images are going to be perfectly available all the time, but that's one failure domain versus N.
Build codecov/[email protected]
Err:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages
503 No healthy backends
Ign:9 http://cdn-fastly.deb.debian.org/debian stretch-updates/main all Packages
Err:10 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages
503 No healthy backends
Fetched 602 kB in 3s (190 kB/s)
Reading package lists...
W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages 503 No healthy backends
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages 503 No healthy backends
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update && apt-get install -y ca-certificates curl git mercurial --no-install-recommends && rm -r /var/lib/apt/lists/*' returned a non-zero code: 100
##[warning]Docker build failed with exit code 100, back off 5.997 seconds before retry.
/usr/bin/docker build -t 2e4e3a:fb6b793ca9464775af7d2dd997221785 "/home/runner/work/_actions/codecov/codecov-action/v1.0.3"
from codecov-action.
Related Issues (20)
- Upload failing despite same/correct secret HOT 9
- Mark the token for masking in GHA logs
- ------- accidental
- Error: `Commit creating failed: {"detail":"You do not have permission to perform this action."}` HOT 4
- Request failed after too many retries HOT 3
- [v4] How to specify gcov options
- Unable to specify coverage reports flags per file HOT 1
- Codecov v4 - pull_request_review not trigger codecov build
- [CPU] Better CPU architecture detection
- Not valid tokenless upload even with a token HOT 2
- Intermittent GHA Failure HOT 2
- action fails to process non-ASCII Go source file on Windows
- Documentation of tokenless upload feature is no longer available
- Could not find a repository associated with upload token
- Exception: Request failed after too many retries HOT 5
- Not valid tokenless upload HOT 5
- `Unknown system error ` on `macos-13` runner HOT 2
- FileNotFoundError for non-ASCII file names HOT 1
- Coverage upload failure "Failed to properly create commit" HOT 2
- gitlab + monorepo + cli gives commit creating failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codecov-action.