Bối cảnh
azuredevops_go đã cover phần lớn Pipeline (builds incremental, timeline → cicd_pipelines/cicd_tasks, deployment/production regex cho DORA). Issue này đóng gap còn lại so với Python plugin.
Phạm vi: Pipeline / CI/CD — builds, timeline jobs, deployment detection (không bao gồm Board/TICKET).
Hiện trạng (đã có ✅)
collectBuilds — incremental qua minTime + continuation token
collectApiTimelineRecords — per-build timeline, skip 404/empty (YAML error builds)
convertApiBuilds → cicd_pipelines, cicd_pipeline_commits
convertApiTimelineRecords → cicd_tasks
deploymentPattern / productionPattern trong scope config → RegexEnricher → DORA cicd_deployment_commits
- E2E:
build_test.go, timeline_records_test.go
Gap so với Python
1. environment_pattern (ưu tiên cao)
Python plugin (azuredevops/streams/jobs.py) hỗ trợ regex extract tên environment từ job/stage name:
# scope config
environment_pattern: Optional[re.Pattern]
# ví dụ: r'(?:deploy|predeploy)[_-](.+?)(?:[_-](?:helm|terraform))?$'
Dùng trong converter để set cicd_tasks.environment chính xác hơn productionPattern match trên tên job.
Tasks:
2. Filter timeline record type
Python chỉ collect type in ("Job", "Stage"). Go extract tất cả timeline records.
3. Timeline collector — failed builds
Go skip builds result IN ('failed', 'none') khi collect timeline. Python vẫn thử (handle 204/404).
4. Docs
Acceptance Criteria
Không nằm trong scope
- Board / work items (issue riêng)
- Repository migration Python → Go (issue riêng)
Ước lượng
~3–5 ngày
Bối cảnh
azuredevops_gođã cover phần lớn Pipeline (builds incremental, timeline →cicd_pipelines/cicd_tasks, deployment/production regex cho DORA). Issue này đóng gap còn lại so với Python plugin.Phạm vi: Pipeline / CI/CD — builds, timeline jobs, deployment detection (không bao gồm Board/TICKET).
Hiện trạng (đã có ✅)
collectBuilds— incremental quaminTime+ continuation tokencollectApiTimelineRecords— per-build timeline, skip 404/empty (YAML error builds)convertApiBuilds→cicd_pipelines,cicd_pipeline_commitsconvertApiTimelineRecords→cicd_tasksdeploymentPattern/productionPatterntrong scope config →RegexEnricher→ DORAcicd_deployment_commitsbuild_test.go,timeline_records_test.goGap so với Python
1.
environment_pattern(ưu tiên cao)Python plugin (
azuredevops/streams/jobs.py) hỗ trợ regex extract tên environment từ job/stage name:Dùng trong converter để set
cicd_tasks.environmentchính xác hơnproductionPatternmatch trên tên job.Tasks:
EnvironmentPattern stringvàomodels/scope_config.goRegexEnrichertrongimpl/PrepareTaskData(hoặc logic riêng như Pythonextract_environment_name)ci_cd_timeline_records_converter.gokhi setCICDTask.Environmentazure/transformation.tsx(section CI/CD)2. Filter timeline record type
Python chỉ collect
type in ("Job", "Stage"). Go extract tất cả timeline records.ci_cd_timeline_records_extractor.go: chỉ lưuJobvàStage3. Timeline collector — failed builds
Go skip builds
result IN ('failed', 'none')khi collect timeline. Python vẫn thử (handle 204/404).4. Docs
deploymentPattern,productionPattern,environmentPatternvà impact lên DORAAcceptance Criteria
environment_patternhoạt động end-to-end: UI → scope config →cicd_tasks.environmentKhông nằm trong scope
Ước lượng
~3–5 ngày