You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to specify a channel parameter that can be read in my Composition file, and decide what file to import basing on that parameter.
Something like:
I think I actually found one way to implement something similar by looking at the code here.
That code generates an array of Compositions, in the example above they could be one for each value of the channel parameter.
Then the actual Composition selection happens using these labels and Composition Revision by specifying a compositionRevisionSelector.matchLabels in the Claim.
Also, I if I define 2 KCL files, let's say:
first.k
second.k
and I put this content into both: test = "test"
Visual Studio Code KCL extension shows an error:
The variable 'test' is declared here(ImmutableError)
second.k(1, 1): Can not change the value of 'test', because it was declared immutable
test: str
This tricked me into believing that I was doing it the wrong way. In reality this is not an error at all if you make sure that only one of these files is selected at runtime.
That being said, I'd still like to know if there is a better way to accomplish this other than the one I showed above
What happened?
I'd like to specify a
channel
parameter that can be read in my Composition file, and decide what file to import basing on that parameter.Something like:
but maybe it's not feasible.
How can we reproduce it?
What environment did it happen in?
Function version:
The text was updated successfully, but these errors were encountered: