-
Notifications
You must be signed in to change notification settings - Fork 15
feat: rusty adc #545
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
Draft
bzp2010
wants to merge
10
commits into
main
Choose a base branch
from
rust-next
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: rusty adc #545
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8d50059
feat(rust): differ poc (#542)
bzp2010 6573d00
test: rust differ (#543)
bzp2010 c8153f8
feat: rust resource type (#544)
bzp2010 e62ba61
feat: rust diff event type (#547)
bzp2010 949e88b
feat: rust backend type (#548)
bzp2010 bf48d78
feat: rust backend core (#549)
bzp2010 690bba8
feat: rust backend apisix (#550)
bzp2010 d3bf181
feat: rust cli (#551)
bzp2010 b110bfa
feat: rust backend api7 (#555)
bzp2010 4302449
feat: rust backend apisix standalone (#559)
bzp2010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,4 +55,6 @@ vitest.config.*.timestamp* | |
|
|
||
| .nx/polygraph | ||
| .nx/self-healing | ||
| .nx/migrate-runs | ||
| .nx/migrate-runs | ||
|
|
||
| rust/target/ | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "local": { "consumers": [{ "username": "alice", "plugins": {} }] }, | ||
| "remote": { "consumers": [{ "username": "alice", "description": "", "plugins": {} }] }, | ||
| "defaultValue": { "core": { "consumer": { "description": "" } }, "plugins": {} } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "local": { "consumers": [{ "username": "alice", "plugins": { "key-auth": { "key": "key" } } }] }, | ||
| "remote": { "consumers": [{ "username": "alice", "plugins": { "key-auth": { "key": "key", "added": "added" } } }] }, | ||
| "defaultValue": { "core": {}, "plugins": { "key-auth": { "added": "added" } } } | ||
| } |
12 changes: 12 additions & 0 deletions
12
fixtures/differ/basic.boolean_defaults_merged_correctly.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "local": { "services": [{ "name": "HTTP", "path_prefix": "/test", "strip_path_prefix": false }] }, | ||
| "remote": { | ||
| "services": [{ | ||
| "id": "f40b27d6b8b9a4fc3827264c1da16a04ecf4d094", | ||
| "name": "HTTP", | ||
| "path_prefix": "/test", | ||
| "strip_path_prefix": true | ||
| }] | ||
| }, | ||
| "defaultValue": { "core": { "service": { "strip_path_prefix": true } }, "plugins": {} } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "local": { "consumers": [{ "username": "alice", "plugins": {} }] }, | ||
| "remote": {} | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "local": {}, | ||
| "remote": { "consumers": [{ "username": "alice", "plugins": {} }] } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "local": {}, | ||
| "remote": {} | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "local": { | ||
| "ssls": [ | ||
| { "snis": ["demo-sni1", "demo-sni2"], "certificates": [{ "certificate": "cert", "key": "key" }] } | ||
| ] | ||
| }, | ||
| "remote": {} | ||
| } |
17 changes: 17 additions & 0 deletions
17
fixtures/differ/basic.keeps_plugins_when_plugins_not_changed.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "local": { | ||
| "services": [{ | ||
| "name": "Test Service", | ||
| "path_prefix": "/test", | ||
| "plugins": { "test": { "testKey": "testValue" } } | ||
| }] | ||
| }, | ||
| "remote": { | ||
| "services": [{ | ||
| "id": "5139f1c19641e214d3b9c57949d1578c2482b940", | ||
| "name": "Test Service", | ||
| "plugins": { "test": { "testKey": "testValue", "added": "added" } } | ||
| }] | ||
| }, | ||
| "defaultValue": { "core": {}, "plugins": { "test": { "added": "added" } } } | ||
| } |
19 changes: 19 additions & 0 deletions
19
fixtures/differ/basic.merges_array_nested_object_defaults_correctly.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "local": { | ||
| "services": [{ | ||
| "name": "Test Service", | ||
| "upstream": { "nodes": [{ "host": "0.0.0.0", "port": 443, "weight": 1 }] } | ||
| }] | ||
| }, | ||
| "remote": { | ||
| "services": [{ | ||
| "id": "5139f1c19641e214d3b9c57949d1578c2482b940", | ||
| "name": "Test Service", | ||
| "upstream": { "nodes": [{ "host": "0.0.0.0", "port": 443, "weight": 1, "priority": 0 }] } | ||
| }] | ||
| }, | ||
| "defaultValue": { | ||
| "core": { "service": { "upstream": { "nodes": [{ "priority": 0 }] } } }, | ||
| "plugins": {} | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
fixtures/differ/basic.route_and_stream_route_ids_generated_correctly.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "local": { | ||
| "services": [ | ||
| { "name": "HTTP", "routes": [{ "name": "HTTP 1", "uris": ["/1"] }] }, | ||
| { "name": "Stream", "stream_routes": [{ "name": "Stream 1", "server_port": 5432 }] } | ||
| ] | ||
| }, | ||
| "remote": { | ||
| "services": [ | ||
| { | ||
| "id": "f40b27d6b8b9a4fc3827264c1da16a04ecf4d094", | ||
| "name": "HTTP", | ||
| "routes": [{ "id": "f9e217f5cef4955ffce8d8da8b8e17918f85deb7", "name": "HTTP 1", "uris": ["/1"] }] | ||
| }, | ||
| { | ||
| "id": "df063869e11d7a9aa132cd4a984f7b5eb870d656", | ||
| "name": "Stream", | ||
| "stream_routes": [{ "id": "05a5e25f718f3fd8d9d3b02e39bdf6e8ab274220", "name": "Stream 1", "server_port": 5432 }] | ||
| } | ||
| ] | ||
| }, | ||
| "defaultValue": {} | ||
| } |
17 changes: 17 additions & 0 deletions
17
fixtures/differ/basic.selectively_merges_objects_in_default_values.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "local": { "services": [{ "name": "Test Service", "test1": {} }] }, | ||
| "remote": { | ||
| "services": [{ | ||
| "id": "5139f1c19641e214d3b9c57949d1578c2482b940", | ||
| "name": "Test Service", | ||
| "test": "test", | ||
| "test1": { "test2": "test2" } | ||
| }] | ||
| }, | ||
| "defaultValue": { | ||
| "core": { | ||
| "service": { "test": "test", "test1": { "test2": "test2", "test3": { "test4": "test4" } } } | ||
| }, | ||
| "plugins": {} | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "local": { | ||
| "consumers": [ | ||
| { "username": "createConsumer", "plugins": {} }, | ||
| { "username": "updatedConsumer", "plugins": { "key-auth": {} } } | ||
| ] | ||
| }, | ||
| "remote": { | ||
| "consumers": [ | ||
| { "username": "updatedConsumer", "plugins": {} }, | ||
| { "username": "deletedConsumer", "plugins": {} } | ||
| ] | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "local": { "consumers": [{ "username": "alice", "plugins": { "key-auth": { "key": "alice-key" } } }] }, | ||
| "remote": { "consumers": [{ "username": "alice", "plugins": {} }] } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Keep the two update fixtures behaviorally distinct.
Both files contain the same
localandremotepayload, so the suite cannot distinguish a generic resource update from plugin addition.fixtures/differ/basic.update_resource.json#L2-L3: change the payload to a distinct resource update, or remove this duplicate fixture.fixtures/differ/basic.update_resource_add_plugin.json#L2-L3: retain this payload only for the add-key-auth-plugin scenario.📍 Affects 2 files
fixtures/differ/basic.update_resource.json#L2-L3(this comment)fixtures/differ/basic.update_resource_add_plugin.json#L2-L3🤖 Prompt for AI Agents