Git Product home page Git Product logo

Comments (24)

krisboit avatar krisboit commented on September 21, 2024 3

@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.

ibrahim0814 avatar ibrahim0814 commented on September 21, 2024 3

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.

dotdoom avatar dotdoom commented on September 21, 2024 2

@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.

teohhanhui avatar teohhanhui commented on September 21, 2024 1

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.

umed avatar umed commented on September 21, 2024 1

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.

umed avatar umed commented on September 21, 2024 1

@teohhanhui I told you how it could be done you didn't bring me any arguments

from codecov-action.

umed avatar umed commented on September 21, 2024 1

@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.

umed avatar umed commented on September 21, 2024 1

Thank you, @krisboit. Your solution looks pretty good! I will use it!

from codecov-action.

umed avatar umed commented on September 21, 2024

@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.

teohhanhui avatar teohhanhui commented on September 21, 2024

You have to somehow keep the images always up to date with upstream changes. That's no easy task.

from codecov-action.

umed avatar umed commented on September 21, 2024

@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.

umed avatar umed commented on September 21, 2024

yeah, that doesn't solve problem with being "up-to-date"

from codecov-action.

umed avatar umed commented on September 21, 2024

oh, so it must be up to date, 'cause it builds during my build process 😄

from codecov-action.

umed avatar umed commented on September 21, 2024

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.

umed avatar umed commented on September 21, 2024

@teohhanhui we can control whether it updated or not by tag version

from codecov-action.

teohhanhui avatar teohhanhui commented on September 21, 2024

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.

umed avatar umed commented on September 21, 2024

@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.

teohhanhui avatar teohhanhui commented on September 21, 2024

@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.

umed avatar umed commented on September 21, 2024

hey @ibrahim0814 , could you help us with that?

from codecov-action.

umed avatar umed commented on September 21, 2024

I can create pull request with my solution

from codecov-action.

teohhanhui avatar teohhanhui commented on September 21, 2024

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.

#27 (comment)

from codecov-action.

umed avatar umed commented on September 21, 2024

@teohhanhui what's problem to create new release to update your base image?

from codecov-action.

teohhanhui avatar teohhanhui commented on September 21, 2024

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.

dotdoom avatar dotdoom commented on September 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.