-
Notifications
You must be signed in to change notification settings - Fork 109
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
feat(warehouse)!: artifact discovery and manual Freight creation #1984
Conversation
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
✅ Deploy Preview for docs-kargo-akuity-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
0592096
to
bb8e341
Compare
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1984 +/- ##
==========================================
- Coverage 46.21% 45.80% -0.42%
==========================================
Files 235 235
Lines 16017 16191 +174
==========================================
+ Hits 7403 7417 +14
- Misses 8254 8413 +159
- Partials 360 361 +1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
fcbcedd
to
8315ba2
Compare
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
8315ba2
to
f2105c0
Compare
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
0760cdd
to
dd40197
Compare
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
360879e
to
eba8621
Compare
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
I had to think again about why I thought this was breaking, and initially thought it wasn't, but then recalled the tiny difference. At present, include and exclude paths for Git subscriptions look at the full diff between With this pull request, this behavior changes, as we look at every individual commit to see if it contains changes that make it eligible to be used as an artifact for Freight. As the current HEAD may not contain an included path, this means that the newest discovered artifact can change compared to the latest Freight we created (before upgrading), causing the Warehouse to create new Freight with the exact commit that contained these changes (instead of HEAD). |
Ah. That makes sense. I doubt many people will notice this very slight behavior change and if anyone does, I think they're likely to find the new behavior make more intuitive sense. Fine with me if you want to put the |
// These formats are quite complex, so we break them down into smaller | ||
// pieces for readability. | ||
// | ||
// They are designed to output the following fields, separated by `|*|`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious about the choice of |*|
as a delimiter. I'm not suggesting it should change. Asking for my own benefit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted something that was highly unlikely to show up in some of the fields, I could think of reasons e.g. ,
or |
would show up. But I would be quite baffled about this happening for |*|
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(The reason it needs to be a (set of) character(s) is that unlike git log
formatting, it git for-each-ref
can't insert tabs or other whitespace-like escape sequences.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few new comments this morning, but they are entirely non-blocking, dealer's choice sort of things.
LGTM as is and it stands if you do choose to do anything about the remaining comments.
This PR is absolute 🔥
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
TL;DR
This pull request addresses the majority of the backend part of #761, by reflecting the last 20 discovered artifacts for each subscription of a Warehouse in its Status, allowing the UI to present the user with options to pick from to "mix-and-match" their selection of artifacts to create Freight for.
Combined with these changes, a "manual" and "automatic" Freight creation mode has been introduced to the Warehouse, in addition to changes to the reconciliation model, and further optimizations to the logic that gathers information about upstream artifacts.
API changes
.status.discoveredArtifacts
For each subscription of a Warehouse, Kargo will discover the 20 latest artifacts based on the selection strategy and reflect them in
.status.discoveredArtifacts
field of the object. The UI can use this information to provide the user with the option to "mix and match" artifacts for which to create Freight.An example:
Note: Not all fields for
images
andcommits
are shown above, as the availability of data (e.g. a Git tag, or the creation timestamp of a container image) depends on the chosen selection strategy. Please refer to the in-code changes for further details on all fields..spec.freightCreationPolicy
This newly introduced field configures if Freight is automatically created for newly discovered artifacts. It can be set to
Automatic
(the default) to discover artifacts and automatically create Freight for the latest discovered version(s), or toManual
to discover artifacts without creating Freight.Behavioral changes
--depth=1
) to the newer "partial clone" (--filter
) option. To read more about this, please refer to this excellent article.git for-each-ref
andgit log
with specifically designed custom formatters. Instead of performing FS-heavygit checkout
, etc. operations.Other notable changes
Potential follow-ups
Allow the configuration of the requeue interval, e.g. by adding something like:
The reason for putting this in a nested struct, is because this would potentially also allow a configurable limit (i.e.
.discovery.limit: 50
.Figure out how to do "on-demand deepening". For example, to allow the user to request metadata about an image outside the subscription's selector. This is a challenging task, as the observed artifacts are continuously overwritten and we would likely need to keep state about a previous request(s) (or requests from two different users).