Skip to content

custom.dependencies.ignore is not working properly #9754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Brawdunoir opened this issue Mar 14, 2025 · 0 comments
Open

custom.dependencies.ignore is not working properly #9754

Brawdunoir opened this issue Mar 14, 2025 · 0 comments

Comments

@Brawdunoir
Copy link

Hello, I am observing a strange behavior with the custom.dependencies.ignore array.

Take this skaffold config:

apiVersion: skaffold/v4beta12
kind: Config
metadata:
  name: myproject
build:
  artifacts:
    - image: myimage
      context: ./test-build-avoidance
      custom:
        buildCommand: ./build.sh myimage
        dependencies:
          paths:
            - ./src/*
          ignore:
            - ./src/ignore/*
  tagPolicy:
    dateTime: {}
  local:
    push: true

And this structure:

test-build-avoidance/
├── build.sh
└── src
    ├── ignore
    │   └── tobeignored
    └── randomcode

When I run this command skaffold build --cache-file skaffold.cache -d myregistry:

  • First time it builds the app normally, push the image and puts digests in skaffold.cache file
  • Second time it does not build, but only find and tag the first image with the new tag
  • Now I change something in the file tobeignored
  • Third time the build is triggered again but it shouldn’t be from my understanding

This is the output of skaffold diagnose. I notice that even with this command the file tobeignored is counted.

Generating tags...
 - myimage -> myimage:2025-03-14_10-59-00.577_CET
Skaffold version: 62fba6a236833db0d0d689a33e0b1007518d3456
Configuration version: skaffold/v4beta12
Number of artifacts: 1

Custom artifact: myimage
 - Dependencies: 2 files
 - Time to list dependencies: 220.218µs (2nd time: 68.687µs)
 - Time to compute mTimes on dependencies: 8.498µs (2nd time: 3.247µs)

Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant