Repository navigation
fix(ui): create condition rules with the name the backend accepts - #1650
Open
AsperforMias wants to merge 1 commit into
Open
AsperforMias wants to merge 1 commit into
AsperforMias wants to merge 1 commit into
Conversation
The form view built rule names without the .condition-router suffix, so the backend rejected every new rule, and the YAML view checked key instead of scope, so an application-scope rule asked for a version and group. Build the name in one helper used by both views. Fixes apache#1648
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Please provide a description of this PR:
Fixes #1648.
A condition rule could not be created from the UI:
<application>or<service>:<version>:<group>without the.condition-routersuffix, which the backend rejects.key == 'application'instead ofscope == 'application', so an application-scope rule asked for a version and group.Both views now build the name with one helper,
conditionRuleName(scope, key, version, group).Validation: unit tests for the helper; the routing rule and full vitest suites pass, and prettier, eslint and type-check report nothing new for the changed files. In the mock-mode UI, submitting the form sends
POST /condition-rule/router-demo-server.condition-routerfor application scope and.../greet.GreetService:1.0.0:gray.condition-routerfor service scope, and the YAML view creates an application-scope rule without asking for a version and group. On develop the same steps send names without the suffix, and the YAML view sends nothing.To help us figure out who should review this PR, please put an X in all the areas that this PR affects.
Please check any characteristics that apply to this pull request.