Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Matrix generator where a generator can reference items of another one #9080
feat: Matrix generator where a generator can reference items of another one #9080
Changes from 13 commits
d4da216
38a2b56
5c7ae5a
f09d41e
491d301
535a391
4dfa276
424f0c9
4edb6fe
ad633e2
62c0426
a719638
78705ce
a6a915b
6001908
295a6ed
4bed874
54deaed
cc8d8bc
5785aab
e59253c
6bf05d1
db5e8af
0dae059
ec0854a
2ec3e94
cd3602d
848f957
b297f20
b2d336e
c4c4654
598eff0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
in addition to above change replace requestedGenerator with newrequestedgenerator
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.
@KojoRising like @Lobstrosity said returning generator from interpolation would solve ur problem of resusbstituting as original generator will not be replaced like this
and yes we also need to re-evaluate the 2nd generator for each result from the 1st 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.
You define several
cases
but only appear to use the first one.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.
Ahh yeah, this was more for testing the
GetRelevantGenerators
function (not mine). I'm fairly new to Go (I'm more on the ArgoCD Yaml side :), so I was using some tests that were used for the Git Generators (where they were specifically testing the Git Generator).My test cases were below in the
TestGetRelevantGenerators
function:Anyways, I cleaned up the above function you mentioned. Thanks for pointing it out!
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.
@KojoRising Regarding this comment and the screenshot with the arrows:
This
gitGeneratorParams
mock represents agit
generator that yields a single result. My concern is, what happens when thegit
generator yields multiple results? All of those results would be ing0
over inmatrix.go
butinterpolateGenerator
is only interpolating values from the first result.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.
@Lobstrosity
Ahh, got it got it. Yes, you’re right, for multiple paths specified in a git generator, it wouldnt pick those up.
I’ll update the code/test-cases to support this. Thank you for pointing it out!