-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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(appset): Support various merge strategies for merge generator #16080
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Sonam <[email protected]>
Signed-off-by: Sonam <[email protected]>
Signed-off-by: Sonam <[email protected]>
Signed-off-by: Sonam <[email protected]>
Signed-off-by: Sonam <[email protected]>
@crenshaw-dev Please review. Thank you!! Also, do you think it's better to have a more intuitive name for the flag? |
Actually, I think we should probably have a string field called |
Hello ! |
Hey @darkradish |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #16080 +/- ##
==========================================
+ Coverage 49.48% 49.50% +0.01%
==========================================
Files 271 271
Lines 47728 47774 +46
==========================================
+ Hits 23620 23651 +31
- Misses 21773 21782 +9
- Partials 2335 2341 +6 ☔ View full report in Codecov by Sentry. |
Are there any plans to merge this awesome feature? |
Same question here... will this feature be merged in the near future? |
I am also very interested in this |
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.
Code looks good. I think the user documentation needs to be clarified a bit more to explain the results expected by the different modes.
## Merge Modes (Join types) | ||
With the `uniq` merge modes (`left-join-uniq`, `inner-join-uniq`, `full-join-uniq`), all the parameter sets produced by any of the generators under a Merge generator, need to have unique values for the configured merge keys. | ||
|
||
However, this behaviour can be changed by using any of the merge modes that do not end with `-uniq`. This will allow more than one parameter sets of (only) the **base generator** to have the same values for the merge keys. |
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.
This will allow more than one parameter sets of (only) the base generator
I find it hard to understand the meaning of this sentence. Why is only in parenthesis? what is the base generator?
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.
would it be helpful to provide the equivalent SQL to explain joins? It seems like the -uniq
is kind of like using DISTINCT
, but rather, instead of actually doing distinct, it just errors if there are merge keys that are identical.
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.
We cannot expect users to be familiar with SQL. The documentation should be simple enough for a user not familiar with left/inner/full terminology to understand the behavior of these modes.
Something like
With the `uniq` merge modes (`left-join-uniq`, `inner-join-uniq`, `full-join-uniq`), all the parameter sets produced by any generators under a Merge generator need to have unique values for the configured merge keys. An error preventing the generation will be returned when duplicated keys are found.
However, I am still not sure what you are trying to explain with the last sentence of the second paragraph.
redis: 'true' | ||
``` | ||
The same behaviour can be obtained with any of the non-uniq merge modes (`left-join`, `inner-join`, `full-join`) | ||
The types of join hold the same meanings as their equivalent SQL joins. |
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.
Maybe a short explanation on the result of inner and full join with the example above would help the users understand which mode to use better.
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.
ya, what's the point of the -uniq
variants? In this example, if server
was added to the mergeKeys
list, would left-join-uniq
work?
Co-authored-by: Alexandre Gaudreault <[email protected]> Signed-off-by: Sonam <[email protected]>
Co-authored-by: Alexandre Gaudreault <[email protected]> Signed-off-by: Sonam <[email protected]>
Hi, what is the progress here, I would love to see this working as we have the need for exactly this feature. |
## Merge Modes (Join types) | ||
With the `uniq` merge modes (`left-join-uniq`, `inner-join-uniq`, `full-join-uniq`), all the parameter sets produced by any of the generators under a Merge generator, need to have unique values for the configured merge keys. | ||
|
||
However, this behaviour can be changed by using any of the merge modes that do not end with `-uniq`. This will allow more than one parameter sets of (only) the **base generator** to have the same values for the merge keys. |
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.
However, this behaviour can be changed by using any of the merge modes that do not end with `-uniq`. This will allow more than one parameter sets of (only) the **base generator** to have the same values for the merge keys. | |
However, this behaviour can be changed by using any of the merge modes that do not end with `-uniq`. Using those, the parameters from a child generator that are used as mergeKeys do no longer have to be unique. |
Maybe this is easier to understand regarding the previous comment?
@sonamkshenoy If you would do the signoff for your commits we would be one step further towards getting this cool feature into prod. If you might have problems with signing old commits, you could follow this link |
@sonamkshenoy we could really use this feature. It seems the final commit is signed. Could this be squashed and rebased? |
Squashed and rebased version of argoproj#16080 no other changes introduced. Signed-off-by: Josh French <[email protected]>
I've rebased and squashed this, I'm hoping we can get it into main: #21441 |
Support for various merge strategies in merge generator. Includes:
left-join
,left-join-uniq
,inner-join
,inner-join-uniq
,full-join
,full-join-uniq
This PR also allows more than one parameter sets to have the same merge key in the base generator
Fixes #11952, #12837, #14560