Skip to content

Commented out highestUserWastedPercent is not skipped, but set to 0.1 #606

Description

@stiwa-wrre

What happened:
i ran:
CI=true dive --source docker-archive --ci-config .dive-ci $TAR_FILE

my .dive-ci file:

rules:
  # If the efficiency is measured below X%, mark as failed.
  # Expressed as a ratio between 0-1.
  lowestEfficiency: 0.99

  # If the amount of wasted space is at least X or larger than X, mark as failed.
  # Expressed in B, KB, MB, and GB.
  # highestWastedBytes: 20MB

  # If the amount of wasted space makes up for X% or more of the image, mark as failed.
  # Note: the base image layer is NOT included in the total image size.
  # Expressed as a ratio between 0-1; fails if the threshold is met or crossed.
  # highestUserWastedPercent: 0.30

Commented out highestUserWastedPercent is not skipped, but set to 0.1 -> so it always will fail.

Results:
  FAIL: highestUserWastedPercent: too many bytes wasted, relative to the user bytes added (%-user-wasted-bytes=0.2501354787801187 > threshold=0.1)
  SKIP: highestWastedBytes: rule disabled
  FAIL: lowestEfficiency: image efficiency is too low (efficiency=0.9780414945964051 < threshold=0.99)
Result:FAIL [Total:3] [Passed:0] [Failed:2] [Warn:0] [Skipped:1]

What you expected to happen:

If I comment out rules, they should be skipped.

How to reproduce it (as minimally and precisely as possible):

Comment out rules in CI Mode. but it seems it only affects highestUserWastedPercent.

Anything else we need to know?:

Environment:

  • OS version: Gitlab-CI
  • Docker version (if applicable): wagoodman/dive@sha256:f1886e6c32c094fc41a623c1989f5cb3e48aa766da5f0be233f911fc1d85ce10

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    • Status
      Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions