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

Freight filtering rules #1270

Closed
jessesuen opened this issue Dec 12, 2023 · 6 comments
Closed

Freight filtering rules #1270

jessesuen opened this issue Dec 12, 2023 · 6 comments

Comments

@jessesuen
Copy link
Contributor

jessesuen commented Dec 12, 2023

Proposed Feature

Subscribing to a git repository can be, in many cases, very noisy and will produce inconsequential freight. Examples include:

  • mono repos where there are other directories of unrelated apps
  • changes to README.md or unrelated files

Warehouses should allow users to define rules so that only when certain paths are changed, should new freight be generated. e.g. suppose for a kustomize layout, maybe only changes to these directories should produce freight:

apps/
  guestbook/
    base/
    overlays/

Motivation

This will improve usability and filter out noise in the Freightline

Suggested Implementation

Warehouse API spec should introduce a new stanza on filtering rules. Before generating new Freight, it will see if the filtering rules apply and produce Freight accordingly.

NOTE: if we support git webhooks, the git webhook will have information about files that changed. This would avoid a git checkout. But I consider this an optimization and we shouldn't rely on this because we might miss a webhook.

@maksimstankevic
Copy link
Contributor

@krancour @jessesuen I was looking for a new, bit bigger issue, can I pick this one? I have limited free time off work and not sure how long this will take me but if it's fine - really interested to work on this.

@krancour
Copy link
Member

krancour commented Jan 5, 2024

@maksimstankevic have at it. We're happy for your assistance!

If I may suggest, simply on account of this being a somewhat complex change, if @jessesuen or myself can review the additions to the Warehouse CRD before you move ahead with corresponding changes to the controller, I think it would help to make sure we're all on the same page early in the process.

@maksimstankevic
Copy link
Contributor

@krancour @jessesuen could you please check and comment, main...maksimstankevic:kargo:feature/1270. I thought we could use similar approach as with AllowTags/IgnoreTags in ImageSubscription but use list of regexps in both GitSubscription's ScanPaths and IgnorePaths for more flexibility.

@krancour
Copy link
Member

@maksimstankevic I am so sorry for the delayed review. I think that is a good starting point.

@maksimstankevic
Copy link
Contributor

@krancour, hey, I submitted #1477 for this one, please, take a look when you have a sec

@krancour
Copy link
Member

This was closed by #1477

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

No branches or pull requests

3 participants