Skip to content

Commit

Permalink
add erda orgName in selector when download logs
Browse files Browse the repository at this point in the history
  • Loading branch information
chengjoey committed Apr 22, 2024
1 parent 24f53eb commit 4edf49c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ jobs:
rm -fr ./coverage/proto-go
rm -fr ./coverage/pure-coverage
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
echo ${#CODECOV_TOKEN}
curl -s https://codecov.io/bash | bash -s - -s ./coverage/
- name: Upload combined coverage reports to artifact
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/monitor/core/log/query/log.query.service.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ func toQuerySelector(req Request) (*storage.Selector, error) {
}
if meta := byExpressionRequest.GetQueryMeta(); meta != nil {
sel.Meta = storage.QueryMeta{
OrgNames: []string{meta.GetOrgName()},
OrgNames: []string{meta.GetOrgName(), "erda"},
MspEnvIds: meta.GetMspEnvIds(),
Highlight: meta.GetHighlight(),
PreferredBufferSize: int(meta.GetPreferredBufferSize()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func Test_toQuerySelector(t *testing.T) {
},
},
Meta: storage.QueryMeta{
OrgNames: []string{"erda"},
OrgNames: []string{"erda", "erda"},
PreferredBufferSize: 10,
PreferredIterateStyle: storage.Scroll,
},
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/monitor/core/log/query/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (p *provider) downloadLog(w http.ResponseWriter, r *http.Request, req *LogR
if req.IsFallBack {
sel.Options[storage.IsFallBack] = true
}
p.logQueryService.tryFillQueryMeta(r.Context(), sel, r.Header.Get("org"))
p.logQueryService.tryFillQueryMeta(r.Context(), sel, r.Header.Get("org"), "erda")
return sel, nil
},
func(item *pb.LogItem) error {
Expand Down

0 comments on commit 4edf49c

Please sign in to comment.