[Bug][Tempo] A team scope's pipeline adds every Tempo team as a scope and resets their scope config
Maintainer thường phản hồi trong vòng 2 ngày
Một pull request liên quan đã được merge.
- #9319 của @ShivamSharma43 — đã merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- go
- Lĩnh vực
- data-engineering
Hướng nghiên cứu
Start with the Tempo tasks in backend/plugins/tempo/tasks, especially collect-teams and extract_teams, and compare their team scoping with the worklog collector. Use the reproduction described in the issue and the raw fixture e2e/raw_tables/_raw_tempo_api_teams.csv to verify behavior; done means running one team scope leaves other scopes and its scope config unchanged. A pull request is already open for this issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Search before asking
- I had searched in the issues and found no similar issues.
What happened
Running a blueprint with one Tempo team scope adds every team of the Tempo instance as a data scope of the connection, and resets the scope config of the team scopes.
The _tool_tempo_teams table is both the scope table (TempoTeam is the plugin's ToolLayerScope) and the output of the extract_teams subtask. In backend/plugins/tempo/tasks:
collect-teamscallsGET /4/teamswithout a team filter, so it collects all teams of the instance, with connection-wide raw params{"ConnectionId":1,"TeamId":0}(the team id of the scope isn't set, unlike the worklog collector).extract_teamsturns every collected team into aTempoTeamwithScopeConfigId0. Because the params are connection-wide, the extractor's batch save first deletes every_tool_tempo_teamsrow with those params (i.e. every team scope extracted before, for any blueprint of the connection) and re-inserts all teams.
Result after one pipeline run:
- Teams the user never selected show up under the connection's data scopes (
GET /plugins/tempo/connections/1/scopes). - The
scope_config_idof the selected team scopes is overwritten with 0, so the scope config assignment is lost on every run. - A team scope the user deletes from the connection comes back on the next run of any other team scope.
Reproduced on main (84e3707) with the plugin's e2e helper on PostgreSQL: with only team 71 in _tool_tempo_teams (scope_config_id = 3) and the raw rows of e2e/raw_tables/_raw_tempo_api_teams.csv (teams 17 and 71), running ExtractTeams with {ConnectionId: 1, TeamId: 71} leaves:
team_id=17 name="Abstract BE Team" scope_config_id=0 params={"ConnectionId":1,"TeamId":0}
team_id=71 name="SmartShopper (RTL+WHS)" scope_config_id=0 params={"ConnectionId":1,"TeamId":0}
Also, collect-teams is a stateful collector that sends updatedFrom on incremental runs, but GET /4/teams has no such parameter (the Tempo OpenAPI spec, https://apidocs.tempo.io/tempo-openapi.yaml, lists offset, limit, teamMembers, name and teamIds). So an incremental run fetches every team again and appends it to the raw table instead of replacing it.
What do you expect to happen
A team scope's pipeline only collects and extracts its own team. The other team scopes of the connection, and teams that were never selected, are left alone, and the team scope keeps its scope config.
How to reproduce
- Create a Tempo connection to an instance with several teams.
- Add one team (e.g. id 71) as a data scope, assign it a scope config, and add it to a blueprint.
- Run the blueprint.
SELECT team_id, scope_config_id, _raw_data_params FROM _tool_tempo_teams WHERE connection_id = 1lists every team of the instance, all withscope_config_id = 0; the connection's data scope list in config-ui shows all of them.
Anything else
Proposed fix (I have a PR ready):
- Scope the team raw data and the extracted rows per team (
{ConnectionId, TeamId}, likeTempoTeam.ScopeParams()and the worklog collector), so extracting one team scope only replaces its own row. collect-teams: request only the scope's team withteamIds, drop the unsupportedupdatedFromand use a plain (non-incremental) collector so each run refreshes the raw rows.extract_teams: skip teams other than the scope's team and keep the existingscope_config_id.- Unit tests and an e2e test.
Related: #9284 (team summary longer than 255 characters). Since every team of the instance is extracted today, one long summary on any team can break extract_teams for every team scope of the connection.
Version
main
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- Go
- Star
- 3.2k
- Fork
- 832
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 86
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/devlake
-
[Bug][Testmo] Runs, milestones and automation runs: only the first 100 are collectedCó thể đã có người làm @ShivamSharma43 đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][Tempo] Worklog domain ids lack the connection id, so connections with the same worklog id overwrite each otherCó thể đã có người làm @ShivamSharma43 đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][linker] LinkPrToIssue never matches lowercase issue keys (e.g. in branch names)Có thể đã có người làm @VictorColomb đã nhận 6 ngày trước. Đang mởtype/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/devlake#9283 · 1 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 2 ngày
-
type/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 51/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của apache/devlake
Issue tương tự
-
[Bug] Custom tool truncation leaves unused stream copies openCó thể đã có người làm @OUAO-FRANK đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[v3] KeyBindingManager calls (Add/Remove) are not converted into a case-insensitive accelerator.KeyĐang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
crmne/hyprmoncfg#114 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
runtime: usleep sleeps nanoseconds instead of microseconds on linux/mips and linux/mips64Có thể đã có người làm @BRobertson7 đã nhận hôm nay. Đang mởcompiler/runtime
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
golang/go#82913 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100