Skip to content
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

flux build and flux diff don't honor .sourceignore files #3695

Closed
1 task done
tun0 opened this issue Mar 17, 2023 · 5 comments
Closed
1 task done

flux build and flux diff don't honor .sourceignore files #3695

tun0 opened this issue Mar 17, 2023 · 5 comments
Assignees
Labels
area/diff Diff related issues and pull requests

Comments

@tun0
Copy link

tun0 commented Mar 17, 2023

Describe the bug

If you have one or more .sourceignore files in your (local) checkout, these are being ignored when running flux build ks and flux diff ks. This can lead to confusing output of these commands.

Steps to reproduce

  1. Have a bunch of manifests in a directory
  2. List one or more of the manifests in a .sourceignore file
  3. Run flux build ks and/or flux diff ks
  4. The manifests listed in .sourceignore are present in the output of the respective flux commands

Expected behavior

The manifests listed in .sourceignore shouldn't be present in the output of the respective commands.

Screenshots and recordings

No response

OS / Distro

Manjaro

Flux version

v0.41.1

Flux check

► checking prerequisites
✔ Kubernetes 1.24.9-gke.3200 >=1.20.6-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.31.1
✔ image-automation-controller: deployment ready
► ghcr.io/fluxcd/image-automation-controller:v0.31.0
✔ image-reflector-controller: deployment ready
► ghcr.io/fluxcd/image-reflector-controller:rc-b89a023e@sha256:377a7bc1cf45b4245a82c21be149d8784c8cd74c5c1bc65188e68c28fcbd5dc0
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v0.35.0
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v0.33.0
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:rc-1303c254@sha256:0b9ea0503f76faf9c4e827c3d1dff72f4c10d8aa9a3be6cfd67e7c467423ee86
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta2
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1beta2
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta1
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ imagepolicies.image.toolkit.fluxcd.io/v1beta2
✔ imagerepositories.image.toolkit.fluxcd.io/v1beta2
✔ imageupdateautomations.image.toolkit.fluxcd.io/v1beta1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1beta2
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta2
✔ receivers.notification.toolkit.fluxcd.io/v1beta2
✔ all checks passed

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@stefanprodan stefanprodan added the area/diff Diff related issues and pull requests label Mar 20, 2023
@souleb
Copy link
Member

souleb commented Mar 27, 2023

thanks @tun0 for reporting this. I will submit a patch that will take into account .sourceignore.

@tun0
Copy link
Author

tun0 commented Mar 27, 2023

Not sure if this would warrant a separate ticket or not: in order to mimic .spec.ignore of GitRepository, those commands could benefit from an extra command line argument to provide an (additional) explicit ignore list.

@souleb
Copy link
Member

souleb commented Mar 27, 2023

Yes, that will be part of the patch.

@stefanprodan
Copy link
Member

Not sure if this would warrant a separate ticket or not: in order to mimic .spec.ignore of GitRepository, those commands could benefit from an extra command line argument to provide an (additional) explicit ignore list.

Please create a separate issue for the flags.

@stefanprodan
Copy link
Member

The .sourceignore issue was fixed in #3758

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/diff Diff related issues and pull requests
Projects
None yet
Development

No branches or pull requests

3 participants