runatlantis/atlantis

Gitlab - External Pipelines fail to show in UI when `Merged Results Pipelines` Enabled

Opened this issue ยท 2 comments

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

When gitlab has Merged results pipelines enabled, the external pipeline no longer shows in the Pipelines UI.

Reproduction Steps

  1. Enable Merged Results pipelines on your repo, and in your gitlab-ci.
  2. Create an MR

Logs

{"level":"debug","ts":"2024-05-28T14:51:51.660Z","caller":"server/middleware.go:45","msg":"POST /events โ€“ from 10.10.39.168:34554","json":{}}
{"level":"debug","ts":"2024-05-28T14:51:51.660Z","caller":"events/events_controller.go:127","msg":"handling GitLab post","json":{}}
{"level":"debug","ts":"2024-05-28T14:51:51.660Z","caller":"events/events_controller.go:598","msg":"request valid","json":{}}
{"level":"debug","ts":"2024-05-28T14:51:51.660Z","caller":"events/events_controller.go:858","msg":"Ignoring unsupported event","json":{}}
{"level":"debug","ts":"2024-05-28T14:51:51.660Z","caller":"server/middleware.go:72","msg":"POST /events โ€“ respond HTTP 200","json":{}}
{"level":"debug","ts":"2024-05-28T14:52:57.749Z","caller":"events/events_controller.go:127","msg":"handling GitLab post","json":{}}
{"level":"debug","ts":"2024-05-28T14:52:57.749Z","caller":"events/events_controller.go:598","msg":"request valid","json":{}}
{"level":"debug","ts":"2024-05-28T14:52:57.749Z","caller":"events/events_controller.go:605","msg":"handling as pull request event","json":{}}
{"level":"info","ts":"2024-05-28T14:52:57.749Z","caller":"events/events_controller.go:726","msg":"identified event as type \"opened\"","json":{}}
{"level":"debug","ts":"2024-05-28T14:52:57.749Z","caller":"events/events_controller.go:858","msg":"Processing...","json":{}}
{"level":"debug","ts":"2024-05-28T14:52:57.749Z","caller":"server/middleware.go:72","msg":"POST /events โ€“ respond HTTP 200","json":{}}
{"level":"debug","ts":"2024-05-28T14:52:57.754Z","caller":"vcs/gitlab_client.go:120","msg":"Getting modified files for GitLab merge request 153","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:52:58.127Z","caller":"vcs/gitlab_client.go:141","msg":"GET projects/remove%2Fremove_infra/merge_requests/153/changes returned: 200","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:52:58.127Z","caller":"events/project_command_builder.go:342","msg":"3 files were modified in this pull request. Modified files: [dev/us-gov-west-1/deploys/01/qa1/internal/README.md dev/us-gov-west-1/deploys/01/qa1/internal/amq.tf dev/us-gov-west-1/deploys/01/qa1/internal/output.tf]","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:52:58.127Z","caller":"events/project_command_builder.go:400","msg":"got workspace lock","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"info","ts":"2024-05-28T14:52:58.135Z","caller":"events/working_dir.go:235","msg":"creating dir '/atlantis-data/repos/remove/remove_infra/153/default'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.122Z","caller":"events/working_dir.go:326","msg":"ran: git clone --depth=1 --branch amq_output --single-branch https://gitlab_atlantis:<redacted>@gitlab.remove.me/remove/remove_infra.git /atlantis-data/repos/remove/remove_infra/153/default. Output: Cloning into '/atlantis-data/repos/remove/remove_infra/153/default'...\nUpdating files:  12% (95/751)\rUpdating files:  13% (98/751)\rUpdating files:  14% (106/751)\rUpdating files:  15% (113/751)\rUpdating files:  16% (121/751)\rUpdating files:  17% (128/751)\rUpdating files:  18% (136/751)\rUpdating files:  19% (143/751)\rUpdating files:  20% (151/751)\rUpdating files:  21% (158/751)\rUpdating files:  22% (166/751)\rUpdating files:  23% (173/751)\rUpdating files:  24% (181/751)\rUpdating files:  25% (188/751)\rUpdating files:  26% (196/751)\rUpdating files:  26% (197/751)\rUpdating files:  27% (203/751)\rUpdating files:  28% (211/751)\rUpdating files:  29% (218/751)\rUpdating files:  30% (226/751)\rUpdating files:  31% (233/751)\rUpdating files:  32% (241/751)\rUpdating files:  33% (248/751)\rUpdating files:  34% (256/751)\rUpdating files:  35% (263/751)\rUpdating files:  36% (271/751)\rUpdating files:  37% (278/751)\rUpdating files:  38% (286/751)\rUpdating files:  39% (293/751)\rUpdating files:  39% (295/751)\rUpdating files:  40% (301/751)\rUpdating files:  41% (308/751)\rUpdating files:  42% (316/751)\rUpdating files:  43% (323/751)\rUpdating files:  44% (331/751)\rUpdating files:  45% (338/751)\rUpdating files:  46% (346/751)\rUpdating files:  47% (353/751)\rUpdating files:  48% (361/751)\rUpdating files:  49% (368/751)\rUpdating files:  50% (376/751)\rUpdating files:  51% (384/751)\rUpdating files:  51% (390/751)\rUpdating files:  52% (391/751)\rUpdating files:  53% (399/751)\rUpdating files:  54% (406/751)\rUpdating files:  55% (414/751)\rUpdating files:  56% (421/751)\rUpdating files:  57% (429/751)\rUpdating files:  58% (436/751)\rUpdating files:  59% (444/751)\rUpdating files:  60% (451/751)\rUpdating files:  61% (459/751)\rUpdating files:  62% (466/751)\rUpdating files:  63% (474/751)\rUpdating files:  64% (481/751)\rUpdating files:  65% (489/751)\rUpdating files:  65% (495/751)\rUpdating files:  66% (496/751)\rUpdating files:  67% (504/751)\rUpdating files:  68% (511/751)\rUpdating files:  69% (519/751)\rUpdating files:  70% (526/751)\rUpdating files:  71% (534/751)\rUpdating files:  72% (541/751)\rUpdating files:  73% (549/751)\rUpdating files:  74% (556/751)\rUpdating files:  75% (564/751)\rUpdating files:  76% (571/751)\rUpdating files:  77% (579/751)\rUpdating files:  78% (586/751)\rUpdating files:  79% (594/751)\rUpdating files:  80% (601/751)\rUpdating files:  81% (609/751)\rUpdating files:  82% (616/751)\rUpdating files:  83% (624/751)\rUpdating files:  84% (631/751)\rUpdating files:  85% (639/751)\rUpdating files:  86% (646/751)\rUpdating files:  87% (654/751)\rUpdating files:  88% (661/751)\rUpdating files:  89% (669/751)\rUpdating files:  90% (676/751)\rUpdating files:  91% (684/751)\rUpdating files:  92% (691/751)\rUpdating files:  92% (695/751)\rUpdating files:  93% (699/751)\rUpdating files:  94% (706/751)\rUpdating files:  95% (714/751)\rUpdating files:  96% (721/751)\rUpdating files:  97% (729/751)\rUpdating files:  98% (736/751)\rUpdating files:  99% (744/751)\rUpdating files: 100% (751/751)\rUpdating files: 100% (751/751), done.","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.125Z","caller":"events/project_command_builder.go:441","msg":"moduleInfo for '/atlantis-data/repos/remove/remove_infra/153/default' (matching '') = map[]","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"info","ts":"2024-05-28T14:53:07.125Z","caller":"events/project_command_builder.go:499","msg":"found no atlantis.yaml file","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"info","ts":"2024-05-28T14:53:07.125Z","caller":"events/project_finder.go:147","msg":"filtered modified files to 2 file(s) in the autoplan file list: [dev/us-gov-west-1/deploys/01/qa1/internal/amq.tf dev/us-gov-west-1/deploys/01/qa1/internal/output.tf]","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"info","ts":"2024-05-28T14:53:07.126Z","caller":"events/project_finder.go:176","msg":"there are 1 modified project(s) at path(s): dev/us-gov-west-1/deploys/01/qa1/internal","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"info","ts":"2024-05-28T14:53:07.126Z","caller":"events/project_command_builder.go:521","msg":"automatically determined that there were 1 additional projects modified in this pull request: [repofullname=remove/remove_infra path=dev/us-gov-west-1/deploys/01/qa1/internal]","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.126Z","caller":"events/project_command_builder.go:524","msg":"determining config for project at dir: 'dev/us-gov-west-1/deploys/01/qa1/internal'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"info","ts":"2024-05-28T14:53:07.126Z","caller":"events/project_finder.go:79","msg":"looking for Terraform Cloud workspace from configuration in \"/atlantis-data/repos/remove/remove_infra/153/default/dev/us-gov-west-1/deploys/01/qa1/internal\"","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"events/project_finder.go:107","msg":"no Terraform Cloud workspace explicitly configured in Terraform codes. Use default workspace (\"default\")","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:400","msg":"building config based on server-side config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting apply_requirements: [mergeable] from repos[1], id: /.*/","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting custom_policy_check: false from default server config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting delete_source_branch_on_merge: false from default server config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting repo_locks: this is a bug from default server config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting policy_check: false from default server config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting plan_requirements: [] from default server config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting import_requirements: [mergeable] from repos[1], id: /.*/","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting workflow: \"default\" from default server config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting allowed_overrides: [] from default server config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"valid/global_cfg.go:631","msg":"setting allow_custom_workflows: false from default server config","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.176Z","caller":"events/project_command_context_builder.go:98","msg":"Building project command context for plan","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.204Z","caller":"terraform/terraform_client.go:321","msg":"Found required_version setting of \"1.6.6\"","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.204Z","caller":"terraform/terraform_client.go:290","msg":"Listing Terraform versions available at: https://releases.hashicorp.com/terraform","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"info","ts":"2024-05-28T14:53:07.266Z","caller":"terraform/terraform_client.go:367","msg":"Detected module requires version: 1.6.6","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.266Z","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.builder.execution_time","value":9.511887184,"tags":{},"type":"timer"}}
{"level":"debug","ts":"2024-05-28T14:53:07.266Z","caller":"vcs/gitlab_client.go:398","msg":"Updating GitLab commit status for 'atlantis/plan' to 'pending'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.266Z","caller":"vcs/gitlab_client.go:504","msg":"Getting GitLab merge request 153","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.525Z","caller":"vcs/gitlab_client.go:507","msg":"GET /projects/remove/remove_infra/merge_requests/153 returned: 200","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.525Z","caller":"vcs/gitlab_client.go:426","msg":"Head pipeline found for merge request 153, source 'merge_request_event'. refTarget 'refs/merge-requests/153/merge'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.652Z","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.builder.execution_success","value":1,"tags":{},"type":"counter"}}
{"level":"debug","ts":"2024-05-28T14:53:07.652Z","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.builder.projects","value":1,"tags":{},"type":"counter"}}{"level":"debug","ts":"2024-05-28T14:53:07.700Z","caller":"vcs/gitlab_client.go:468","msg":"POST /projects/remove/remove_infra/statuses/d42c7c0145a90148a1c60f73ef26af5d7e07eda4 returned: 201","json":{"repo":"remove/remove_infra","pull":"153","attempt":1,"max_attempts":10,"repo":"remove/remove_infra","commit":"d42c7c0145a90148a1c60f73ef26af5d7e07eda4","state":"pending"}}
{"level":"debug","ts":"2024-05-28T14:53:07.700Z","caller":"events/plan_command_runner.go:122","msg":"deleting previous plans and locks","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.990Z","caller":"vcs/gitlab_client.go:398","msg":"Updating GitLab commit status for 'atlantis/plan: dev/us-gov-west-1/deploys/01/qa1/internal/default' to 'pending'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:07.990Z","caller":"vcs/gitlab_client.go:504","msg":"Getting GitLab merge request 153","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:08.142Z","caller":"vcs/gitlab_client.go:507","msg":"GET /projects/remove/remove_infra/merge_requests/153 returned: 200","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:08.142Z","caller":"vcs/gitlab_client.go:426","msg":"Head pipeline found for merge request 153, source 'merge_request_event'. refTarget 'refs/merge-requests/153/merge'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:08.333Z","caller":"vcs/gitlab_client.go:468","msg":"POST /projects/remove/remove_infra/statuses/d42c7c0145a90148a1c60f73ef26af5d7e07eda4 returned: 201","json":{"repo":"remove/remove_infra","pull":"153","attempt":1,"max_attempts":10,"repo":"remove/remove_infra","commit":"d42c7c0145a90148a1c60f73ef26af5d7e07eda4","state":"pending"}}
{"level":"info","ts":"2024-05-28T14:53:08.343Z","caller":"events/project_locker.go:86","msg":"acquired lock with id \"remove/remove_infra/dev/us-gov-west-1/deploys/01/qa1/internal/default\"","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:08.343Z","caller":"events/project_command_runner.go:546","msg":"acquired lock for project","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:08.343Z","caller":"events/working_dir.go:106","msg":"clone directory '/atlantis-data/repos/remove/remove_infra/153/default' already exists, checking if it's at the right commit","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:08.354Z","caller":"events/working_dir.go:133","msg":"repo is at correct commit 'd42c7c0145a90148a1c60f73ef26af5d7e07eda4' so will not re-clone","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:53:08.377Z","caller":"models/shell_command_runner.go:95","msg":"starting \"/usr/local/bin/terraform1.6.6 init -input=false -upgrade\" in \"/atlantis-data/repos/remove/remove_infra/153/default/dev/us-gov-west-1/deploys/01/qa1/internal\"","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"info","ts":"2024-05-28T14:53:56.394Z","caller":"models/shell_command_runner.go:161","msg":"successfully ran \"/usr/local/bin/terraform1.6.6 init -input=false -upgrade\" in \"/atlantis-data/repos/remove/remove_infra/153/default/dev/us-gov-west-1/deploys/01/qa1/internal\"","json":{"repo":"remove/remove_infra","pull":"153","duration":48.016278701}}
{"level":"info","ts":"2024-05-28T14:53:56.420Z","caller":"terraform/terraform_client.go:431","msg":"successfully ran \"/usr/local/bin/terraform1.6.6 workspace show\" in \"/atlantis-data/repos/remove/remove_infra/153/default/dev/us-gov-west-1/deploys/01/qa1/internal\"","json":{"repo":"remove/remove_infra","pull":"153","duration":0.02544889}}
{"level":"debug","ts":"2024-05-28T14:53:56.421Z","caller":"models/shell_command_runner.go:95","msg":"starting \"/usr/local/bin/terraform1.6.6 plan -input=false -refresh -out \\\"/atlantis-data/repos/remove/remove_infra/153/default/dev/us-gov-west-1/deploys/01/qa1/internal/default.tfplan\\\"\" in \"/atlantis-data/repos/remove/remove_infra/153/default/dev/us-gov-west-1/deploys/01/qa1/internal\"","json":{"repo":"remove/remove_infra","pull":"153"}}{"level":"info","ts":"2024-05-28T14:54:06.411Z","caller":"models/shell_command_runner.go:161","msg":"successfully ran \"/usr/local/bin/terraform1.6.6 plan -input=false -refresh -out \\\"/atlantis-data/repos/remove/remove_infra/153/default/dev/us-gov-west-1/deploys/01/qa1/internal/default.tfplan\\\"\" in \"/atlantis-data/repos/remove/remove_infra/153/default/dev/us-gov-west-1/deploys/01/qa1/internal\"","json":{"repo":"remove/remove_infra","pull":"153","duration":9.989721938}}
{"level":"debug","ts":"2024-05-28T14:54:06.412Z","caller":"vcs/gitlab_client.go:398","msg":"Updating GitLab commit status for 'atlantis/plan: dev/us-gov-west-1/deploys/01/qa1/internal/default' to 'success'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.412Z","caller":"vcs/gitlab_client.go:504","msg":"Getting GitLab merge request 153","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.573Z","caller":"vcs/gitlab_client.go:507","msg":"GET /projects/remove/remove_infra/merge_requests/153 returned: 200","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.573Z","caller":"vcs/gitlab_client.go:426","msg":"Head pipeline found for merge request 153, source 'merge_request_event'. refTarget 'refs/merge-requests/153/merge'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.698Z","caller":"vcs/gitlab_client.go:468","msg":"POST /projects/remove/remove_infra/statuses/d42c7c0145a90148a1c60f73ef26af5d7e07eda4 returned: 201","json":{"repo":"remove/remove_infra","pull":"153","attempt":1,"max_attempts":10,"repo":"remove/remove_infra","commit":"d42c7c0145a90148a1c60f73ef26af5d7e07eda4","state":"success"}}
{"level":"info","ts":"2024-05-28T14:54:06.698Z","caller":"events/instrumented_project_command_runner.go:88","msg":"plan success. output available at: https://gitlab.remove.me/remove/remove_infra/-/merge_requests/153","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.698Z","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.project.plan.execution_time","value":58.708551986,"tags":{"base_repo":"remove/remove_infra","pr_number":"153","project":"","project_path":"dev/us-gov-west-1/deploys/01/qa1/internal","terraform_version":"1.6.6","workspace":"default"},"type":"timer"}}
{"level":"debug","ts":"2024-05-28T14:54:06.698Z","caller":"vcs/gitlab_client.go:175","msg":"Creating comment on GitLab merge request 153","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.864Z","caller":"vcs/gitlab_client.go:184","msg":"POST /projects/remove/remove_infra/merge_requests/153/notes returned: 201","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.864Z","caller":"events/db_updater.go:25","msg":"updating DB with pull results","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.877Z","caller":"vcs/gitlab_client.go:398","msg":"Updating GitLab commit status for 'atlantis/plan' to 'success'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:06.877Z","caller":"vcs/gitlab_client.go:504","msg":"Getting GitLab merge request 153","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:07.038Z","caller":"vcs/gitlab_client.go:507","msg":"GET /projects/remove/remove_infra/merge_requests/153 returned: 200","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:07.038Z","caller":"vcs/gitlab_client.go:426","msg":"Head pipeline found for merge request 153, source 'merge_request_event'. refTarget 'refs/merge-requests/153/merge'","json":{"repo":"remove/remove_infra","pull":"153"}}
{"level":"debug","ts":"2024-05-28T14:54:07.156Z","caller":"vcs/gitlab_client.go:468","msg":"POST /projects/remove/remove_infra/statuses/d42c7c0145a90148a1c60f73ef26af5d7e07eda4 returned: 201","json":{"repo":"remove/remove_infra","pull":"153","attempt":1,"max_attempts":10,"repo":"remove/remove_infra","commit":"d42c7c0145a90148a1c60f73ef26af5d7e07eda4","state":"success"}}
{"level":"debug","ts":"2024-05-28T14:54:07.156Z","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.cmd.autoplan.execution_time","value":69.401741518,"tags":{},"type":"timer"}}
{"level":"debug","ts":"2024-05-28T14:54:07.240Z","caller":"server/middleware.go:45","msg":"POST /events โ€“ from 10.10.39.168:46560","json":{}}
{"level":"debug","ts":"2024-05-28T14:54:07.240Z","caller":"events/events_controller.go:127","msg":"handling GitLab post","json":{}}
{"level":"debug","ts":"2024-05-28T14:54:07.241Z","caller":"events/events_controller.go:598","msg":"request valid","json":{}}
{"level":"debug","ts":"2024-05-28T14:54:07.241Z","caller":"events/events_controller.go:602","msg":"handling as comment event","json":{}}
{"level":"debug","ts":"2024-05-28T14:54:07.241Z","caller":"events/events_controller.go:858","msg":"Ignoring non-command comment: \"Ran Plan for dir: `dev/us-gov-west-1/dep...\"","json":{}}
{"level":"debug","ts":"2024-05-28T14:54:07.241Z","caller":"server/middleware.go:72","msg":"POST /events โ€“ respond HTTP 200","json":{}}{"level":"debug","ts":"2024-05-28T14:54:07.652Z","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.project.plan.execution_success","value":1,"tags":{"base_repo":"remove/remove_infra","pr_number":"153","project":"","project_path":"dev/us-gov-west-1/deploys/01/qa1/internal","terraform_version":"1.6.6","workspace":"default"},"type":"counter"}}

Environment details

Atlantis: v0.28.1
Helm Chart: v5.1.1

Additional Context

https://gitlab.trex.network/help/ci/pipelines/merge_request_pipelines#prerequisites

To be specific, the issue is that the external jobs don't appear on the pipelines pane for the merge request.

I believe this is because:

  • Enabling Merged Results Pipelines results in two Merge Request Pipelines for the commit
  • Atlantis does not specify a pipeline ID when posting commit status (which would require looking up pipelines for the sha, to choose one to pass as pipeline_id in https://docs.gitlab.com/ee/api/commits.html#set-the-pipeline-status-of-a-commit )
  • GitLab will not guess at which merge request pipeline to associate the commit status with, so it ends up creating a new pipeline associated with the commit but not the merge request.

Should Atlantis query pipelines for the merge request and, at least if there are multiple, pick one to associate with its commit status?

Still present on latest version.