[Test] spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb | Ci::PipelineProcessing::AtomicProcessingService Pipeline Processing Service when jobs change from stopped to alive status during pipeline processing runs ResetSkippedJobsSe...
Test metadata (don't modify)
Field | Value |
---|---|
File URL | spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb#L1013 |
Filename | spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb |
Description | Ci::PipelineProcessing::AtomicProcessingService Pipeline Processing Service when jobs change from stopped to alive status during pipeline processing runs ResetSkippedJobsService on the new alive jobs and logs event |
Test level | unit |
Hash | 2241e0515c433c708c53494129c6b4dab053f81d3 |
Reference duration | 3.23 seconds |
Expected duration | < 45.4 seconds |
Stack trace
Failure/Error: expect(all_builds_names_and_statuses).to eq(statuses_1)
expected: {:deploy1=>"skipped", :deploy2=>"skipped", :manual1=>"manual", :manual2=>"manual", :test1=>"skipped", :test2=>"skipped"}
got: {:deploy1=>"skipped", :deploy2=>"created", :manual1=>"manual", :manual2=>"manual", :test1=>"skipped", :test2=>"created"}
(compared using ==)
Diff:
@@ -1,7 +1,7 @@
:deploy1 => "skipped",
-:deploy2 => "skipped",
+:deploy2 => "created",
:manual1 => "manual",
:manual2 => "manual",
:test1 => "skipped",
-:test2 => "skipped",
+:test2 => "created",
Reports (1)
- 2024-03-14: https://gitlab.com/gitlab-org/gitlab/-/jobs/6394154237 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1213569840)
Resolution
We confirmed that the problem is the order in which jobs are processed by AtomicProcessingService
. The order is not consistent between each test run, which particularly affects the expected job statuses of DAG pipelines with same-stage dependent jobs. See !147875 (merged) for details.
We inferred that the query in AtomicProcessingService#update_jobs
only orders jobs by stage, but it should also account for DAG ordering.
The MR Fix handling of DAGs within a stage in AtomicPr... (!147875 - merged) was opened to resolve this issue.
Edited by Leaminn Ma