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 2021/04/19 03:38:21 UTC
[GitHub] [apisix-dashboard] bisakhmondal opened a new pull request #1788: feat: embed assets in api binary
bisakhmondal opened a new pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788
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?**
[Comment #1391 ](https://github.com/apache/apisix-dashboard/issues/1391#issuecomment-821702445)
**Related issues**
resolve #1391
**Checklist:**
- [x] Did you explain what problem does this PR solve? Or what new features have been added?
- [ ] Have you added corresponding test cases?
- [ ] Have you modified the corresponding document?
- [ ] 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
starsz commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841795464
Hi, @bisakhmondal
> it will have another job that is writing the lua package into temporary directory (`os.TempDir()`).
I don't get the point of this line, can you give more details about 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbf071b) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1d2bc545c6e081f9ce0270ae12d61eecdaadab0e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1d2bc54) will **decrease** coverage by `9.46%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
- Coverage 72.13% 62.66% -9.47%
==========================================
Files 132 163 +31
Lines 5721 5596 -125
Branches 649 703 +54
==========================================
- Hits 4127 3507 -620
- Misses 1350 1901 +551
+ Partials 244 188 -56
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.41% <ø> (+0.11%)` | :arrow_up: |
| frontend-e2e-test | `72.06% <ø> (-0.94%)` | :arrow_down: |
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/1788?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/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788/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/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-71.03%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-66.67%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
| [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
| [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
| ... and [105 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [1d2bc54...dbf071b](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r622099631
##########
File path: api/internal/route.go
##########
@@ -54,10 +55,13 @@ func SetUpRouter() *gin.Engine {
r := gin.New()
logger := log.GetLogger(log.AccessLog)
r.Use(filter.CORS(), filter.RequestId(), filter.IPFilter(), filter.RequestLogHandler(logger), filter.SchemaCheck(), filter.RecoverHandler())
- r.Use(static.Serve("/", static.LocalFile(filepath.Join(conf.WorkDir, conf.WebDir), false)))
- r.NoRoute(func(c *gin.Context) {
- c.File(fmt.Sprintf("%s/index.html", filepath.Join(conf.WorkDir, conf.WebDir)))
- })
+ filesystem := fs.FS(StaticFiles)
+ subtree, err := fs.Sub(filesystem, "html")
+
+ if err != nil {
+ log.Errorf("%s\n", err)
Review comment:
Okay!! I thought users could opt to operate through CLI even without the UI, so skipped intentionally.
changing..
##########
File path: api/test/shell/cli_test.sh
##########
@@ -118,45 +118,45 @@ if [[ `grep -c "INFO" ./error.log` -eq '0' ]]; then
fi
# run on a different path
-workDir=$(pwd)
-rm -rf html
-mkdir html
-cd html
-echo "hi~" >> index.html
-APISIX_API_WORKDIR=$workDir $workDir/manager-api &
-sleep 5
-
-res=$(curl http://127.0.0.1:9000)
-$workDir/manager-api stop
-sleep 6
-cd -
-rm -rf html
-
-if [[ $res != "hi~" ]]; then
- echo "failed: manager-api cant run on a different path"
- exit 1
-fi
+# workDir=$(pwd)
Review comment:
Cool
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] github-actions[bot] commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-981057023
This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
--
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] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r635717395
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
hi, are you sure? Won't that be time-consuming during testing and development?
BTW, the file gets replaced by the actual build when we issue a full build.
let me know what 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.
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634249732
##########
File path: api/internal/route.go
##########
@@ -91,3 +94,55 @@ func SetUpRouter() *gin.Engine {
return r
}
+
+type spaFileSystem struct {
+ http.FileSystem
+}
+
+func (fs *spaFileSystem) Open(name string) (http.File, error) {
+ f, err := fs.FileSystem.Open(name)
+ //Default failsafe page
+ if err != nil {
+ return fs.FileSystem.Open("index.html")
+ }
+ return f, err
+}
+
+var HTMLBlackListRoutes = []string{
+ "/apisix",
+ "/ping",
+}
+
+func serve(urlPrefix string, fss fs.FS) gin.HandlerFunc {
+ fileserver := http.FileServer(&spaFileSystem{http.FS(fss)})
+ if urlPrefix != "" {
+ fileserver = http.StripPrefix(urlPrefix, fileserver)
+ }
+ return func(c *gin.Context) {
+
+ if c.Request.Method == "GET" &&
+ (exists(urlPrefix, c.Request.URL.Path, &fss) || !isBlacklisted(c.Request.URL.Path)) {
Review comment:
I don't quite understand why these two functions are the same. .
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r637042871
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
Oh, actually I thought for every build, you wish to build HTML
> We cannot embed old files, but files built from the current source.
Yes the current code also ensures that too[ref](https://github.com/apache/apisix-dashboard/pull/1788/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R46-R49)
` rm -rf api/cmd/html && git checkout api/cmd/html/ && api/build.sh && mkdir -p output/logs`
The `rm -rf` and `checkout` is helpful because I have excluded all build files except `index.html` from the HTML dir.
To be honest, the static index.html serves two purpose
1. preventing the error from go embed the empty directory.
2. Instead of filling the directory with some garbage file, an HTML with a message seems reasonable. As anyways it will get replaced by web build's index.html.
Let me know what changes should I make
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822147200
As `go:embed` and related package `io/fs` has been introduced in stable go version 1.16, we need to update the CI in the master branch. We can cherry-pick the CI update commit from this PR.
cc @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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* processing.
Building with commit 99e2684b9873f5c52d2f83802d6f60ade71000e5
https://app.netlify.com/sites/apisix-dashboard/deploys/607e81a2be0597000881c19e
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] github-actions[bot] closed pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788
--
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] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* ready!
Built with commit 5052024257e5e744a703480d02c2f49bb11600fb
https://deploy-preview-1788--apisix-dashboard.netlify.app
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fbf9a47) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **increase** coverage by `2.29%`.
> The diff coverage is `57.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
+ Coverage 67.72% 70.01% +2.29%
==========================================
Files 170 48 -122
Lines 6382 3292 -3090
Branches 745 0 -745
==========================================
- Hits 4322 2305 -2017
+ Misses 1803 728 -1075
- Partials 257 259 +2
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.77% <57.69%> (?)` | |
| backend-e2e-test-ginkgo | `48.29% <57.69%> (-0.28%)` | :arrow_down: |
| backend-unit-test | `52.45% <ø> (ø)` | |
| 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/1788?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/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-5.57%)` | :arrow_down: |
| [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `48.27% <100.00%> (ø)` | |
| [web/src/components/PluginFlow/constants.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbkZsb3cvY29uc3RhbnRzLnRz) | | |
| [web/src/app.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9hcHAudHN4) | | |
| [web/src/pages/Setting/Setting.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9TZXR0aW5nL1NldHRpbmcudHN4) | | |
| [web/src/components/Footer/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL0Zvb3Rlci9pbmRleC50c3g=) | | |
| [web/src/components/RawDataEditor/RawDataEditor.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1Jhd0RhdGFFZGl0b3IvUmF3RGF0YUVkaXRvci50c3g=) | | |
| [...am/components/passive-check/Unhealthy/Timeouts.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvcGFzc2l2ZS1jaGVjay9VbmhlYWx0aHkvVGltZW91dHMudHN4) | | |
| [...components/active-check/Unhealthy/HttpFailures.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL1VuaGVhbHRoeS9IdHRwRmFpbHVyZXMudHN4) | | |
| [web/src/components/Plugin/PluginDetail.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5EZXRhaWwudHN4) | | |
| ... and [123 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...fbf9a47](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634528665
##########
File path: api/build.sh
##########
@@ -32,13 +35,13 @@ set -x
export ENV=local
pwd=`pwd`
-rm -rf output && mkdir -p output/conf && mkdir -p output/dag-to-lua
+rm -rf output && mkdir -p output/conf && mkdir -p ./api/cmd/dag-to-lua
Review comment:
for two reasons :)
1. we cant embed an empty directory.
2. the embedded directory must be inside the package directory or subdirectory. for `// go:embed` to works.
>Go source files that import "embed" can use the //go:embed directive to initialize a variable of type string, []byte, or FS with the contents of files read from the package directory or subdirectories at compile time.
[reference](https://golang.org/pkg/embed/)
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fbf9a47) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `1.34%`.
> The diff coverage is `57.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
- Coverage 67.72% 66.37% -1.35%
==========================================
Files 170 48 -122
Lines 6382 3292 -3090
Branches 745 0 -745
==========================================
- Hits 4322 2185 -2137
+ Misses 1803 828 -975
- Partials 257 279 +22
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.77% <57.69%> (?)` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.45% <ø> (ø)` | |
| 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/1788?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/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-5.57%)` | :arrow_down: |
| [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `48.27% <100.00%> (ø)` | |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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: |
| [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `56.92% <0.00%> (-26.16%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `31.93% <0.00%> (-23.53%)` | :arrow_down: |
| [api/internal/log/log.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2xvZy9sb2cuZ28=) | `40.00% <0.00%> (-10.00%)` | :arrow_down: |
| [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `90.47% <0.00%> (-9.53%)` | :arrow_down: |
| [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `68.51% <0.00%> (-9.26%)` | :arrow_down: |
| [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `71.42% <0.00%> (-8.17%)` | :arrow_down: |
| [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `67.53% <0.00%> (-5.76%)` | :arrow_down: |
| ... and [134 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...fbf9a47](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-840993732
> Hi guys,
> regarding embedding the static lua codes into the binary,
>
> this is the method that handles the conversion of lua code, but I am not getting how this is done!!
> https://github.com/apache/apisix-dashboard/blob/a59e8eff7ecdf38c197b4678c34d2fd15f364f72/api/internal/handler/route/route.go#L271-L306
>
> The documentation in `gopher-lua` is not that good.
> Could anyone give me some details?
>
> It seems pointing to the directory is enough, but after the embedding, it's going to be an **in-memory filesystem**.
> I haven't found such apis in gopher-lua, could you please guide me?
> Thanks.
Are there any related error logs?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r621747645
##########
File path: Makefile
##########
@@ -50,10 +59,17 @@ endif
.PHONY: api-default
api-default:
ifeq ("$(wildcard $(GO_EXEC))", "")
- @echo "ERROR: Need to install golang 1.13+ first"
+ @echo "ERROR: Need to install golang 1.16+ first"
exit 1
endif
-
+ @if [ "${GO_MAJOR}" -lt "${REQUIRED_MIN_GO_MAJOR}" ] ; then \
+ echo "ERROR: Need to install golang 1.16+ first"; \
+ exit 1; \
+ fi
+ @if [ "${GO_MINOR}" -lt "${REQUIRED_MIN_GO_MINOR}" ] ; then \
+ echo "ERROR: Need to install golang 1.16+ first"; \
+ exit 1; \
+ fi
Review comment:
The logic will make a mistake if we use the go version like 2.0 in the future.
: )
##########
File path: api/internal/route.go
##########
@@ -54,10 +55,13 @@ func SetUpRouter() *gin.Engine {
r := gin.New()
logger := log.GetLogger(log.AccessLog)
r.Use(filter.CORS(), filter.RequestId(), filter.IPFilter(), filter.RequestLogHandler(logger), filter.SchemaCheck(), filter.RecoverHandler())
- r.Use(static.Serve("/", static.LocalFile(filepath.Join(conf.WorkDir, conf.WebDir), false)))
- r.NoRoute(func(c *gin.Context) {
- c.File(fmt.Sprintf("%s/index.html", filepath.Join(conf.WorkDir, conf.WebDir)))
- })
+ filesystem := fs.FS(StaticFiles)
+ subtree, err := fs.Sub(filesystem, "html")
+
Review comment:
Redundant line.
##########
File path: api/internal/route.go
##########
@@ -54,10 +55,13 @@ func SetUpRouter() *gin.Engine {
r := gin.New()
logger := log.GetLogger(log.AccessLog)
r.Use(filter.CORS(), filter.RequestId(), filter.IPFilter(), filter.RequestLogHandler(logger), filter.SchemaCheck(), filter.RecoverHandler())
- r.Use(static.Serve("/", static.LocalFile(filepath.Join(conf.WorkDir, conf.WebDir), false)))
- r.NoRoute(func(c *gin.Context) {
- c.File(fmt.Sprintf("%s/index.html", filepath.Join(conf.WorkDir, conf.WebDir)))
- })
+ filesystem := fs.FS(StaticFiles)
+ subtree, err := fs.Sub(filesystem, "html")
+
+ if err != nil {
+ log.Errorf("%s\n", err)
Review comment:
I think we should panic here if we can't embed assets in API binary.
##########
File path: api/test/shell/cli_test.sh
##########
@@ -118,45 +118,45 @@ if [[ `grep -c "INFO" ./error.log` -eq '0' ]]; then
fi
# run on a different path
-workDir=$(pwd)
-rm -rf html
-mkdir html
-cd html
-echo "hi~" >> index.html
-APISIX_API_WORKDIR=$workDir $workDir/manager-api &
-sleep 5
-
-res=$(curl http://127.0.0.1:9000)
-$workDir/manager-api stop
-sleep 6
-cd -
-rm -rf html
-
-if [[ $res != "hi~" ]]; then
- echo "failed: manager-api cant run on a different path"
- exit 1
-fi
+# workDir=$(pwd)
Review comment:
I think we can remove them if we don't use them.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* processing.
Building with commit dbf071b769b9baa17ae89664016f3f52eee2068c
https://app.netlify.com/sites/apisix-dashboard/deploys/607cfb2800cb380007526a5b
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634526940
##########
File path: api/internal/route.go
##########
@@ -91,3 +94,55 @@ func SetUpRouter() *gin.Engine {
return r
}
+
+type spaFileSystem struct {
+ http.FileSystem
+}
+
+func (fs *spaFileSystem) Open(name string) (http.File, error) {
+ f, err := fs.FileSystem.Open(name)
+ //Default failsafe page
+ if err != nil {
+ return fs.FileSystem.Open("index.html")
+ }
+ return f, err
+}
+
+var HTMLBlackListRoutes = []string{
+ "/apisix",
+ "/ping",
+}
+
+func serve(urlPrefix string, fss fs.FS) gin.HandlerFunc {
+ fileserver := http.FileServer(&spaFileSystem{http.FS(fss)})
+ if urlPrefix != "" {
+ fileserver = http.StripPrefix(urlPrefix, fileserver)
+ }
+ return func(c *gin.Context) {
+
+ if c.Request.Method == "GET" &&
+ (exists(urlPrefix, c.Request.URL.Path, &fss) || !isBlacklisted(c.Request.URL.Path)) {
Review comment:
Actually its all because Single Page Application strategy followed by React.js. As there is a single `index.html` and each time for a different route the sameDOM gets updated.
Actually for web server the `exists` methods makes sense, as the serving is acted as a middleware, obviously we wouldn't wish to shove HTML content for each request, some condition checking must be there. `exists` check is the required resource file (got through the request path) is present in the HTML directory, if yes, send the file and terminate the request from further propagation, else pass the request to next middleware.
This was okay until I checked with direct route pasted on the browser for eg, (localhost:9000/route/list), as it was not propagated from index.html the `exists` didn't work. But rest of the cases from login to page visits, logout everything was fine.
So I came up with `isBlacklisted`, if the route prefix is not HTML blacklisted for example `/admin` or `/ping` and the request type is `GET` serve the static HTML.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841787048
@nic-chen Something just come up into my mind. Let me know what you think about it.
Since our main goal is to create a single binary, we can tackle the issue (I've described earlier) by this way,
step-1
`during build : ` it involves downloading the lua scripts and integrate it into a single binary.
[now the lua package is in memory whenever the manager api will start]
step-2
`running manager-api : ` whenever the binary of manager-api will be loaded into memory, along with jobs including writing pid file, ..., it will have another job that is writing the lua package into temporary directory (`os.TempDir()`).
step-3
`cleanup during stop: ` Optional.
Now, this approach won't affect the current way we are translating the Lua script.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-845633963
> Now, we don't have a method that doesn't embed assets in API binary?
yes, the good old `make api-run` doesn't embed web assets and lua scripts.
And newly introduced `make api-build` creates a build without embedding web assets.
> There is an empty file `api/cmd/dag-to-lua/keep`.
Yes, that's an ongoing discussion, please share your views,
https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634528665
https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634248776
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-823779141
> hi @bisakhmondal
> I think we should also embed `dag-to-lua`, see:
> https://github.com/apache/apisix-dashboard/blob/master/api/build.sh#L38-L42
Okay. Let me have a look. I'll update it accordingly. 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634530801
##########
File path: api/test/shell/cli_test.sh
##########
@@ -117,47 +117,8 @@ if [[ `grep -c "INFO" ./error.log` -eq '0' ]]; then
exit 1
fi
-# run on a different path
-workDir=$(pwd)
-rm -rf html
-mkdir html
-cd html
-echo "hi~" >> index.html
-APISIX_API_WORKDIR=$workDir $workDir/manager-api &
-sleep 5
-
-res=$(curl http://127.0.0.1:9000)
-$workDir/manager-api stop
-sleep 6
-cd -
-rm -rf html
-
-if [[ $res != "hi~" ]]; then
- echo "failed: manager-api cant run on a different path"
- exit 1
-fi
clean_up
-# run with -p flag out of the default directory
-workDir=$(pwd)
-distDir=/tmp/manager-api
-cp -r $workDir $distDir
-cd $distDir && rm -rf bin && mkdir bin && mv ./manager-api ./bin/
-cd $distDir && rm -rf html && mkdir html && echo "hi~" >> html/index.html
-cd $distDir/bin && ./manager-api -p $distDir &
-sleep 5
-
-res=$(curl http://127.0.0.1:9000)
-$distDir/bin/manager-api stop
-sleep 6
-rm -fr $distDir
-
-if [[ $res != "hi~" ]]; then
- echo "failed: manager-api can't run with -p flag out of the default directory"
- exit 1
-fi
-cd $workDir && git checkout conf/conf.yaml
-
# test start info
Review comment:
Yes, I can add tests for when the web build is not embedded, as comparing less content is easy.
But when web build is embedded, I'm not sure how to do it.
Do you have a plan?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-823769178
hi @bisakhmondal
I think we should also embed `dag-to-lua`, see:
https://github.com/apache/apisix-dashboard/blob/master/api/build.sh#L38-L42
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* processing.
Building with commit fbf9a47cb7c9adb23b2752f43b5cd441590bd3dc
https://app.netlify.com/sites/apisix-dashboard/deploys/609d57b148f5e40007f498f0
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-831101776
and the conflicts too :)
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbf071b) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1d2bc545c6e081f9ce0270ae12d61eecdaadab0e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1d2bc54) will **decrease** coverage by `19.72%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
===========================================
- Coverage 72.13% 52.41% -19.73%
===========================================
Files 132 38 -94
Lines 5721 2675 -3046
Branches 649 0 -649
===========================================
- Hits 4127 1402 -2725
+ Misses 1350 1085 -265
+ Partials 244 188 -56
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.41% <ø> (+0.11%)` | :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/1788?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/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788/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/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-71.03%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-66.67%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
| [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
| [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
| ... and [117 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [1d2bc54...dbf071b](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822427098
go1.16 has been added to the environment
https://github.com/apache/apisix-dashboard/pull/1788/checks?check_run_id=2380595572#step:4:10
but still `api/test/shell/cli_test.sh` is using 1.15
https://github.com/apache/apisix-dashboard/pull/1788/checks?check_run_id=2380595572#step:6:79
any idea why🤔
--
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.
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r636578293
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
Sure. Maybe we could add a parameter, `make api-run` does not need to embed, `make build` does.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r631951381
##########
File path: Makefile
##########
@@ -50,10 +59,17 @@ endif
.PHONY: api-default
api-default:
ifeq ("$(wildcard $(GO_EXEC))", "")
- @echo "ERROR: Need to install golang 1.13+ first"
+ @echo "ERROR: Need to install golang 1.16+ first"
exit 1
endif
-
+ @if [ "${GO_MAJOR}" -lt "${REQUIRED_MIN_GO_MAJOR}" ] ; then \
+ echo "ERROR: Need to install golang 1.16+ first"; \
+ exit 1; \
+ fi
+ @if [ "${GO_MINOR}" -lt "${REQUIRED_MIN_GO_MINOR}" ] ; then \
+ echo "ERROR: Need to install golang 1.16+ first"; \
+ exit 1; \
+ fi
Review comment:
fixed
##########
File path: api/internal/route.go
##########
@@ -54,10 +55,13 @@ func SetUpRouter() *gin.Engine {
r := gin.New()
logger := log.GetLogger(log.AccessLog)
r.Use(filter.CORS(), filter.RequestId(), filter.IPFilter(), filter.RequestLogHandler(logger), filter.SchemaCheck(), filter.RecoverHandler())
- r.Use(static.Serve("/", static.LocalFile(filepath.Join(conf.WorkDir, conf.WebDir), false)))
- r.NoRoute(func(c *gin.Context) {
- c.File(fmt.Sprintf("%s/index.html", filepath.Join(conf.WorkDir, conf.WebDir)))
- })
+ filesystem := fs.FS(StaticFiles)
+ subtree, err := fs.Sub(filesystem, "html")
+
Review comment:
fixed
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (24f59f0) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `3.44%`.
> The diff coverage is `58.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
- Coverage 69.61% 66.17% -3.45%
==========================================
Files 170 49 -121
Lines 6382 3308 -3074
Branches 745 0 -745
==========================================
- Hits 4443 2189 -2254
+ Misses 1683 839 -844
- Partials 256 280 +24
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.70% <58.69%> (-0.19%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.15% <0.00%> (-0.31%)` | :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/1788?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/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `44.21% <33.33%> (-4.06%)` | :arrow_down: |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-14.39%)` | :arrow_down: |
| [api/internal/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `60.00% <60.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `31.25% <100.00%> (+7.72%)` | :arrow_up: |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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: |
| [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `56.92% <0.00%> (-26.16%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `31.93% <0.00%> (-23.53%)` | :arrow_down: |
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `81.25% <0.00%> (-18.75%)` | :arrow_down: |
| [api/internal/log/log.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2xvZy9sb2cuZ28=) | `40.00% <0.00%> (-10.00%)` | :arrow_down: |
| [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `90.47% <0.00%> (-9.53%)` | :arrow_down: |
| ... and [136 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...24f59f0](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-840695352
Hi guys,
regarding embedding the static lua codes into the binary,
this is the method that handles the conversion of lua code, but I am not getting how this is done!!
https://github.com/apache/apisix-dashboard/blob/a59e8eff7ecdf38c197b4678c34d2fd15f364f72/api/internal/handler/route/route.go#L271-L306
The documentation in `gopher-lua` is not that good.
Could anyone give me some details?
It seems pointing to the directory is enough, but after the embedding, it's going to be an **in-memory filesystem**.
I haven't found such apis in gopher-lua, could you please guide me?
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* processing.
Building with commit 9ea4732a0f36024182759df350db82254fd6bf08
https://app.netlify.com/sites/apisix-dashboard/deploys/607d6a28c29ad0000754f8b2
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841797154
> Hi, @bisakhmondal
>
> > it will have another job that is writing the lua package into temporary directory (`os.TempDir()`).
> > I don't get the point of this line, can you give more details about it ?
Sure. Actually because of this
https://github.com/apache/apisix-dashboard/blob/a59e8eff7ecdf38c197b4678c34d2fd15f364f72/api/internal/handler/route/route.go#L280-L296
Line 281: navigating to lua package directory
Line 296: Importing the package from the same directory.
But the issue is with import when the package is in a filesystem that is inside memory/RAM (due to embedding).
So, as a workaround, we can do something like
1. embed the package. {provides the flexibility of a single binary}
2. when manager-api starts, it will dump the memory content of the package into a temp directory (maybe say /tmp). Now it'll work fine.
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (02543e5) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **increase** coverage by `0.21%`.
> The diff coverage is `58.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
+ Coverage 69.61% 69.83% +0.21%
==========================================
Files 170 49 -121
Lines 6382 3308 -3074
Branches 745 0 -745
==========================================
- Hits 4443 2310 -2133
+ Misses 1683 736 -947
- Partials 256 262 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.67% <58.69%> (-0.22%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `48.79% <58.69%> (+0.09%)` | :arrow_up: |
| backend-unit-test | `52.15% <0.00%> (-0.31%)` | :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/1788?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/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `47.61% <33.33%> (-0.66%)` | :arrow_down: |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-14.39%)` | :arrow_down: |
| [api/internal/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `60.00% <60.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `31.25% <100.00%> (+7.72%)` | :arrow_up: |
| [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `43.63% <0.00%> (-3.64%)` | :arrow_down: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `87.50% <0.00%> (-1.79%)` | :arrow_down: |
| [web/src/pages/Service/components/Preview.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL2NvbXBvbmVudHMvUHJldmlldy50c3g=) | | |
| [web/src/pages/Dashboard/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9EYXNoYm9hcmQvc2VydmljZS50cw==) | | |
| [...s/Upstream/components/active-check/Concurrency.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL0NvbmN1cnJlbmN5LnRzeA==) | | |
| [web/src/components/ActionBar/ActionBar.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL0FjdGlvbkJhci9BY3Rpb25CYXIudHN4) | | |
| ... and [119 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...02543e5](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* ready!
Built with commit 9ea4732a0f36024182759df350db82254fd6bf08
https://deploy-preview-1788--apisix-dashboard.netlify.app
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fbf9a47) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `21.94%`.
> The diff coverage is `57.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
===========================================
- Coverage 67.72% 45.77% -21.95%
===========================================
Files 170 48 -122
Lines 6382 3292 -3090
Branches 745 0 -745
===========================================
- Hits 4322 1507 -2815
+ Misses 1803 1506 -297
- Partials 257 279 +22
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.77% <57.69%> (?)` | |
| 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/1788?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/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-5.57%)` | :arrow_down: |
| [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `48.27% <100.00%> (ø)` | |
| [api/internal/handler/schema/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `15.00% <0.00%> (-85.00%)` | :arrow_down: |
| [api/internal/handler/tool/tool.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvdG9vbC90b29sLmdv) | `13.88% <0.00%> (-80.56%)` | :arrow_down: |
| [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `4.61% <0.00%> (-78.47%)` | :arrow_down: |
| [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `23.80% <0.00%> (-76.20%)` | :arrow_down: |
| [api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
| [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `12.04% <0.00%> (-61.26%)` | :arrow_down: |
| [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `31.42% <0.00%> (-59.29%)` | :arrow_down: |
| [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `33.33% <0.00%> (-57.15%)` | :arrow_down: |
| ... and [146 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...fbf9a47](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* ready!
Built with commit ee4e46d113d94ff9b1fd487415383b0d2323ec35
https://deploy-preview-1788--apisix-dashboard.netlify.app
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ee4e46d) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `0.19%`.
> The diff coverage is `58.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
- Coverage 69.61% 69.41% -0.20%
==========================================
Files 170 171 +1
Lines 6382 6419 +37
Branches 745 745
==========================================
+ Hits 4443 4456 +13
- Misses 1683 1701 +18
- Partials 256 262 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.85% <58.69%> (-0.03%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `48.82% <58.69%> (+0.12%)` | :arrow_up: |
| backend-unit-test | `52.19% <0.00%> (-0.27%)` | :arrow_down: |
| frontend-e2e-test | `68.82% <ø> (-0.17%)` | :arrow_down: |
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/1788?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/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `47.61% <33.33%> (-0.66%)` | :arrow_down: |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-14.39%)` | :arrow_down: |
| [api/internal/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `60.00% <60.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `31.25% <100.00%> (+7.72%)` | :arrow_up: |
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `68.85% <0.00%> (-3.28%)` | :arrow_down: |
| [...ages/Route/components/DebugViews/DebugDrawView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL0RlYnVnVmlld3MvRGVidWdEcmF3Vmlldy50c3g=) | `76.57% <0.00%> (-1.72%)` | :arrow_down: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `88.09% <0.00%> (-1.20%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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/1788?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 [a59e8ef...ee4e46d](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841787048
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634517991
##########
File path: api/internal/utils/pid.go
##########
@@ -30,16 +30,14 @@ func WritePID(filepath string) error {
return fmt.Errorf("instance of Manager API already running: a pid file exists in %s", filepath)
}
pid := os.Getpid()
- f, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC|os.O_CREATE, 0600)
+ f, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
Review comment:
Hi, actually the `O_CREATE` flag had multiple occurrences :)
##########
File path: api/build.sh
##########
@@ -22,6 +22,9 @@ GITHASH=$(cat ./.githash 2> /dev/null || HASH="ref: HEAD"; while [[ $HASH == ref
GOLDFLAGS="-X github.com/apisix/manager-api/internal/utils.version=${VERSION} -X github.com/apisix/manager-api/internal/utils.gitHash=${GITHASH}"
+# Ensuring clean state
+# rm -rf api/cmd/dag-to-lua && git checkout api/cmd/dag-to-lua
Review comment:
Yeah sure
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* ready!
Built with commit 02543e58841c2e92a4dd18a625b4baa40259b680
https://deploy-preview-1788--apisix-dashboard.netlify.app
--
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.
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634247792
##########
File path: api/build.sh
##########
@@ -32,13 +35,13 @@ set -x
export ENV=local
pwd=`pwd`
-rm -rf output && mkdir -p output/conf && mkdir -p output/dag-to-lua
+rm -rf output && mkdir -p output/conf && mkdir -p ./api/cmd/dag-to-lua
Review comment:
oh, why change `output` to `api/cmd` ?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* ready!
Built with commit dbf071b769b9baa17ae89664016f3f52eee2068c
https://deploy-preview-1788--apisix-dashboard.netlify.app
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r633122753
##########
File path: api/internal/route.go
##########
@@ -91,3 +94,55 @@ func SetUpRouter() *gin.Engine {
return r
}
+
+type spaFileSystem struct {
+ http.FileSystem
+}
+
+func (fs *spaFileSystem) Open(name string) (http.File, error) {
+ f, err := fs.FileSystem.Open(name)
+ //Default failsafe page
+ if err != nil {
+ return fs.FileSystem.Open("index.html")
+ }
+ return f, err
+}
+
+var HTMLBlackListRoutes = []string{
+ "/apisix",
+ "/ping",
+}
+
+func serve(urlPrefix string, fss fs.FS) gin.HandlerFunc {
+ fileserver := http.FileServer(&spaFileSystem{http.FS(fss)})
+ if urlPrefix != "" {
+ fileserver = http.StripPrefix(urlPrefix, fileserver)
+ }
+ return func(c *gin.Context) {
+
+ if c.Request.Method == "GET" &&
+ (exists(urlPrefix, c.Request.URL.Path, &fss) || !isBlacklisted(c.Request.URL.Path)) {
Review comment:
the `exists` method and `isBlacklisted` are doing the same work in different ways. Please let me know which one should be perfect.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
starsz commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-828086848
As we talked about the issue. https://github.com/apache/apisix-dashboard/issues/1391#issuecomment-824492523
> provide a flag to use the embed or the external assets in startup?
We need a flag to use the embed or the external assets in a startup.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal removed a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal removed a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822427098
go1.16 has been added to the environment
https://github.com/apache/apisix-dashboard/pull/1788/checks?check_run_id=2380595572#step:4:10
but still `api/test/shell/cli_test.sh` is using 1.15
https://github.com/apache/apisix-dashboard/pull/1788/checks?check_run_id=2380595572#step:6:79
any idea why🤔
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* ready!
Built with commit 99e2684b9873f5c52d2f83802d6f60ade71000e5
https://deploy-preview-1788--apisix-dashboard.netlify.app
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r636605979
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
Yes, that's exactly what I have added.
`make build` full build with the web embed.
`make api-run` run without embed.
[new] `make api-build` build(just the manager-api) without embed.
Now as you see, we have 2 cases when we are not building web assets. maybe as a substitute for this current `index.html`, we can create an empty directory `html` and an empty file, maybe `keep.keep` while issuing such commands. This would work fine. But I thought, instead of an empty file an HTML with a suitable message (`The build is partial`) would be appropriate.
So should we go with the other option just I mentioned?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ee4e46d) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **increase** coverage by `0.36%`.
> The diff coverage is `58.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
+ Coverage 69.61% 69.98% +0.36%
==========================================
Files 170 49 -121
Lines 6382 3308 -3074
Branches 745 0 -745
==========================================
- Hits 4443 2315 -2128
+ Misses 1683 731 -952
- Partials 256 262 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.85% <58.69%> (-0.03%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `48.82% <58.69%> (+0.12%)` | :arrow_up: |
| backend-unit-test | `52.19% <0.00%> (-0.27%)` | :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/1788?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/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `47.61% <33.33%> (-0.66%)` | :arrow_down: |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-14.39%)` | :arrow_down: |
| [api/internal/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `60.00% <60.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `31.25% <100.00%> (+7.72%)` | :arrow_up: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `88.09% <0.00%> (-1.20%)` | :arrow_down: |
| [.../Route/components/DebugViews/DebugFormDataView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL0RlYnVnVmlld3MvRGVidWdGb3JtRGF0YVZpZXcudHN4) | | |
| [...b/src/components/Plugin/UI/referer-restriction.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9yZWZlcmVyLXJlc3RyaWN0aW9uLnRzeA==) | | |
| [web/src/pages/Upstream/components/Step1.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9jb21wb25lbnRzL1N0ZXAxLnRzeA==) | | |
| [web/src/components/Upstream/UpstreamForm.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL1Vwc3RyZWFtRm9ybS50c3g=) | | |
| [web/src/components/Plugin/UI/cors.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9jb3JzLnRzeA==) | | |
| ... and [118 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...ee4e46d](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9ea4732) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1d2bc545c6e081f9ce0270ae12d61eecdaadab0e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1d2bc54) will **decrease** coverage by `2.80%`.
> The diff coverage is `57.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
- Coverage 72.13% 69.33% -2.81%
==========================================
Files 132 172 +40
Lines 5721 6085 +364
Branches 649 703 +54
==========================================
+ Hits 4127 4219 +92
- Misses 1350 1607 +257
- Partials 244 259 +15
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `46.83% <57.69%> (-15.35%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.41% <ø> (+0.11%)` | :arrow_up: |
| frontend-e2e-test | `71.99% <ø> (-1.01%)` | :arrow_down: |
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/1788?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/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-14.39%)` | :arrow_down: |
| [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `59.45% <100.00%> (ø)` | |
| [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `5.35% <0.00%> (-71.43%)` | :arrow_down: |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `31.93% <0.00%> (-23.53%)` | :arrow_down: |
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `81.25% <0.00%> (-18.75%)` | :arrow_down: |
| [api/internal/log/log.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2xvZy9sb2cuZ28=) | `40.00% <0.00%> (-10.00%)` | :arrow_down: |
| [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `90.47% <0.00%> (-9.53%)` | :arrow_down: |
| [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `68.51% <0.00%> (-9.26%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `63.55% <0.00%> (-7.48%)` | :arrow_down: |
| ... and [85 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [1d2bc54...9ea4732](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* ready!
Built with commit 8887b2eda30e1e4d16dbc20382dec386fdd5cb88
https://deploy-preview-1788--apisix-dashboard.netlify.app
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* processing.
Building with commit 8887b2eda30e1e4d16dbc20382dec386fdd5cb88
https://app.netlify.com/sites/apisix-dashboard/deploys/607d540858655b0007d1c83a
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-828062678
> Hii, what about `conf.yaml`, do we also have to embed this?
should not embed it. people need to change configuration in 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* processing.
Building with commit 5052024257e5e744a703480d02c2f49bb11600fb
https://app.netlify.com/sites/apisix-dashboard/deploys/607d73bb107d4f0007a9038d
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
starsz commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-845624382
Now, we don't have a method that doesn't embed assets in API binary?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* processing.
Building with commit ee4e46d113d94ff9b1fd487415383b0d2323ec35
https://app.netlify.com/sites/apisix-dashboard/deploys/60a16cc1bab42200088e0876
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r636605979
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
Yes, that's exactly what I have added.
`make build` full build with the web embed.
`make api-run` run without embed.
[new] `make api-build` build(just the manager-api) without embed.
Now as you see, we have 2 cases when we are not building web assets. maybe as a substitute for this current `index.html`, we can create an empty directory `html` and an empty file, maybe `keep.keep`. This would work fine. But I thought, instead of an empty file an HTML with a suitable message (`The build is partial`) would be appropriate.
So should we go with the other option just I mentioned?
--
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.
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634248776
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
we should remove this file. And build it form source when building a binary.
--
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.
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r636626198
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
> Yes, that's exactly what I have added.
so why do you think that will be time-consuming?
We cannot embed old files, but files built from the current source.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (24f59f0) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `17.46%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
===========================================
- Coverage 69.61% 52.15% -17.47%
===========================================
Files 170 40 -130
Lines 6382 2759 -3623
Branches 745 0 -745
===========================================
- Hits 4443 1439 -3004
+ Misses 1683 1126 -557
+ Partials 256 194 -62
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.15% <0.00%> (-0.31%)` | :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/1788?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/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `0.00% <0.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `0.00% <0.00%> (-23.53%)` | :arrow_down: |
| [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788/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/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-71.03%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-66.67%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
| ... and [156 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...24f59f0](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
starsz commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-828885934
> > As we talked about the issue. [#1391 (comment)](https://github.com/apache/apisix-dashboard/issues/1391#issuecomment-824492523)
> > > provide a flag to use the embed or the external assets in startup?
> >
> >
> > We need a flag to use the embed or the external assets in a startup.
>
> You mean, a flag on manager-api itself (cobra commands), right?
No. I think a flag on `Makefile` would be better.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (371d069) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **increase** coverage by `1.09%`.
> The diff coverage is `n/a`.
> :exclamation: Current head 371d069 differs from pull request most recent head fbf9a47. Consider uploading reports for the commit fbf9a47 to get more accurate results
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
+ Coverage 67.72% 68.82% +1.09%
==========================================
Files 170 122 -48
Lines 6382 3111 -3271
Branches 745 745
==========================================
- Hits 4322 2141 -2181
+ Misses 1803 970 -833
+ Partials 257 0 -257
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `?` | |
| frontend-e2e-test | `68.82% <ø> (-0.17%)` | :arrow_down: |
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/1788?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `68.85% <0.00%> (-3.28%)` | :arrow_down: |
| [...ages/Route/components/DebugViews/DebugDrawView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL0RlYnVnVmlld3MvRGVidWdEcmF3Vmlldy50c3g=) | `76.57% <0.00%> (-1.72%)` | :arrow_down: |
| [api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | | |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | | |
| [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | | |
| [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | | |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | | |
| [api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | | |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | | |
| ... and [38 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...fbf9a47](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r622098079
##########
File path: Makefile
##########
@@ -50,10 +59,17 @@ endif
.PHONY: api-default
api-default:
ifeq ("$(wildcard $(GO_EXEC))", "")
- @echo "ERROR: Need to install golang 1.13+ first"
+ @echo "ERROR: Need to install golang 1.16+ first"
exit 1
endif
-
+ @if [ "${GO_MAJOR}" -lt "${REQUIRED_MIN_GO_MAJOR}" ] ; then \
+ echo "ERROR: Need to install golang 1.16+ first"; \
+ exit 1; \
+ fi
+ @if [ "${GO_MINOR}" -lt "${REQUIRED_MIN_GO_MINOR}" ] ; then \
+ echo "ERROR: Need to install golang 1.16+ first"; \
+ exit 1; \
+ fi
Review comment:
Why I wrote such horrible logic🤣🤣
Changing ASAP
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* processing.
Building with commit 24f59f05c1d82e3bb029e2dbc258663fa6e7b4e9
https://app.netlify.com/sites/apisix-dashboard/deploys/60a15d52afe3950007d40ba4
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841816015
Aye Aye, Captain😄
--
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.
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634251240
##########
File path: api/test/shell/cli_test.sh
##########
@@ -117,47 +117,8 @@ if [[ `grep -c "INFO" ./error.log` -eq '0' ]]; then
exit 1
fi
-# run on a different path
-workDir=$(pwd)
-rm -rf html
-mkdir html
-cd html
-echo "hi~" >> index.html
-APISIX_API_WORKDIR=$workDir $workDir/manager-api &
-sleep 5
-
-res=$(curl http://127.0.0.1:9000)
-$workDir/manager-api stop
-sleep 6
-cd -
-rm -rf html
-
-if [[ $res != "hi~" ]]; then
- echo "failed: manager-api cant run on a different path"
- exit 1
-fi
clean_up
-# run with -p flag out of the default directory
-workDir=$(pwd)
-distDir=/tmp/manager-api
-cp -r $workDir $distDir
-cd $distDir && rm -rf bin && mkdir bin && mv ./manager-api ./bin/
-cd $distDir && rm -rf html && mkdir html && echo "hi~" >> html/index.html
-cd $distDir/bin && ./manager-api -p $distDir &
-sleep 5
-
-res=$(curl http://127.0.0.1:9000)
-$distDir/bin/manager-api stop
-sleep 6
-rm -fr $distDir
-
-if [[ $res != "hi~" ]]; then
- echo "failed: manager-api can't run with -p flag out of the default directory"
- exit 1
-fi
-cd $workDir && git checkout conf/conf.yaml
-
# test start info
Review comment:
we should add test cases for changes.
--
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.
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634248776
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
we should remove this file. an build it form source when building a binary.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841856999
Hi, the tasks are done.
The PR is ready to be reviewed.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-828392441
> As we talked about the issue. [#1391 (comment)](https://github.com/apache/apisix-dashboard/issues/1391#issuecomment-824492523)
>
> > provide a flag to use the embed or the external assets in startup?
>
> We need a flag to use the embed or the external assets in a startup.
You mean, a flag on manager-api itself (cobra commands), right?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (24f59f0) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **increase** coverage by `0.21%`.
> The diff coverage is `58.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
+ Coverage 69.61% 69.83% +0.21%
==========================================
Files 170 49 -121
Lines 6382 3308 -3074
Branches 745 0 -745
==========================================
- Hits 4443 2310 -2133
+ Misses 1683 738 -945
- Partials 256 260 +4
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.70% <58.69%> (-0.19%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `48.73% <58.69%> (+0.02%)` | :arrow_up: |
| backend-unit-test | `52.15% <0.00%> (-0.31%)` | :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/1788?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/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `47.61% <33.33%> (-0.66%)` | :arrow_down: |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-14.39%)` | :arrow_down: |
| [api/internal/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `60.00% <60.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `31.25% <100.00%> (+7.72%)` | :arrow_up: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `86.30% <0.00%> (-2.98%)` | :arrow_down: |
| [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `45.45% <0.00%> (-1.82%)` | :arrow_down: |
| [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `33.33% <0.00%> (ø)` | |
| [...components/active-check/HttpsVerifyCertificate.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL0h0dHBzVmVyaWZ5Q2VydGlmaWNhdGUudHN4) | | |
| [...b/src/components/Plugin/UI/referer-restriction.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9yZWZlcmVyLXJlc3RyaWN0aW9uLnRzeA==) | | |
| [web/src/pages/Service/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0NyZWF0ZS50c3g=) | | |
| ... and [120 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...24f59f0](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r636617313
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
Just a thought, How about adding the dag-to-lua package as a git submodule. instead of downloading and unzipping.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822143589
Deploy preview for *apisix-dashboard* ready!
Built with commit fbf9a47cb7c9adb23b2752f43b5cd441590bd3dc
https://deploy-preview-1788--apisix-dashboard.netlify.app
--
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.
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r635674914
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
not to embed empty dir, build `html` before embed 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634466304
##########
File path: api/build.sh
##########
@@ -22,6 +22,9 @@ GITHASH=$(cat ./.githash 2> /dev/null || HASH="ref: HEAD"; while [[ $HASH == ref
GOLDFLAGS="-X github.com/apisix/manager-api/internal/utils.version=${VERSION} -X github.com/apisix/manager-api/internal/utils.gitHash=${GITHASH}"
+# Ensuring clean state
+# rm -rf api/cmd/dag-to-lua && git checkout api/cmd/dag-to-lua
Review comment:
Please remove the debug line.
##########
File path: api/internal/utils/pid.go
##########
@@ -30,16 +30,14 @@ func WritePID(filepath string) error {
return fmt.Errorf("instance of Manager API already running: a pid file exists in %s", filepath)
}
pid := os.Getpid()
- f, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC|os.O_CREATE, 0600)
+ f, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
Review comment:
Just want to know why we should change 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841800524
> @nic-chen Something just come up into my mind. Let me know what you think about it.
hi, @bisakhmondal , LGTM. But I think it’s better to put it in the `[WorkDir](https://github.com/apache/apisix-dashboard/blob/master/api/cmd/managerapi.go#L91)`, not in a temporary directory.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (02543e5) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `17.46%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
===========================================
- Coverage 69.61% 52.15% -17.47%
===========================================
Files 170 40 -130
Lines 6382 2759 -3623
Branches 745 0 -745
===========================================
- Hits 4443 1439 -3004
+ Misses 1683 1126 -557
+ Partials 256 194 -62
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.15% <0.00%> (-0.31%)` | :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/1788?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/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `0.00% <0.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `0.00% <0.00%> (-23.53%)` | :arrow_down: |
| [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788/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/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-71.03%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-66.67%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
| ... and [156 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...02543e5](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] github-actions[bot] commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-955184460
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time ordiscuss it on the dev@apisix.apache.org list. Thank you for your contributions.
--
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 #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841800524
> @nic-chen Something just come up into my mind. Let me know what you think about it.
hi, @bisakhmondal , LGTM. But I think it’s better to put it in the `[WorkDir](https://github.com/apache/apisix-dashboard/blob/master/api/cmd/managerapi.go#L91)`, not in a temporary directory.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-829845799
hi @bisakhmondal please sync code form branch master
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (02543e5) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `0.24%`.
> The diff coverage is `58.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
- Coverage 69.61% 69.37% -0.25%
==========================================
Files 170 171 +1
Lines 6382 6419 +37
Branches 745 745
==========================================
+ Hits 4443 4453 +10
- Misses 1683 1704 +21
- Partials 256 262 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.67% <58.69%> (-0.22%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `48.79% <58.69%> (+0.09%)` | :arrow_up: |
| backend-unit-test | `52.15% <0.00%> (-0.31%)` | :arrow_down: |
| frontend-e2e-test | `68.88% <ø> (-0.10%)` | :arrow_down: |
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/1788?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/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `47.61% <33.33%> (-0.66%)` | :arrow_down: |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-14.39%)` | :arrow_down: |
| [api/internal/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `60.00% <60.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `31.25% <100.00%> (+7.72%)` | :arrow_up: |
| [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `43.63% <0.00%> (-3.64%)` | :arrow_down: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `87.50% <0.00%> (-1.79%)` | :arrow_down: |
| [...ages/Route/components/DebugViews/DebugDrawView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL0RlYnVnVmlld3MvRGVidWdEcmF3Vmlldy50c3g=) | `76.57% <0.00%> (-1.72%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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/1788?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 [a59e8ef...02543e5](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (02543e5) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `3.47%`.
> The diff coverage is `58.69%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
==========================================
- Coverage 69.61% 66.14% -3.48%
==========================================
Files 170 49 -121
Lines 6382 3308 -3074
Branches 745 0 -745
==========================================
- Hits 4443 2188 -2255
+ Misses 1683 838 -845
- Partials 256 282 +26
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `45.67% <58.69%> (-0.22%)` | :arrow_down: |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.15% <0.00%> (-0.31%)` | :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/1788?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/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `44.21% <33.33%> (-4.06%)` | :arrow_down: |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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) | `70.90% <56.00%> (-14.39%)` | :arrow_down: |
| [api/internal/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `60.00% <60.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `31.25% <100.00%> (+7.72%)` | :arrow_up: |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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: |
| [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `56.92% <0.00%> (-26.16%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `31.93% <0.00%> (-23.53%)` | :arrow_down: |
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `81.25% <0.00%> (-18.75%)` | :arrow_down: |
| [api/internal/log/log.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2xvZy9sb2cuZ28=) | `40.00% <0.00%> (-10.00%)` | :arrow_down: |
| [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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==) | `90.47% <0.00%> (-9.53%)` | :arrow_down: |
| ... and [135 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...02543e5](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (70f61c5) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1d2bc545c6e081f9ce0270ae12d61eecdaadab0e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1d2bc54) will **decrease** coverage by `19.72%`.
> The diff coverage is `47.61%`.
> :exclamation: Current head 70f61c5 differs from pull request most recent head 5052024. Consider uploading reports for the commit 5052024 to get more accurate results
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
===========================================
- Coverage 72.13% 52.41% -19.73%
===========================================
Files 132 38 -94
Lines 5721 2675 -3046
Branches 649 0 -649
===========================================
- Hits 4127 1402 -2725
+ Misses 1350 1085 -265
+ Partials 244 188 -56
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.41% <47.61%> (+0.11%)` | :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/1788?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/1788/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% <ø> (-100.00%)` | :arrow_down: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `81.43% <0.00%> (-6.52%)` | :arrow_down: |
| [api/internal/core/store/store\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVfbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv) | `45.88% <0.00%> (-20.00%)` | :arrow_down: |
| [api/internal/handler/consumer/consumer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `67.85% <69.23%> (-23.64%)` | :arrow_down: |
| [api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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=) | `73.58% <100.00%> (-8.50%)` | :arrow_down: |
| [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788/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/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-71.03%)` | :arrow_down: |
| ... and [85 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [1d2bc54...5052024](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-822144222
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 [#1788](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ee4e46d) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/a59e8eff7ecdf38c197b4678c34d2fd15f364f72?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a59e8ef) will **decrease** coverage by `17.42%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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 #1788 +/- ##
===========================================
- Coverage 69.61% 52.19% -17.43%
===========================================
Files 170 40 -130
Lines 6382 2759 -3623
Branches 745 0 -745
===========================================
- Hits 4443 1440 -3003
+ Misses 1683 1125 -558
+ Partials 256 194 -62
```
| Flag | Coverage Δ | |
|---|---|---|
| backend-e2e-test | `?` | |
| backend-e2e-test-ginkgo | `?` | |
| backend-unit-test | `52.19% <0.00%> (-0.27%)` | :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/1788?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/utils/lua\_scripts.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2x1YV9zY3JpcHRzLmdv) | `0.00% <0.00%> (ø)` | |
| [api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==) | `0.00% <0.00%> (-23.53%)` | :arrow_down: |
| [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788/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/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-71.03%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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%> (-66.67%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
| ... and [156 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1788/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/1788?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/1788?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 [a59e8ef...ee4e46d](https://codecov.io/gh/apache/apisix-dashboard/pull/1788?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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r622098388
##########
File path: Makefile
##########
@@ -50,10 +59,17 @@ endif
.PHONY: api-default
api-default:
ifeq ("$(wildcard $(GO_EXEC))", "")
- @echo "ERROR: Need to install golang 1.13+ first"
+ @echo "ERROR: Need to install golang 1.16+ first"
exit 1
endif
-
+ @if [ "${GO_MAJOR}" -lt "${REQUIRED_MIN_GO_MAJOR}" ] ; then \
+ echo "ERROR: Need to install golang 1.16+ first"; \
+ exit 1; \
+ fi
+ @if [ "${GO_MINOR}" -lt "${REQUIRED_MIN_GO_MINOR}" ] ; then \
+ echo "ERROR: Need to install golang 1.16+ first"; \
+ exit 1; \
+ fi
Review comment:
Why I wrote such horrible logic🤣🤣
Changing ASAP
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634529556
##########
File path: api/cmd/html/index.html
##########
@@ -0,0 +1,36 @@
+<!--
Review comment:
same as https://github.com/apache/apisix-dashboard/pull/1788#discussion_r634528665
As we have to provide an option not to embed the web build. We can't leave an empty directory.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
starsz commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841795464
Hi, @bisakhmondal
> it will have another job that is writing the lua package into temporary directory (`os.TempDir()`).
I don't get the point of this line, can you give more details about 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-841684415
>Are there any related error logs?
Hi @nic-chen, sorry I didn't get it.
The snippet I mentioned earlier was the existing code that we are using for Lua to go compiler VM. Till now, I couldn't figure out the workaround as after embedding the dag-to-dua package will be an in-memory filesystem (no way I can make `os.Chdir` and `local dag_to_lua = require 'dag-to-lua'` to import the package ).
All I can do is, read the content of the individual script from the directory stored in memory fs as per the current set of apis exposed through the go official `io/fs` package [link](https://golang.org/pkg/io/fs/)
Another way we can tackle this by reading and joining the individual scripts into a monolithic script. what do you think?
I don't know Lua (wishing to give it a try real soon 😄), so it would be great to have some heads up on this topic :)
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#issuecomment-827304425
Hii, what about `conf.yaml`, do we also have to embed this?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1788: feat: embed assets in api binary
Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on a change in pull request #1788:
URL: https://github.com/apache/apisix-dashboard/pull/1788#discussion_r633122753
##########
File path: api/internal/route.go
##########
@@ -91,3 +94,55 @@ func SetUpRouter() *gin.Engine {
return r
}
+
+type spaFileSystem struct {
+ http.FileSystem
+}
+
+func (fs *spaFileSystem) Open(name string) (http.File, error) {
+ f, err := fs.FileSystem.Open(name)
+ //Default failsafe page
+ if err != nil {
+ return fs.FileSystem.Open("index.html")
+ }
+ return f, err
+}
+
+var HTMLBlackListRoutes = []string{
+ "/apisix",
+ "/ping",
+}
+
+func serve(urlPrefix string, fss fs.FS) gin.HandlerFunc {
+ fileserver := http.FileServer(&spaFileSystem{http.FS(fss)})
+ if urlPrefix != "" {
+ fileserver = http.StripPrefix(urlPrefix, fileserver)
+ }
+ return func(c *gin.Context) {
+
+ if c.Request.Method == "GET" &&
+ (exists(urlPrefix, c.Request.URL.Path, &fss) || !isBlacklisted(c.Request.URL.Path)) {
Review comment:
the `exists` method and `isBlacklisted` are doing the same work in different ways. Please let me know which one should be perfect.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org