zarf-dev / zarf

DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev/
Apache License 2.0
1.42k stars 171 forks source link

Image pull logs total / downloaded instead of downloaded / total GBs #1439

Closed mikevanhemert closed 1 year ago

mikevanhemert commented 1 year ago

Environment

Device and OS: System76 Darter Pro, Pop!_OS 22.04 LTS App version: v0.25.0-rc2 Kubernetes distro being used: k3d Other

Steps to reproduce

zarf.yaml ```yaml kind: ZarfPackageConfig metadata: name: demo description: "demo" architecture: amd64 components: - name: so-many-images description: "This think can fit so many images" required: true images: - "registry1.dso.mil/ironbank/big-bang/base:2.0.0" - "registry1.dso.mil/ironbank/opensource/istio/pilot:1.16.1" - "registry1.dso.mil/ironbank/opensource/istio/proxyv2:1.16.1" - "registry1.dso.mil/ironbank/opensource/istio/install-cni:1.16.1" - "registry1.dso.mil/ironbank/tetrate/istio/istioctl:1.15.1-tetratefips-v1" - "registry1.dso.mil/ironbank/tetrate/istio/proxyv2:1.15.1-tetratefips-v1" - "registry1.dso.mil/ironbank/tetrate/istio/pilot:1.15.1-tetratefips-v1" - "registry1.dso.mil/ironbank/tetrate/istio/install-cni:1.15.1-tetratefips-v1" - "registry1.dso.mil/ironbank/opensource/istio/operator:1.16.1" - "registry1.dso.mil/ironbank/tetrate/istio/operator:1.15.1-tetratefips-v1" - "registry1.dso.mil/ironbank/opensource/ingress-nginx/kube-webhook-certgen:v1.3.0" - "registry1.dso.mil/ironbank/opensource/jaegertracing/all-in-one:1.39.0" - "registry1.dso.mil/ironbank/opensource/jaegertracing/jaeger-operator:1.39.0" - "registry1.dso.mil/ironbank/opensource/kiali/kiali-operator:v1.60.0" - "registry1.dso.mil/ironbank/opensource/kiali/kiali:v1.60.0" - "registry1.dso.mil/ironbank/bigbang/cluster-auditor/opa-exporter:v0.0.7" - "registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.25.3" - "registry1.dso.mil/ironbank/opensource/openpolicyagent/gatekeeper:v3.10.0" - "registry1.dso.mil/ironbank/elastic/elasticsearch/elasticsearch:8.5.2" - "registry1.dso.mil/ironbank/elastic/kibana/kibana:8.5.2" - "registry1.dso.mil/ironbank/elastic/eck-operator/eck-operator:2.5.0" - "registry1.dso.mil/ironbank/opensource/fluent/fluent-bit:2.0.6" - "registry1.dso.mil/ironbank/big-bang/grafana/grafana-plugins:9.3.2" - "registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:1.21.0" - "registry1.dso.mil/ironbank/opensource/kubernetes/kube-state-metrics:v2.7.0" - "registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-config-reloader:v0.61.1" - "registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-operator:v0.61.1" - "registry1.dso.mil/ironbank/opensource/prometheus/alertmanager:v0.24.0" - "registry1.dso.mil/ironbank/opensource/prometheus/node-exporter:v1.5.0" - "registry1.dso.mil/ironbank/opensource/prometheus/prometheus:v2.40.5" - "registry1.dso.mil/ironbank/twistlock/console/console:22.06.197" - "registry1.dso.mil/ironbank/twistlock/defender/defender:22.06.197" - "registry1.dso.mil/ironbank/opensource/kubernetes-sigs/metrics-server:v0.6.2" - "registry1.dso.mil/ironbank/neuvector/neuvector/controller:5.0.2" - "registry1.dso.mil/ironbank/neuvector/neuvector/enforcer:5.0.2" - "registry1.dso.mil/ironbank/neuvector/neuvector/manager:5.0.2" - "registry1.dso.mil/ironbank/neuvector/neuvector/scanner:latest" - "registry1.dso.mil/ironbank/opensource/bitnami/elasticsearch-exporter:1.5.0-debian-11-r17" ```
  1. Create the Zarf package defined above
    zarf package create --confirm

Expected result

In the Pulling x images (y GBs of z GBs) message y should be the number of GBs pulled so far, z should be the total number of GBs

Actual Result

In the Pulling x images (y GBs of z GBs) message y is the total number of GBs, z the number of GBs pulled so far

Visual Proof (screenshots, videos, text, etc)

image

Severity/Priority

Low

Additional Context

Mihai22125 commented 1 year ago

Hi, I'm new to this project and would love to contribute. Can I be assigned to this issue?

Racer159 commented 1 year ago

Sure @Mihai22125! Here are our contributing guidelines if you haven't seen them yet:

https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md

The biggest thing is to make sure you GPG sign your commits (num 3 in developer workflow) (otherwise we will need to close/reopen the PR to re-sign - we would maintain your authorship though)

And here is the likely relevant code as well for this:

https://github.com/defenseunicorns/zarf/blob/main/src/pkg/utils/bytes.go#L85

Racer159 commented 1 year ago

Missed that @nik-don had already opened a PR sorry about that @Mihai22125

Mihai22125 commented 1 year ago

Hey @Racer159, no problem at all! I'll take a look at some of the other issues and see if there's another one I can contribute to