JetStream: add accountID param for when an account's name and id differ#6611
Conversation
|
What happens if you specify both, but both with a different value? The JetStream scaler also needs some refactoring (#5797). Is that something you can and want to do? No problem if you can't or don't want to. One advantage of the refactoring is the support for multinames, which I think you want to achieve here. Here is an example of how multinames is applied. |
|
As implemented, it defers to only use the ID in the filtering, since internally NATs uses the ID (From the slack message screenshot in #6415. We can also see this in NATS source where the name is sometimes the I am not entirely sold that the solution of #6415 is the right approach, since it only modifies how we filter the response from the Which a component of this is as a result of NATs docs using their terms incorrect. In the source for I would be interested in refactoring, but would want to get this fixed first unless refactoring would help in that (since it sounds like the part being refactored is only how the config is initialized). Still not entirely sure on what the fix for this should be. |
|
What caught my eye was this piece of code: Which means that if The point about refactoring would mean that someone could specify |
|
That solution from the refactor sounds like it would be a cleaner fix than what I have now. I'll see what I can do. To clarify the refactor is to have the config parsing done using the declarative struct tags akin to d5d0b10? Then in doing that using a multiname for |
|
Yeah, it is cleaner. But it might cost you a bit more work to implement your use case (because the refactoring is added). |
Signed-off-by: ohhfishal <[email protected]>
Signed-off-by: ohhfishal <[email protected]>
Signed-off-by: ohhfishal <[email protected]>
Signed-off-by: ohhfishal <[email protected]>
Signed-off-by: ohhfishal <[email protected]>
Signed-off-by: ohhfishal <[email protected]>
Signed-off-by: ohhfishal <[email protected]>
Signed-off-by: ohhfishal <[email protected]>
|
/run-e2e jetstream |
Signed-off-by: Jorge Turrado Ferrero <[email protected]>
|
/run-e2e jetstream |
…er (kedacore#6611) * JetStream: add accountID param Signed-off-by: ohhfishal <[email protected]> * docs: initial changelog Signed-off-by: ohhfishal <[email protected]> * fix: initial refactor and add ID Signed-off-by: ohhfishal <[email protected]> * docs: add PR link Signed-off-by: ohhfishal <[email protected]> * chore: go fmt Signed-off-by: ohhfishal <[email protected]> * chore: tidy of pre-commit failure Signed-off-by: ohhfishal <[email protected]> * fix: update tests Signed-off-by: ohhfishal <[email protected]> * fix: make account and accountID individually optional, but one required Signed-off-by: ohhfishal <[email protected]> --------- Signed-off-by: ohhfishal <[email protected]> Signed-off-by: Jorge Turrado Ferrero <[email protected]> Co-authored-by: Jorge Turrado Ferrero <[email protected]>
…er (kedacore#6611) * JetStream: add accountID param Signed-off-by: ohhfishal <[email protected]> * docs: initial changelog Signed-off-by: ohhfishal <[email protected]> * fix: initial refactor and add ID Signed-off-by: ohhfishal <[email protected]> * docs: add PR link Signed-off-by: ohhfishal <[email protected]> * chore: go fmt Signed-off-by: ohhfishal <[email protected]> * chore: tidy of pre-commit failure Signed-off-by: ohhfishal <[email protected]> * fix: update tests Signed-off-by: ohhfishal <[email protected]> * fix: make account and accountID individually optional, but one required Signed-off-by: ohhfishal <[email protected]> --------- Signed-off-by: ohhfishal <[email protected]> Signed-off-by: Jorge Turrado Ferrero <[email protected]> Co-authored-by: Jorge Turrado Ferrero <[email protected]>
…er (kedacore#6611) * JetStream: add accountID param Signed-off-by: ohhfishal <[email protected]> * docs: initial changelog Signed-off-by: ohhfishal <[email protected]> * fix: initial refactor and add ID Signed-off-by: ohhfishal <[email protected]> * docs: add PR link Signed-off-by: ohhfishal <[email protected]> * chore: go fmt Signed-off-by: ohhfishal <[email protected]> * chore: tidy of pre-commit failure Signed-off-by: ohhfishal <[email protected]> * fix: update tests Signed-off-by: ohhfishal <[email protected]> * fix: make account and accountID individually optional, but one required Signed-off-by: ohhfishal <[email protected]> --------- Signed-off-by: ohhfishal <[email protected]> Signed-off-by: Jorge Turrado Ferrero <[email protected]> Co-authored-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: mittalvaibhav1 <[email protected]>
…er (kedacore#6611) * JetStream: add accountID param Signed-off-by: ohhfishal <[email protected]> * docs: initial changelog Signed-off-by: ohhfishal <[email protected]> * fix: initial refactor and add ID Signed-off-by: ohhfishal <[email protected]> * docs: add PR link Signed-off-by: ohhfishal <[email protected]> * chore: go fmt Signed-off-by: ohhfishal <[email protected]> * chore: tidy of pre-commit failure Signed-off-by: ohhfishal <[email protected]> * fix: update tests Signed-off-by: ohhfishal <[email protected]> * fix: make account and accountID individually optional, but one required Signed-off-by: ohhfishal <[email protected]> --------- Signed-off-by: ohhfishal <[email protected]> Signed-off-by: Jorge Turrado Ferrero <[email protected]> Co-authored-by: Jorge Turrado Ferrero <[email protected]>
…er (kedacore#6611) * JetStream: add accountID param Signed-off-by: ohhfishal <[email protected]> * docs: initial changelog Signed-off-by: ohhfishal <[email protected]> * fix: initial refactor and add ID Signed-off-by: ohhfishal <[email protected]> * docs: add PR link Signed-off-by: ohhfishal <[email protected]> * chore: go fmt Signed-off-by: ohhfishal <[email protected]> * chore: tidy of pre-commit failure Signed-off-by: ohhfishal <[email protected]> * fix: update tests Signed-off-by: ohhfishal <[email protected]> * fix: make account and accountID individually optional, but one required Signed-off-by: ohhfishal <[email protected]> --------- Signed-off-by: ohhfishal <[email protected]> Signed-off-by: Jorge Turrado Ferrero <[email protected]> Co-authored-by: Jorge Turrado Ferrero <[email protected]>
…er (kedacore#6611) * JetStream: add accountID param Signed-off-by: ohhfishal <[email protected]> * docs: initial changelog Signed-off-by: ohhfishal <[email protected]> * fix: initial refactor and add ID Signed-off-by: ohhfishal <[email protected]> * docs: add PR link Signed-off-by: ohhfishal <[email protected]> * chore: go fmt Signed-off-by: ohhfishal <[email protected]> * chore: tidy of pre-commit failure Signed-off-by: ohhfishal <[email protected]> * fix: update tests Signed-off-by: ohhfishal <[email protected]> * fix: make account and accountID individually optional, but one required Signed-off-by: ohhfishal <[email protected]> --------- Signed-off-by: ohhfishal <[email protected]> Signed-off-by: Jorge Turrado Ferrero <[email protected]> Co-authored-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: David Pochopsky <[email protected]>
Running into the same issue mentioned in pull 6415. Handles the case where an account name and id differ in a way that maintains backwards-compatibility since it is a trigger.
Checklist
Fixes #
Relates to #
PR#1551
PR#6415