You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/07 05:35:05 UTC
[GitHub] [apisix-dashboard] jwrookie opened a new pull request #2362: feat: storage grafana path in to etcd
jwrookie opened a new pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362
Please answer these questions before submitting a pull request, **or your PR will get closed**.
**Why submit this pull request?**
- [ ] Bugfix
- [x] New feature provided
- [ ] Improve performance
- [ ] Backport patches
**What changes will this PR take into?**
storage grafana path in to etcd
**Related issues**
fix/resolve #1953
**Checklist:**
- [x] Did you explain what problem does this PR solve? Or what new features have been added?
- [x] Have you added corresponding test cases?
- [ ] Have you modified the corresponding document?
- [x] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2bdd5f9) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `20.43%`.
> The diff coverage is `55.10%`.
> :exclamation: Current head 2bdd5f9 differs from pull request most recent head 09eada0. Consider uploading reports for the commit 09eada0 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
===========================================
- Coverage 69.75% 49.31% -20.44%
===========================================
Files 184 42 -142
Lines 7284 3220 -4064
Branches 832 0 -832
===========================================
- Hits 5081 1588 -3493
+ Misses 1907 1433 -474
+ Partials 296 199 -97
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `49.31% <55.10%> (+0.08%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <ø> (-90.91%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `67.50% <67.50%> (ø)` | |
| [api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
| [api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=) | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
| ... and [170 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...09eada0](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (eb48288) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **increase** coverage by `1.98%`.
> The diff coverage is `96.55%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
+ Coverage 69.75% 71.73% +1.98%
==========================================
Files 184 58 -126
Lines 7284 3956 -3328
Branches 832 0 -832
==========================================
- Hits 5081 2838 -2243
+ Misses 1907 823 -1084
+ Partials 296 295 -1
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `36.75% <43.10%> (-0.36%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `60.16% <93.10%> (+0.95%)` | :arrow_up: |
| backend-unit-test | `49.30% <47.36%> (+0.07%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `90.90% <ø> (ø)` | |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `73.10% <88.23%> (+0.51%)` | :arrow_up: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `87.50% <100.00%> (+0.32%)` | :arrow_up: |
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | | |
| [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | | |
| [web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==) | | |
| [web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==) | | |
| [web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=) | | |
| [web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4) | | |
| ... and [124 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...eb48288](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822240853
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,33 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
+ "properties":{
+ "config_name":{
+ "maxLength":100,
+ "minLength":1,
+ "pattern":"^[a-zA-Z0-9_]+$",
+ "type":"string"
+ },
+ "desc":{
+ "maxLength":256,
+ "type":"string"
+ },
+ "payload":{
+ "type":"object"
+ },
+ "create_time":{
+ "type":"integer"
+ },
+ "update_time":{
+ "type":"integer"
+ }
+ },
+ "required":[
+ "config_name"
Review comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (67c7c28) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `7.24%`.
> The diff coverage is `89.65%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
- Coverage 69.75% 62.51% -7.25%
==========================================
Files 184 58 -126
Lines 7284 3956 -3328
Branches 832 0 -832
==========================================
- Hits 5081 2473 -2608
+ Misses 1907 1196 -711
+ Partials 296 287 -9
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `37.10% <43.10%> (+<0.01%)` | :arrow_up: |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `49.30% <47.36%> (+0.07%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `68.18% <ø> (-22.73%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `48.96% <64.70%> (-23.63%)` | :arrow_down: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `80.00% <100.00%> (-7.18%)` | :arrow_down: |
| [api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==) | `0.00% <0.00%> (-80.00%)` | :arrow_down: |
| [api/internal/core/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9taWdyYXRlLmdv) | `0.00% <0.00%> (-76.20%)` | :arrow_down: |
| [api/internal/core/migrate/dataset.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9kYXRhc2V0Lmdv) | `0.00% <0.00%> (-53.04%)` | :arrow_down: |
| [api/internal/handler/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbWlncmF0ZS9taWdyYXRlLmdv) | `8.06% <0.00%> (-51.62%)` | :arrow_down: |
| [api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=) | `23.00% <0.00%> (-44.25%)` | :arrow_down: |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
| ... and [146 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...67c7c28](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822655415
##########
File path: api/internal/core/store/storehub.go
##########
@@ -48,13 +49,14 @@ var (
func InitStore(key HubKey, opt GenericStoreOption) error {
hubsNeedCheck := map[HubKey]bool{
- HubKeyConsumer: true,
- HubKeyRoute: true,
- HubKeySsl: true,
- HubKeyService: true,
- HubKeyUpstream: true,
- HubKeyGlobalRule: true,
- HubKeyStreamRoute: true,
+ HubKeyConsumer: true,
+ HubKeyRoute: true,
+ HubKeySsl: true,
+ HubKeyService: true,
+ HubKeyUpstream: true,
+ HubKeyGlobalRule: true,
+ HubKeyStreamRoute: true,
+ HubKeySystemConfig: true,
Review comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1063665844
@nic-chen after communicating with @bzp2010 , it will be done by other pr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bzp2010 commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822626422
##########
File path: api/internal/core/store/storehub.go
##########
@@ -48,13 +49,14 @@ var (
func InitStore(key HubKey, opt GenericStoreOption) error {
hubsNeedCheck := map[HubKey]bool{
- HubKeyConsumer: true,
- HubKeyRoute: true,
- HubKeySsl: true,
- HubKeyService: true,
- HubKeyUpstream: true,
- HubKeyGlobalRule: true,
- HubKeyStreamRoute: true,
+ HubKeyConsumer: true,
+ HubKeyRoute: true,
+ HubKeySsl: true,
+ HubKeyService: true,
+ HubKeyUpstream: true,
+ HubKeyGlobalRule: true,
+ HubKeyStreamRoute: true,
+ HubKeySystemConfig: true,
Review comment:
ditto
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,34 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
Review comment:
No need to add a schema for this, this file will only be exported by the APISIX control API. The model looks simple and we check it manually when we modify the data.
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
In fact, we can remove these meaningless test cases, just keep only the E2E test.
##########
File path: api/internal/core/store/storehub.go
##########
@@ -48,13 +49,14 @@ var (
func InitStore(key HubKey, opt GenericStoreOption) error {
hubsNeedCheck := map[HubKey]bool{
- HubKeyConsumer: true,
- HubKeyRoute: true,
- HubKeySsl: true,
- HubKeyService: true,
- HubKeyUpstream: true,
- HubKeyGlobalRule: true,
- HubKeyStreamRoute: true,
+ HubKeyConsumer: true,
+ HubKeyRoute: true,
+ HubKeySsl: true,
+ HubKeyService: true,
+ HubKeyUpstream: true,
+ HubKeyGlobalRule: true,
+ HubKeyStreamRoute: true,
+ HubKeySystemConfig: true,
Review comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r820625698
##########
File path: api/internal/core/entity/entity.go
##########
@@ -304,3 +304,12 @@ type StreamRoute struct {
UpstreamID interface{} `json:"upstream_id,omitempty"`
Plugins map[string]interface{} `json:"plugins,omitempty"`
}
+
+// swagger:model SystemConfig
+type SystemConfig struct {
+ ConfigName string `json:"config_name"`
+ Desc string `json:"desc,omitempty"`
+ Payload map[string]interface{} `json:"payload,omitempty"`
Review comment:
map is more appropriate for the configuration, and it is easier to add more items later on
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f330219) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `7.55%`.
> The diff coverage is `88.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
- Coverage 69.75% 62.19% -7.56%
==========================================
Files 184 58 -126
Lines 7284 3955 -3329
Branches 832 0 -832
==========================================
- Hits 5081 2460 -2621
+ Misses 1907 1208 -699
+ Partials 296 287 -9
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `36.81% <34.00%> (-0.30%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `49.31% <55.10%> (+0.08%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `68.18% <ø> (-22.73%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `48.61% <33.33%> (-23.99%)` | :arrow_down: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `80.00% <100.00%> (-7.18%)` | :arrow_down: |
| [api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==) | `0.00% <0.00%> (-80.00%)` | :arrow_down: |
| [api/internal/core/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9taWdyYXRlLmdv) | `0.00% <0.00%> (-76.20%)` | :arrow_down: |
| [api/internal/core/migrate/dataset.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9kYXRhc2V0Lmdv) | `0.00% <0.00%> (-53.04%)` | :arrow_down: |
| [api/internal/handler/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbWlncmF0ZS9taWdyYXRlLmdv) | `8.06% <0.00%> (-51.62%)` | :arrow_down: |
| [api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=) | `23.00% <0.00%> (-44.25%)` | :arrow_down: |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
| ... and [147 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...f330219](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r823229777
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
Yes, most unit test cases are the same and meaningless, you could have a look at unit test cases of other handlers, they are almost the same.
We should focus on tests that are not covered.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r823227607
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,34 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
Review comment:
@bzp2010
good catch!
we could put the schema into another file, and when the Manager API starts, we need to merge its content into `schema.json`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bzp2010 merged pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
bzp2010 merged pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1062749692
@bzp2010 have a check, thx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r823239202
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,34 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
Review comment:
I would be happy to do it by other pr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822660089
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
I think the unit test is also required, it can quickly detect coding problems
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bzp2010 commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822802573
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
😂, I think all can, please @nic-chen @starsz to see it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822711863
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,34 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
Review comment:
I'm sorry, I handled it the wrong way
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r820573110
##########
File path: api/internal/handler/handler_test.go
##########
@@ -38,7 +38,7 @@ func TestSpecCodeResponse(t *testing.T) {
resp = SpecCodeResponse(err)
assert.Equal(t, &data.SpecCodeResponse{StatusCode: http.StatusNotFound}, resp)
- err = errors.New("system error")
+ err = errors.New("system_config error")
Review comment:
Oh, it was a mistake, sorry!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822663595
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,34 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
Review comment:
Please keep the same opinion, I think both are fine, but according to the existing code style, it should be schema @bzp2010 @nic-chen
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822654877
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,34 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
Review comment:
see https://github.com/apache/apisix-dashboard/pull/2362/files/f330219fd6a4975b68fd7e7a9b934f5aa062b42d#r820570419
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (eb48288) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `7.54%`.
> The diff coverage is `89.65%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
- Coverage 69.75% 62.20% -7.55%
==========================================
Files 184 58 -126
Lines 7284 3956 -3328
Branches 832 0 -832
==========================================
- Hits 5081 2461 -2620
+ Misses 1907 1208 -699
+ Partials 296 287 -9
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `36.75% <43.10%> (-0.36%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `49.30% <47.36%> (+0.07%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `68.18% <ø> (-22.73%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `48.96% <64.70%> (-23.63%)` | :arrow_down: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `80.00% <100.00%> (-7.18%)` | :arrow_down: |
| [api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==) | `0.00% <0.00%> (-80.00%)` | :arrow_down: |
| [api/internal/core/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9taWdyYXRlLmdv) | `0.00% <0.00%> (-76.20%)` | :arrow_down: |
| [api/internal/core/migrate/dataset.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9kYXRhc2V0Lmdv) | `0.00% <0.00%> (-53.04%)` | :arrow_down: |
| [api/internal/handler/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbWlncmF0ZS9taWdyYXRlLmdv) | `8.06% <0.00%> (-51.62%)` | :arrow_down: |
| [api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=) | `23.00% <0.00%> (-44.25%)` | :arrow_down: |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
| ... and [147 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...eb48288](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (437efa6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `5.24%`.
> The diff coverage is `83.33%`.
> :exclamation: Current head 437efa6 differs from pull request most recent head 0805c42. Consider uploading reports for the commit 0805c42 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
- Coverage 69.75% 64.51% -5.25%
==========================================
Files 184 58 -126
Lines 7284 3965 -3319
Branches 832 0 -832
==========================================
- Hits 5081 2558 -2523
+ Misses 1907 1044 -863
- Partials 296 363 +67
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `36.92% <28.33%> (-0.19%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `60.00% <83.33%> (+0.79%)` | :arrow_up: |
| backend-unit-test | `?` | |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `90.90% <ø> (ø)` | |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `72.91% <77.77%> (+0.32%)` | :arrow_up: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `84.00% <84.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `87.50% <100.00%> (+0.32%)` | :arrow_up: |
| [api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==) | `5.55% <0.00%> (-61.12%)` | :arrow_down: |
| [api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==) | `0.00% <0.00%> (-60.00%)` | :arrow_down: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `65.62% <0.00%> (-23.96%)` | :arrow_down: |
| [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `69.35% <0.00%> (-23.39%)` | :arrow_down: |
| [api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==) | `55.55% <0.00%> (-22.23%)` | :arrow_down: |
| [api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=) | `68.11% <0.00%> (-17.40%)` | :arrow_down: |
| ... and [143 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...0805c42](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0805c42) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `20.56%`.
> The diff coverage is `49.15%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
===========================================
- Coverage 69.75% 49.19% -20.57%
===========================================
Files 184 42 -142
Lines 7284 3230 -4054
Branches 832 0 -832
===========================================
- Hits 5081 1589 -3492
+ Misses 1907 1438 -469
+ Partials 296 203 -93
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `49.19% <49.15%> (-0.04%)` | :arrow_down: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <ø> (-90.91%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `58.00% <58.00%> (ø)` | |
| [api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
| [api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=) | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
| ... and [170 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...0805c42](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bzp2010 commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822763630
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
I mean, the current use cases like `Get` `Put` use mock storage to test, which doesn't make a lot of sense because mock doesn't have its own storage features like in-memory, etc (We also don't know if the handler is actually working properly, because the input and output are provided by the developer code). The storage layer that is really being used will be tested in full in E2E, in unit we just do some other trivial work.
This is my own idea, what do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (eb48288) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **increase** coverage by `0.49%`.
> The diff coverage is `95.52%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
+ Coverage 69.75% 70.25% +0.49%
==========================================
Files 184 189 +5
Lines 7284 7375 +91
Branches 832 826 -6
==========================================
+ Hits 5081 5181 +100
+ Misses 1907 1899 -8
+ Partials 296 295 -1
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `36.75% <43.10%> (-0.36%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `60.16% <93.10%> (+0.95%)` | :arrow_up: |
| backend-unit-test | `49.30% <47.36%> (+0.07%)` | :arrow_up: |
| frontend-e2e-test | `68.52% <94.73%> (+0.46%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `90.90% <ø> (ø)` | |
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | `73.77% <ø> (+3.27%)` | :arrow_up: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `73.10% <88.23%> (+0.51%)` | :arrow_up: |
| [...b/src/pages/Proto/components/ProtoDrawer/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Qcm90by9jb21wb25lbnRzL1Byb3RvRHJhd2VyL2luZGV4LnRzeA==) | `88.46% <88.46%> (ø)` | |
| [web/src/pages/Proto/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Qcm90by9MaXN0LnRzeA==) | `96.15% <96.15%> (ø)` | |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `87.50% <100.00%> (+0.32%)` | :arrow_up: |
| [web/src/hooks/usePagination.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9ob29rcy91c2VQYWdpbmF0aW9uLnRz) | `100.00% <100.00%> (ø)` | |
| [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | `88.57% <100.00%> (+1.07%)` | :arrow_up: |
| [web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==) | `71.42% <100.00%> (-1.08%)` | :arrow_down: |
| ... and [9 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...eb48288](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1063667079
> it will be done by other pr
BTW, pls rerun the front e2e test ,thx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f330219) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `20.43%`.
> The diff coverage is `55.10%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
===========================================
- Coverage 69.75% 49.31% -20.44%
===========================================
Files 184 42 -142
Lines 7284 3220 -4064
Branches 832 0 -832
===========================================
- Hits 5081 1588 -3493
+ Misses 1907 1433 -474
+ Partials 296 199 -97
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `49.31% <55.10%> (+0.08%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <ø> (-90.91%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `67.50% <67.50%> (ø)` | |
| [api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
| [api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=) | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
| ... and [170 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...f330219](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060242617
Frontend e2e test error, pls rerun thx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f330219) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **increase** coverage by `0.38%`.
> The diff coverage is `95.23%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
+ Coverage 69.75% 70.13% +0.38%
==========================================
Files 184 189 +5
Lines 7284 7374 +90
Branches 832 826 -6
==========================================
+ Hits 5081 5172 +91
Misses 1907 1907
+ Partials 296 295 -1
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `36.81% <34.00%> (-0.30%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `59.54% <84.00%> (+0.33%)` | :arrow_up: |
| backend-unit-test | `49.31% <55.10%> (+0.08%)` | :arrow_up: |
| frontend-e2e-test | `68.55% <94.73%> (+0.49%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `90.90% <ø> (ø)` | |
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | `73.77% <ø> (+3.27%)` | :arrow_up: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `72.91% <77.77%> (+0.32%)` | :arrow_up: |
| [...b/src/pages/Proto/components/ProtoDrawer/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Qcm90by9jb21wb25lbnRzL1Byb3RvRHJhd2VyL2luZGV4LnRzeA==) | `88.46% <88.46%> (ø)` | |
| [web/src/pages/Proto/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Qcm90by9MaXN0LnRzeA==) | `96.15% <96.15%> (ø)` | |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `87.50% <100.00%> (+0.32%)` | :arrow_up: |
| [web/src/hooks/usePagination.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9ob29rcy91c2VQYWdpbmF0aW9uLnRz) | `100.00% <100.00%> (ø)` | |
| [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | `88.57% <100.00%> (+1.07%)` | :arrow_up: |
| [web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==) | `71.42% <100.00%> (-1.08%)` | :arrow_down: |
| ... and [9 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...f330219](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f330219) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **increase** coverage by `1.74%`.
> The diff coverage is `96.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
+ Coverage 69.75% 71.50% +1.74%
==========================================
Files 184 58 -126
Lines 7284 3955 -3329
Branches 832 0 -832
==========================================
- Hits 5081 2828 -2253
+ Misses 1907 832 -1075
+ Partials 296 295 -1
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `36.81% <34.00%> (-0.30%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `59.54% <84.00%> (+0.33%)` | :arrow_up: |
| backend-unit-test | `49.31% <55.10%> (+0.08%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `90.90% <ø> (ø)` | |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `72.91% <77.77%> (+0.32%)` | :arrow_up: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `87.50% <100.00%> (+0.32%)` | :arrow_up: |
| [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv) | `44.88% <0.00%> (-2.37%)` | :arrow_down: |
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | | |
| [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | | |
| [web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==) | | |
| [web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==) | | |
| [web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=) | | |
| ... and [123 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...f330219](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r820558332
##########
File path: api/internal/handler/system_config/system_config.go
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+ "github.com/apisix/manager-api/internal/handler"
+ "github.com/gin-gonic/gin"
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/shiningrush/droplet/wrapper"
+ wgin "github.com/shiningrush/droplet/wrapper/gin"
Review comment:
Hello, better to sort the package, you can refer to other files.
##########
File path: api/test/e2enew/system_config/system_config_test.go
##########
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "net/http"
+
+ . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/extensions/table"
+
+ "github.com/apisix/manager-api/test/e2enew/base"
+)
+
+var _ = Describe("system config", func() {
+ DescribeTable("test system config data CURD",
+ func(tc base.HttpTestCase) {
+ base.RunTestCase(tc)
+ },
+
+ Entry("get system config should get not found error", base.HttpTestCase{
+ Object: base.ManagerApiExpect(),
+ Method: http.MethodGet,
+ Path: "/apisix/admin/system_config/grafana",
+ Headers: map[string]string{"Authorization": base.GetToken()},
+ ExpectStatus: http.StatusNotFound,
+ }),
+
+ Entry("create system config should success", base.HttpTestCase{
+ Object: base.ManagerApiExpect(),
+ Method: http.MethodPost,
+ Path: "/apisix/admin/system_config",
+ Body: `{
+ "config_name": "grafana",
+ "payload": {"url":"http://127.0.0.1:3000"}
+ }`,
+ Headers: map[string]string{"Authorization": base.GetToken()},
+ ExpectStatus: http.StatusOK,
+ ExpectBody: "\"config_name\":\"grafana\",\"payload\":{\"url\":\"http://127.0.0.1:3000\"}",
+ }),
+
+ Entry("after create system config get config should success", base.HttpTestCase{
Review comment:
```suggestion
Entry("after create system config get config should succed", base.HttpTestCase{
```
##########
File path: api/internal/handler/system_config/system_config.go
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+ "github.com/apisix/manager-api/internal/handler"
+ "github.com/gin-gonic/gin"
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/shiningrush/droplet/wrapper"
+ wgin "github.com/shiningrush/droplet/wrapper/gin"
+ "net/http"
+ "reflect"
+ "time"
+)
+
+type Handler struct {
+ systemConfig store.Interface
+}
+
+func NewHandler() (handler.RouteRegister, error) {
+ return &Handler{
+ systemConfig: store.GetStore(store.HubKeySystemConfig),
+ }, nil
+}
+
+func (h *Handler) ApplyRoute(r *gin.Engine) {
+ r.GET("/apisix/admin/system_config/:config_name", wgin.Wraps(h.Get,
+ wrapper.InputType(reflect.TypeOf(GetInput{}))))
+ r.POST("/apisix/admin/system_config", wgin.Wraps(h.Post,
+ wrapper.InputType(reflect.TypeOf(entity.SystemConfig{}))))
+ r.PUT("/apisix/admin/system_config", wgin.Wraps(h.Put,
+ wrapper.InputType(reflect.TypeOf(entity.SystemConfig{}))))
+ r.DELETE("/apisix/admin/system_config/:config_name", wgin.Wraps(h.Delete,
+ wrapper.InputType(reflect.TypeOf(DeleteInput{}))))
+}
+
+type GetInput struct {
+ ConfigName string `auto_read:"config_name,path" validate:"required"`
+}
+
+func (h *Handler) Get(c droplet.Context) (interface{}, error) {
+ input := c.Input().(*GetInput)
+ r, err := h.systemConfig.Get(c.Context(), input.ConfigName)
+
+ if err != nil {
+ return &data.SpecCodeResponse{StatusCode: http.StatusNotFound}, err
Review comment:
I think maybe you can use `handler.SpecCodeResponse(err)`
##########
File path: api/test/e2enew/system_config/system_config_test.go
##########
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "net/http"
+
+ . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/extensions/table"
+
+ "github.com/apisix/manager-api/test/e2enew/base"
+)
+
+var _ = Describe("system config", func() {
+ DescribeTable("test system config data CURD",
+ func(tc base.HttpTestCase) {
+ base.RunTestCase(tc)
+ },
+
+ Entry("get system config should get not found error", base.HttpTestCase{
+ Object: base.ManagerApiExpect(),
+ Method: http.MethodGet,
+ Path: "/apisix/admin/system_config/grafana",
+ Headers: map[string]string{"Authorization": base.GetToken()},
+ ExpectStatus: http.StatusNotFound,
+ }),
+
+ Entry("create system config should success", base.HttpTestCase{
+ Object: base.ManagerApiExpect(),
+ Method: http.MethodPost,
+ Path: "/apisix/admin/system_config",
+ Body: `{
+ "config_name": "grafana",
+ "payload": {"url":"http://127.0.0.1:3000"}
+ }`,
+ Headers: map[string]string{"Authorization": base.GetToken()},
+ ExpectStatus: http.StatusOK,
+ ExpectBody: "\"config_name\":\"grafana\",\"payload\":{\"url\":\"http://127.0.0.1:3000\"}",
+ }),
+
+ Entry("after create system config get config should success", base.HttpTestCase{
+ Object: base.ManagerApiExpect(),
+ Method: http.MethodGet,
+ Path: "/apisix/admin/system_config/grafana",
+ Headers: map[string]string{"Authorization": base.GetToken()},
+ ExpectStatus: http.StatusOK,
+ ExpectBody: "\"config_name\":\"grafana\",\"payload\":{\"url\":\"http://127.0.0.1:3000\"}",
+ }),
+
+ Entry("update system config should success", base.HttpTestCase{
+ Object: base.ManagerApiExpect(),
+ Method: http.MethodPut,
+ Path: "/apisix/admin/system_config",
+ Body: `{
+ "config_name": "grafana",
+ "payload": {"url":"http://127.0.0.1:2000"}
+ }`,
+ Headers: map[string]string{"Authorization": base.GetToken()},
+ ExpectStatus: http.StatusOK,
+ ExpectBody: "\"config_name\":\"grafana\",\"payload\":{\"url\":\"http://127.0.0.1:2000\"}",
+ }),
Review comment:
Maybe you can get the config to ensure the update is successful
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bzp2010 commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822703792
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,34 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
Review comment:
> Please take a look at this issue, schema.json will be automatically generated by control API only, if we add it manually, it will be difficult to maintain. Do you have any suggestion?
@jwrookie I think the comment only needs to be `resolved` by the reviewer himself, if it is always closed by your, other reviewers will not be aware of the progress of the review and existing problems. This time I didn't notice the content of this review. 😂
@nic-chen Please take a look at this issue, `schema.json` will be automatically generated by control API only, if we add it manually, it will be difficult to maintain. Do you have any suggestion?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bzp2010 commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822706847
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
https://github.com/apache/apisix-dashboard/blob/561ed377ec2237707bb8c78623e336360c6c6463/api/internal/handler/stream_route/stream_route_test.go#L31-L71
You can take a look at these, I don't think it makes sense to run these tests through Mock, but unit tests can be used such as data unmarshal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r823246311
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
> and the unit test can walk through the handling logic, so it makes sense.
I think we can keep it, even if the logic is very simple and doesn't make sense.
Once the handle contains complex logic, the effect will be obvious.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822219715
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,33 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
+ "properties":{
+ "config_name":{
+ "maxLength":100,
+ "minLength":1,
+ "pattern":"^[a-zA-Z0-9_]+$",
+ "type":"string"
+ },
+ "desc":{
+ "maxLength":256,
+ "type":"string"
+ },
+ "payload":{
+ "type":"object"
+ },
+ "create_time":{
+ "type":"integer"
+ },
+ "update_time":{
+ "type":"integer"
+ }
+ },
+ "required":[
+ "config_name"
Review comment:
payload should be required
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822732258
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
Do you mean `get` needs to test data unmarshal, the other operations remain unchanged?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (437efa6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `32.83%`.
> The diff coverage is `28.33%`.
> :exclamation: Current head 437efa6 differs from pull request most recent head 0805c42. Consider uploading reports for the commit 0805c42 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
===========================================
- Coverage 69.75% 36.92% -32.84%
===========================================
Files 184 58 -126
Lines 7284 3965 -3319
Branches 832 0 -832
===========================================
- Hits 5081 1464 -3617
- Misses 1907 2227 +320
+ Partials 296 274 -22
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `36.92% <28.33%> (-0.19%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `?` | |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `68.18% <ø> (-22.73%)` | :arrow_down: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `26.00% <26.00%> (ø)` | |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `48.61% <33.33%> (-23.99%)` | :arrow_down: |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `80.00% <100.00%> (-7.18%)` | :arrow_down: |
| [api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==) | `0.00% <0.00%> (-80.00%)` | :arrow_down: |
| [api/internal/handler/schema/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3BsdWdpbi5nbw==) | `20.00% <0.00%> (-80.00%)` | :arrow_down: |
| [api/internal/core/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9taWdyYXRlLmdv) | `0.00% <0.00%> (-76.20%)` | :arrow_down: |
| [api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=) | `10.34% <0.00%> (-75.87%)` | :arrow_down: |
| [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==) | `28.00% <0.00%> (-72.00%)` | :arrow_down: |
| [api/internal/handler/consumer/consumer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvY29uc3VtZXIvY29uc3VtZXIuZ28=) | `23.80% <0.00%> (-68.26%)` | :arrow_down: |
| ... and [160 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...0805c42](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (67c7c28) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **increase** coverage by `0.49%`.
> The diff coverage is `95.52%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
+ Coverage 69.75% 70.25% +0.49%
==========================================
Files 184 189 +5
Lines 7284 7375 +91
Branches 832 826 -6
==========================================
+ Hits 5081 5181 +100
+ Misses 1907 1899 -8
+ Partials 296 295 -1
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `37.10% <43.10%> (+<0.01%)` | :arrow_up: |
| backend-e2e-test-ginkgo | `60.16% <93.10%> (+0.95%)` | :arrow_up: |
| backend-unit-test | `49.30% <47.36%> (+0.07%)` | :arrow_up: |
| frontend-e2e-test | `68.52% <94.73%> (+0.46%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `90.90% <ø> (ø)` | |
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | `73.77% <ø> (+3.27%)` | :arrow_up: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `73.10% <88.23%> (+0.51%)` | :arrow_up: |
| [...b/src/pages/Proto/components/ProtoDrawer/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Qcm90by9jb21wb25lbnRzL1Byb3RvRHJhd2VyL2luZGV4LnRzeA==) | `88.46% <88.46%> (ø)` | |
| [web/src/pages/Proto/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Qcm90by9MaXN0LnRzeA==) | `96.15% <96.15%> (ø)` | |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `87.50% <100.00%> (+0.32%)` | :arrow_up: |
| [web/src/hooks/usePagination.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9ob29rcy91c2VQYWdpbmF0aW9uLnRz) | `100.00% <100.00%> (ø)` | |
| [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | `88.57% <100.00%> (+1.07%)` | :arrow_up: |
| [web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==) | `71.42% <100.00%> (-1.08%)` | :arrow_down: |
| ... and [9 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...67c7c28](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822781693
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSystem_Get(t *testing.T) {
Review comment:
thx for your reply!
I think that only the data layer would use mock instead, and the unit test can walk through the handle logic, so it makes sense.
Maybe it's because the handle very simple and you think it doesn't make sense? if that's the case, I take your advice.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bzp2010 commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r822703792
##########
File path: api/conf/schema.json
##########
@@ -3022,6 +3022,34 @@
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
+ },
+ "system_config":{
Review comment:
> Please take a look at this issue, schema.json will be automatically generated by control API only, if we add it manually, it will be difficult to maintain. Do you have any suggestion?
@jwrookie I think the comment only needs to be `resolved` by the reviewer himself, if it is always closed by your, other reviewers will not be aware of the progress of the review and existing problems. This time I didn't notice this review. 😂
@nic-chen Please take a look at this issue, `schema.json` will be automatically generated by control API only, if we add it manually, it will be difficult to maintain. Do you have any suggestion?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1063744535
> @nic-chen after communicating with @bzp2010 , it will be done by other pr
please create an issue to track it, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r820568610
##########
File path: api/internal/handler/handler_test.go
##########
@@ -38,7 +38,7 @@ func TestSpecCodeResponse(t *testing.T) {
resp = SpecCodeResponse(err)
assert.Equal(t, &data.SpecCodeResponse{StatusCode: http.StatusNotFound}, resp)
- err = errors.New("system error")
+ err = errors.New("system_config error")
Review comment:
why change this?
##########
File path: api/internal/core/entity/entity.go
##########
@@ -304,3 +304,12 @@ type StreamRoute struct {
UpstreamID interface{} `json:"upstream_id,omitempty"`
Plugins map[string]interface{} `json:"plugins,omitempty"`
}
+
+// swagger:model SystemConfig
+type SystemConfig struct {
+ ConfigName string `json:"config_name"`
+ Desc string `json:"desc,omitempty"`
+ Payload map[string]interface{} `json:"payload,omitempty"`
Review comment:
does `Payload` need to be a map? maybe some configurations are string, float, or something?
##########
File path: api/internal/handler/system_config/system_config.go
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+ "github.com/apisix/manager-api/internal/handler"
+ "github.com/gin-gonic/gin"
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/shiningrush/droplet/wrapper"
+ wgin "github.com/shiningrush/droplet/wrapper/gin"
+ "net/http"
+ "reflect"
+ "time"
+)
+
+type Handler struct {
+ systemConfig store.Interface
+}
+
+func NewHandler() (handler.RouteRegister, error) {
+ return &Handler{
+ systemConfig: store.GetStore(store.HubKeySystemConfig),
+ }, nil
+}
+
+func (h *Handler) ApplyRoute(r *gin.Engine) {
+ r.GET("/apisix/admin/system_config/:config_name", wgin.Wraps(h.Get,
+ wrapper.InputType(reflect.TypeOf(GetInput{}))))
+ r.POST("/apisix/admin/system_config", wgin.Wraps(h.Post,
+ wrapper.InputType(reflect.TypeOf(entity.SystemConfig{}))))
+ r.PUT("/apisix/admin/system_config", wgin.Wraps(h.Put,
+ wrapper.InputType(reflect.TypeOf(entity.SystemConfig{}))))
+ r.DELETE("/apisix/admin/system_config/:config_name", wgin.Wraps(h.Delete,
+ wrapper.InputType(reflect.TypeOf(DeleteInput{}))))
+}
+
+type GetInput struct {
+ ConfigName string `auto_read:"config_name,path" validate:"required"`
+}
+
+func (h *Handler) Get(c droplet.Context) (interface{}, error) {
+ input := c.Input().(*GetInput)
+ r, err := h.systemConfig.Get(c.Context(), input.ConfigName)
+
+ if err != nil {
+ return &data.SpecCodeResponse{StatusCode: http.StatusNotFound}, err
+ }
+
+ return r, nil
+}
+
+func (h *Handler) Post(c droplet.Context) (interface{}, error) {
+ input := c.Input().(*entity.SystemConfig)
+ input.CreateTime = time.Now().Unix()
+ input.UpdateTime = time.Now().Unix()
+
+ // create
+ res, err := h.systemConfig.Create(c.Context(), input)
Review comment:
need JSON schema verification before create
##########
File path: api/internal/core/store/storehub.go
##########
@@ -229,5 +230,17 @@ func InitStores() error {
return err
}
+ err = InitStore(HubKeySystemConfig, GenericStoreOption{
+ BasePath: conf.ETCDConfig.Prefix + "/system_config",
+ ObjType: reflect.TypeOf(entity.SystemConfig{}),
+ KeyFunc: func(obj interface{}) string {
+ r := obj.(*entity.SystemConfig)
+ return utils.InterfaceToString(r.ConfigName)
Review comment:
`r.ConfigName` is not an interface
##########
File path: api/internal/handler/system_config/system_config_test.go
##########
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package system_config
+
+import (
+ "errors"
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
+ "github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
Review comment:
code style
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on a change in pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on a change in pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#discussion_r820572861
##########
File path: api/internal/handler/handler_test.go
##########
@@ -38,7 +38,7 @@ func TestSpecCodeResponse(t *testing.T) {
resp = SpecCodeResponse(err)
assert.Equal(t, &data.SpecCodeResponse{StatusCode: http.StatusNotFound}, resp)
- err = errors.New("system error")
+ err = errors.New("system_config error")
Review comment:
Oh, it was a mistake, sorry!
> why change this?
Oh, it was a mistake, sorry!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (67c7c28) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **increase** coverage by `1.98%`.
> The diff coverage is `96.55%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
==========================================
+ Coverage 69.75% 71.73% +1.98%
==========================================
Files 184 58 -126
Lines 7284 3956 -3328
Branches 832 0 -832
==========================================
- Hits 5081 2838 -2243
+ Misses 1907 823 -1084
+ Partials 296 295 -1
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `37.10% <43.10%> (+<0.01%)` | :arrow_up: |
| backend-e2e-test-ginkgo | `60.16% <93.10%> (+0.95%)` | :arrow_up: |
| backend-unit-test | `49.30% <47.36%> (+0.07%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `90.90% <ø> (ø)` | |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `73.10% <88.23%> (+0.51%)` | :arrow_up: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `100.00% <100.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `87.50% <100.00%> (+0.32%)` | :arrow_up: |
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | | |
| [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | | |
| [web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==) | | |
| [web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==) | | |
| [web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=) | | |
| [web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4) | | |
| ... and [124 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...67c7c28](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1060212801
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2362](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (eb48288) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9d99ab79afe63aed60da7899a3f9bee9a5380026?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d99ab7) will **decrease** coverage by `20.45%`.
> The diff coverage is `47.36%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2362 +/- ##
===========================================
- Coverage 69.75% 49.30% -20.46%
===========================================
Files 184 42 -142
Lines 7284 3221 -4063
Branches 832 0 -832
===========================================
- Hits 5081 1588 -3493
+ Misses 1907 1434 -473
+ Partials 296 199 -97
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `49.30% <47.36%> (+0.07%)` | :arrow_up: |
| frontend-e2e-test | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <ø> (-90.91%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
| [...pi/internal/handler/system\_config/system\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3lzdGVtX2NvbmZpZy9zeXN0ZW1fY29uZmlnLmdv) | `67.50% <67.50%> (ø)` | |
| [api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
| [api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=) | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
| ... and [170 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2362/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6367ffd...eb48288](https://codecov.io/gh/apache/apisix-dashboard/pull/2362?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] jwrookie commented on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
jwrookie commented on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1062520188
Frontend e2e test error, pls rerun thx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] forgaoqiang commented on pull request #2362: feat: storage grafana path in to etcd
Posted by GitBox <gi...@apache.org>.
forgaoqiang commented on pull request #2362:
URL: https://github.com/apache/apisix-dashboard/pull/2362#issuecomment-1070374215
finally, this feature come into the reality
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org