Dynamic downstream pipeline not working when using artifact
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=516054) </details> <!--IssueSummary end--> ### Summary A dynamic downstream pipeline does not work when the downstream pipeline uses generated artifact. It always fails with error message : "Unable to create pipeline. Undefined error (xxxxxx)". Artifact is well generated and available. Error is not related to generated content. Syntax is OK. I adjusted main pipeline to target a local downstream pipeline. This local is the manually downloaded artifact added in repo. And then it works. It confirms generated pipeline is OK ### Steps to reproduce <!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. --> ### Example Project Using this main pipeline fails in the trigger-dynamic-pipeline job ``` stages: - build - downstream-dynamic-pipeline build_tenant_pipeline: stage: build script: - echo "stages:" | out-file -append dynamic-pipeline.yml; - echo " - plan" | out-file -append dynamic-pipeline.yml; - echo "plan-test1:" | out-file -append dynamic-pipeline.yml; - echo " stage: plan" | out-file -append dynamic-pipeline.yml; - echo " script:" | out-file -append dynamic-pipeline.yml; - echo " - echo `"run plan for test1`"" | out-file -append dynamic-pipeline.yml; - echo " when: manual" | out-file -append dynamic-pipeline.yml; - echo "" | out-file -append dynamic-pipeline.yml artifacts: paths: - dynamic-pipeline.yml expire_in: 5 minutes trigger-dynamic-pipeline: stage: downstream-dynamic-pipeline trigger: include: - artifact: dynamic-pipeline.yml job: build_tenant_pipeline ``` Generated artifact syntax is OK. Pasting content in the pipeline editor reports no issue : ![image](/uploads/535f5b2bed01d2f92e220faf2dc455aa/image.png){width=290 height=227} ### What is the expected *correct* behavior? Pipeline should display downstream pipeline in UI - instead of error ### Relevant logs and/or screenshots ![image](/uploads/0cc32241db6ca2ecec94db00f8d251ca/image.png){width=368 height=155} Based on error ID, greping it from /var/log/gitlab returns : ``` # grep -r 01JJVRDSJEXA5MFXCB54FMYCMX . | grep error ./sidekiq/current:{"severity":"INFO","time":"2025-01-30T14:04:19.777Z","retry":3,"queue":"default","version":0,"store":null,"queue_namespace":"pipeline_default","args":["79985"],"class":"Ci::CreateDownstreamPipelineWorker","jid":"f8bbe21cb400a943b8abfb85","created_at":"2025-01-30T14:04:19.002Z","trace_propagation_headers":{"sentry-trace":"e2f60051585f4d05a77b561c12defbb2-a6ecf75fd058470a","baggage":"sentry-trace_id=e2f60051585f4d05a77b561c12defbb2,sentry-release=19fb562cbb8"},"correlation_id":"01JJVRDSJEXA5MFXCB54FMYCMX","meta.caller_id":"PipelineProcessWorker","meta.remote_ip":"172.16.9.241","meta.feature_category":"continuous_integration","meta.user":"username","meta.user_id":2,"meta.project":"username/test-downstream-pipeline","meta.root_namespace":"username","meta.client_id":"user/2","meta.pipeline_id":13698,"meta.job_id":79984,"meta.root_caller_id":"PUT /api/:version/jobs/:id","worker_data_consistency":"always","worker_data_consistency_per_db":{"main":"always","ci":"always"},"idempotency_key":"resque:gitlab:duplicate:default:08cc282acc73da0fa30618d90cc0e2fd905e7de2193837e7a9d85b976861d74f","size_limiter":"validated","enqueued_at":"2025-01-30T14:04:19.004Z","job_size_bytes":7,"pid":2043234,"sidekiq_tid":"yrk2","sidekiq_thread_name":"sidekiq.default/processor","message":"Ci::CreateDownstreamPipelineWorker JID-f8bbe21cb400a943b8abfb85: done: 0.770071 sec","job_status":"done","queue_duration_s":0.00295,"scheduling_latency_s":0.00295,"gitaly_calls":9,"gitaly_duration_s":0.257523,"redis_calls":112,"redis_allowed_cross_slot_calls":1,"redis_duration_s":0.105887,"redis_read_bytes":2101,"redis_write_bytes":19173,"redis_cache_calls":20,"redis_cache_allowed_cross_slot_calls":1,"redis_cache_duration_s":0.008062,"redis_cache_read_bytes":281,"redis_cache_write_bytes":1945,"redis_feature_flag_calls":6,"redis_feature_flag_duration_s":0.012464,"redis_feature_flag_read_bytes":1193,"redis_feature_flag_write_bytes":460,"redis_queues_calls":20,"redis_queues_duration_s":0.041693,"redis_queues_read_bytes":20,"redis_queues_write_bytes":11863,"redis_queues_metadata_calls":15,"redis_queues_metadata_duration_s":0.032121,"redis_queues_metadata_read_bytes":102,"redis_queues_metadata_write_bytes":2705,"redis_repository_cache_calls":39,"redis_repository_cache_duration_s":0.008949,"redis_repository_cache_read_bytes":458,"redis_repository_cache_write_bytes":1684,"redis_shared_state_calls":12,"redis_shared_state_duration_s":0.002598,"redis_shared_state_read_bytes":47,"redis_shared_state_write_bytes":516,"db_count":82,"db_write_count":7,"db_cached_count":5,"db_txn_count":5,"db_replica_txn_count":0,"db_primary_txn_count":0,"db_replica_count":0,"db_primary_count":82,"db_replica_write_count":0,"db_primary_write_count":7,"db_replica_cached_count":0,"db_primary_cached_count":5,"db_replica_wal_count":0,"db_primary_wal_count":0,"db_replica_wal_cached_count":0,"db_primary_wal_cached_count":0,"db_replica_txn_max_duration_s":0.0,"db_primary_txn_max_duration_s":0.0,"db_replica_txn_duration_s":0.0,"db_primary_txn_duration_s":0.0,"db_replica_duration_s":0.0,"db_primary_duration_s":0.196,"db_main_txn_count":0,"db_ci_txn_count":5,"db_main_replica_txn_count":0,"db_ci_replica_txn_count":0,"db_main_count":44,"db_ci_count":38,"db_main_replica_count":0,"db_ci_replica_count":0,"db_main_write_count":1,"db_ci_write_count":6,"db_main_replica_write_count":0,"db_ci_replica_write_count":0,"db_main_cached_count":4,"db_ci_cached_count":1,"db_main_replica_cached_count":0,"db_ci_replica_cached_count":0,"db_main_wal_count":0,"db_ci_wal_count":0,"db_main_replica_wal_count":0,"db_ci_replica_wal_count":0,"db_main_wal_cached_count":0,"db_ci_wal_cached_count":0,"db_main_replica_wal_cached_count":0,"db_ci_replica_wal_cached_count":0,"db_main_txn_max_duration_s":0.0,"db_ci_txn_max_duration_s":0.32,"db_main_replica_txn_max_duration_s":0.0,"db_ci_replica_txn_max_duration_s":0.0,"db_main_txn_duration_s":0.0,"db_ci_txn_duration_s":0.352,"db_main_replica_txn_duration_s":0.0,"db_ci_replica_txn_duration_s":0.0,"db_main_duration_s":0.13,"db_ci_duration_s":0.066,"db_main_replica_duration_s":0.0,"db_ci_replica_duration_s":0.0,"cpu_s":0.153947,"mem_objects":82422,"mem_bytes":4003400,"mem_mallocs":14480,"mem_total_bytes":7300280,"worker_id":"sidekiq_0","rate_limiting_gates":[],"extra.ci_create_downstream_pipeline_worker.create_error_message":"Cannot transition status via :drop from :failed (Reason(s): Status cannot transition via \"drop\")","duration_s":0.770071,"completed_at":"2025-01-30T14:04:19.777Z","load_balancing_strategy":"primary","db_duration_s":0.205985,"urgency":"high","target_duration_s":10,"target_scheduling_latency_s":10} ``` Error at end of log says : "Cannot transition status via :drop from :failed (Reason(s): Status cannot transition via \"drop\"" #### Results of GitLab environment info Issue happen in onprem gitlab server Community Edition. Version 17.8.1 Output of gitlab-rake gitlab:env:info : ``` # gitlab-rake gitlab:env:info System information System: Current User: git Using RVM: no Ruby Version: 3.2.5 Gem Version: 3.5.23 Bundler Version:2.5.11 Rake Version: 13.0.6 Redis Version: 7.0.15 Sidekiq Version:7.2.4 Go Version: unknown GitLab information Version: 17.8.1 Revision: 19fb562cbb8 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 14.15 URL: https://<my_url> HTTP Clone URL: https://<my_url>/some-group/some-project.git SSH Clone URL: git@<my_url>:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 14.39.0 Repository storages: - default: unix:/var/opt/gitlab/gitaly/gitaly.socket GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Gitaly - default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket - default Version: 17.8.1 - default Git Version: 2.47.0 ``` Output of gitlab-rake gitlab:check SANITIZE=true : ``` # gitlab-rake gitlab:check SANITIZE=true Checking GitLab subtasks ... Checking GitLab Shell ... GitLab Shell: ... GitLab Shell version >= 14.39.0 ? ... OK (14.39.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful Checking GitLab Shell ... Finished Checking Gitaly ... Gitaly: ... default ... OK Checking Gitaly ... Finished Checking Sidekiq ... Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1 Checking Sidekiq ... Finished Checking Incoming Email ... Incoming Email: ... Reply by email is disabled in config/gitlab.yml Checking Incoming Email ... Finished Checking LDAP ... LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 100 users of 100 limit. Checking LDAP ... Finished Checking GitLab App ... Database config exists? ... yes Tables are truncated? ... skipped All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Cable config exists? ... yes Resque config exists? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 13/10 ... yes 20/15 ... yes 21/16 ... yes 11/20 ... yes 2/23 ... yes 14/32 ... yes 14/33 ... yes 14/34 ... yes 26/36 ... yes 26/38 ... yes 26/42 ... yes 26/43 ... yes 2/50 ... yes 2/51 ... yes 11/52 ... yes 32/53 ... yes 2/54 ... yes 26/55 ... yes 14/56 ... yes 15/63 ... yes 2/64 ... yes 50/65 ... yes 50/67 ... yes 50/68 ... yes 50/69 ... yes 50/70 ... yes 51/71 ... yes 15/72 ... yes 15/73 ... yes 50/74 ... yes 54/75 ... yes 14/77 ... yes 32/78 ... yes 50/79 ... yes 97/80 ... yes 20/81 ... yes 6/82 ... yes 26/83 ... yes 51/84 ... yes 6/85 ... yes 50/88 ... yes 122/91 ... yes 121/92 ... yes 50/96 ... yes 50/97 ... yes 137/99 ... yes 137/100 ... yes 131/102 ... yes 137/104 ... yes 137/105 ... yes 50/106 ... yes 137/109 ... yes 50/113 ... yes 50/114 ... yes 50/115 ... yes 131/116 ... yes 131/117 ... yes 137/118 ... yes 137/119 ... yes 137/120 ... yes 131/125 ... yes 6/126 ... yes 20/127 ... yes 50/128 ... yes 50/131 ... yes 50/132 ... yes 204/135 ... yes 204/137 ... yes 6/138 ... yes 217/140 ... yes 6/141 ... yes 50/142 ... yes 50/143 ... yes 2/144 ... yes 131/145 ... yes 230/146 ... yes 54/147 ... yes 20/148 ... yes 50/149 ... yes 14/150 ... yes 50/151 ... yes 50/152 ... yes 137/153 ... yes 131/154 ... yes 50/156 ... yes 6/157 ... yes 54/158 ... yes 137/159 ... yes 137/160 ... yes 50/161 ... yes 131/162 ... yes 6/164 ... yes 137/165 ... yes 6/166 ... yes 297/167 ... yes 297/168 ... yes 300/169 ... yes 300/170 ... yes 300/171 ... yes 300/172 ... yes 300/173 ... yes 300/174 ... yes 300/175 ... yes 300/176 ... yes 300/177 ... yes 300/178 ... yes 300/179 ... yes 300/180 ... yes 300/181 ... yes 300/182 ... yes 300/183 ... yes 300/184 ... yes 300/185 ... yes 300/186 ... yes 300/187 ... yes 300/188 ... yes 301/189 ... yes 301/190 ... yes 301/191 ... yes 301/192 ... yes 301/193 ... yes 301/194 ... yes 301/195 ... yes 301/196 ... yes 301/197 ... yes 301/198 ... yes 301/199 ... yes 301/200 ... yes 301/201 ... yes 301/202 ... yes 301/203 ... yes 301/204 ... yes 130/205 ... yes 356/206 ... yes 355/207 ... yes 359/208 ... yes 2/209 ... yes 137/210 ... yes 137/211 ... yes 131/212 ... yes 368/213 ... yes 297/214 ... yes 300/215 ... yes 300/216 ... yes 300/217 ... yes 300/218 ... yes 300/219 ... yes 300/220 ... yes 300/221 ... yes 300/222 ... yes 300/223 ... yes 300/224 ... yes 300/225 ... yes 300/226 ... yes 388/227 ... yes 388/228 ... yes 388/229 ... yes 388/230 ... yes 388/231 ... yes 388/232 ... yes 388/233 ... yes 388/234 ... yes 388/235 ... yes 388/236 ... yes 388/237 ... yes 355/238 ... yes 459/239 ... yes 482/240 ... yes 460/242 ... yes 463/243 ... yes 463/244 ... yes 463/245 ... yes 463/246 ... yes 456/247 ... yes 460/248 ... yes 463/249 ... yes 460/250 ... yes 460/251 ... yes 460/252 ... yes 433/253 ... yes 433/254 ... yes 433/255 ... yes 433/256 ... yes 433/257 ... yes 433/258 ... yes 433/259 ... yes 433/260 ... yes 433/261 ... yes 433/262 ... yes 433/263 ... yes 433/264 ... yes 433/265 ... yes 433/266 ... yes 433/267 ... yes 460/269 ... yes 463/270 ... yes 463/271 ... yes 456/272 ... yes 463/273 ... yes 475/275 ... yes 111/276 ... yes 493/277 ... yes 479/278 ... yes 137/279 ... yes 137/280 ... yes 137/281 ... yes 137/282 ... yes 504/284 ... yes 498/285 ... yes 501/288 ... yes 514/289 ... yes 517/290 ... yes 514/291 ... yes 131/292 ... yes 131/293 ... yes 6/294 ... yes 131/296 ... yes 463/298 ... yes 433/299 ... yes 563/302 ... yes 565/303 ... yes 570/304 ... yes 570/305 ... yes 570/307 ... yes 568/308 ... yes 463/309 ... yes 580/310 ... yes 483/324 ... yes 464/325 ... yes 464/326 ... yes 464/327 ... yes 464/328 ... yes 464/329 ... yes 464/330 ... yes 464/331 ... yes 464/332 ... yes 464/333 ... yes 464/334 ... yes 581/335 ... yes 459/336 ... yes 2/337 ... yes 464/338 ... yes 611/339 ... yes 614/340 ... yes 517/341 ... yes 460/343 ... yes 581/344 ... yes 628/345 ... yes 433/346 ... yes 137/347 ... yes Redis version >= 6.2.14? ... yes Ruby version >= 3.0.6 ? ... yes (3.2.5) Git user has default SSH configuration? ... no Try fixing it: mkdir ~/gitlab-check-backup-1738247468 sudo mv /var/opt/gitlab/.ssh/backup ~/gitlab-check-backup-1738247468 For more information see: doc/user/ssh.md#overriding-ssh-settings-on-the-gitlab-server Please fix the error above and rerun the checks. Active users: ... 77 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Checking GitLab App ... Finished Checking GitLab subtasks ... Finished ```
issue