-
Notifications
You must be signed in to change notification settings - Fork 159
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
proposal: "junction" nodes to repackage multiple pieces of Freight as a single piece of Freight #3193
Comments
I thought more about the problem mentioned in the "Motivation" section, and how I could best solve it with the present feature set of Kargo. I could create multiple "parallel" DAGs in one project. One DAG for each microservice. This would help avoid the "forced serialization" of microservice promotions which happens due to shared DAG. I would still like to raise one PR, if possible. Wondering if it's safe for the same logical stages in different DAGs to push to a single shared branch (eg. a branch called There are a few UX changes that would still be needed to make the multiple DAGs pattern suitable for general-use.
|
My typical advice is that if you have artifacts that must (for one reason or another) move through a pipeline as a unit, then those artifacts belong in a single piece of Freight. i.e. Should be created by the same Warehouse, and then the problem of needing to do n > 1 Promotions to effect a single logical state change goes away...
The way you've worded this, I'm inferring that you actually don't care about the artifacts for various microservices progressing through the pipeline as a unit all the way up to and including UAT, and then for the "last mile" to Production, you do want to Progress all those artifacts as a single unit. Have I got that right? Although we do not seem to have an open issue for it, this exact use case has been on our radar for a long time, and you can see that reflected in places like The way I see something like this working: A junction would be as if a Warehouse and a Stage "had a baby," in that it would behave partly like one and partly like the other. Like a Stage, it could request Freight from multiple origins (Warehouses), and acceptable sources for those (i.e. upstream Stages) and you could "promote" Freight from any of those Warehouses to it. Unlike a Stage, it wouldn't deploy anything. Like a Warehouse, it would produce new Freight (in this case, by combining all its current Freight) either automatically or upon request. As I said, this has been in the back of our heads for a long time, and your use case is the exact one for which we'd conceived this. Do you agree this would solve your problem? This is, unfortunately, not trivial or we'd have done it already. In terms of size and complexity, this is the sort of feature that would eat up one entire development cycle all by itself. We'll have to see how @jessesuen thinks this ought to be prioritized. Edit: I'm tentatively changing the title to match this line of thinking, but can adjust it further if the thread turns in a different direction. |
I know it's not so flexible as spaceship implementation with repackaging, but #2988 |
I don't think loading up your Freight with a large number of artifacts is the answer. There have been a few other threads about this recently. I see a lot of people doing this and it's finally setting in that this isn't necessarily what people want, rather it's what people are getting stuck with when the patterns to solve their problems aren't clear. That's a gap we're going to be working very hard to address now. |
Checklist
kargo version
, if applicable.v1.1.2
Proposed Feature
I want to select multiple freight from different freight timelines when creating a promotion to a stage. Currently, a promotion can only accommodate one freight.
Motivation
I am trying to create a CD pipeline for a Team to deploy their microservices. Each of the microservices is a Kargo Warehouse 1.
Changes to multiple microservices are accumulated in a
uat
stage and released together to theprod
stage in a regular cadence.During the manual promotion to
prod
, it is cumbersome to do promotions freight-by-freight. Since we want to also review the changes before updating the live GitOps branch, we will usegit-open-pr
andgit-wait-for-pr
in the promotion steps for theprod
stage. This makes it worse since Kargo takes up to 5 minutes to confirm and move from agit-wait-for-pr
step. With multiple freight, it takes up to (5 x N) minutes to complete the deployment of N microservices because of the delay ingit-wait-for-pr
step. There would also be N PRs to review.If multiple Freight could be promoted together in one Promotion, we would only raise one PR and the delay in
git-wait-for-pr
step will also only take 5 minutes instead of (5 x N) minutes.[1] One may suggest we could use a single Freight with all images to work around this. The reason I am modeling microservice to Warehouse 1:1 is that it is easy to manually create a freight for "hotfixes". If I had instead created a single Warehouse that subscribes to all the images, a hotfix would require specifying the expected versions of every image during manual Freight Assembly which is cumbersome and mistake-prone.
Suggested Implementation
The Promotion CR could accept a list of freight instead of a single freight. That would be a breaking change for the CRD though.
There might be good reasons for only allowing a single freight update per promotion, curious to know the why if that's the case.
The text was updated successfully, but these errors were encountered: