From d50acbc746656c644cf2d0729d2436d8840f1368 Mon Sep 17 00:00:00 2001 From: chroju Date: Wed, 2 Aug 2023 19:47:14 +0900 Subject: [PATCH] feat: set apply status to successful by default when result is 'No Changes' --- cmd/server.go | 21 +- log | 312 ++++++++++++++++++ runatlantis.io/docs/server-configuration.md | 10 - .../events/events_controller_e2e_test.go | 2 - server/events/apply_command_runner.go | 10 +- server/events/command_runner_internal_test.go | 38 +-- server/events/command_runner_test.go | 20 +- server/events/plan_command_runner.go | 15 +- server/events/plan_command_runner_test.go | 79 ++--- server/server.go | 2 - server/user_config.go | 41 ++- 11 files changed, 392 insertions(+), 158 deletions(-) create mode 100644 log diff --git a/cmd/server.go b/cmd/server.go index a4899279e2..869d46f3f2 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -115,15 +115,14 @@ const ( RepoConfigFlag = "repo-config" RepoConfigJSONFlag = "repo-config-json" // RepoWhitelistFlag is deprecated for RepoAllowlistFlag. - RepoWhitelistFlag = "repo-whitelist" - RepoAllowlistFlag = "repo-allowlist" - RequireApprovalFlag = "require-approval" - RequireMergeableFlag = "require-mergeable" - SetAtlantisApplyCheckSuccessfulIfNoChanges = "set-atlantis-apply-check-successful-if-no-changes" - SilenceNoProjectsFlag = "silence-no-projects" - SilenceForkPRErrorsFlag = "silence-fork-pr-errors" - SilenceVCSStatusNoPlans = "silence-vcs-status-no-plans" - SilenceAllowlistErrorsFlag = "silence-allowlist-errors" + RepoWhitelistFlag = "repo-whitelist" + RepoAllowlistFlag = "repo-allowlist" + RequireApprovalFlag = "require-approval" + RequireMergeableFlag = "require-mergeable" + SilenceNoProjectsFlag = "silence-no-projects" + SilenceForkPRErrorsFlag = "silence-fork-pr-errors" + SilenceVCSStatusNoPlans = "silence-vcs-status-no-plans" + SilenceAllowlistErrorsFlag = "silence-allowlist-errors" // SilenceWhitelistErrorsFlag is deprecated for SilenceAllowlistErrorsFlag. SilenceWhitelistErrorsFlag = "silence-whitelist-errors" SkipCloneNoChanges = "skip-clone-no-changes" @@ -501,10 +500,6 @@ var boolFlags = map[string]boolFlag{ defaultValue: false, hidden: true, }, - SetAtlantisApplyCheckSuccessfulIfNoChanges: { - description: "Set the `atlantis/apply` pull request status check to \"passing\" if \"No Changes\" are detected.", - defaultValue: false, - }, SilenceNoProjectsFlag: { description: "Silences Atlants from responding to PRs when it finds no projects.", defaultValue: false, diff --git a/log b/log new file mode 100644 index 0000000000..684a9ef3ba --- /dev/null +++ b/log @@ -0,0 +1,312 @@ +{"level":"debug","ts":"2023-08-02T19:42:01.709+0900","caller":"vcs/github_client.go:104","msg":"GH User: chroju","json":{}} +{"level":"info","ts":"2023-08-02T19:42:01.732+0900","caller":"server/server.go:441","msg":"Utilizing BoltDB","json":{}} +{"level":"warn","ts":"2023-08-02T19:42:01.740+0900","caller":"policy/conftest_client.go:151","msg":"failed to get default conftest version. Will attempt request scoped lazy loads DEFAULT_CONFTEST_VERSION not set","json":{},"stacktrace":"github.com/runatlantis/atlantis/server/core/runtime/policy.NewConfTestExecutorWorkflow\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/server/core/runtime/policy/conftest_client.go:151\ngithub.com/runatlantis/atlantis/server.NewServer\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/server/server.go:601\ngithub.com/runatlantis/atlantis/cmd.(*DefaultServerCreator).NewServer\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/server.go:636\ngithub.com/runatlantis/atlantis/cmd.(*ServerCmd).run\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/server.go:763\ngithub.com/runatlantis/atlantis/cmd.(*ServerCmd).Init.func2\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/server.go:651\ngithub.com/runatlantis/atlantis/cmd.(*ServerCmd).withErrPrint.func1\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/server.go:1122\ngithub.com/spf13/cobra.(*Command).execute\n\t/Users/chroju/dev/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/Users/chroju/dev/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/Users/chroju/dev/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\ngithub.com/runatlantis/atlantis/cmd.Execute\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/root.go:30\nmain.main\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/main.go:66\nruntime.main\n\t/opt/homebrew/Cellar/go/1.19.4/libexec/src/runtime/proc.go:250"} +{"level":"info","ts":"2023-08-02T19:42:01.740+0900","caller":"server/server.go:969","msg":"Atlantis started - listening on port 4141","json":{}} +{"level":"info","ts":"2023-08-02T19:42:01.740+0900","caller":"scheduled/executor_service.go:51","msg":"Scheduled Executor Service started","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:12.608+0900","caller":"server/middleware.go:45","msg":"POST /events – from [::1]:51922","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:12.608+0900","caller":"events/events_controller.go:103","msg":"handling GitHub post","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.goroutines","value":7,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.cgo_calls","value":1,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.othersys","value":1742218,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.alloc","value":4460008,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.total","value":8991984,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.sys","value":19975184,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.lookups","value":0,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.malloc","value":56421,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.frees","value":36324,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.sys","value":5482488,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.next","value":7859312,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.last","value":1690972921710027000,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.pause_total","value":566917,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.count","value":4,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mspan_inuse","value":132480,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_inuse","value":9600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_sys","value":15600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.inuse","value":557056,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.sys","value":146448,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.alloc","value":4460008,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.sys","value":12025856,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.idle","value":5382144,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.inuse","value":6643712,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.released","value":4423680,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.objects","value":20097,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:12.734+0900","caller":"events/events_controller.go:169","msg":"request valid","json":{"gh-request-id":"X-Github-Delivery=3c8e8900-3121-11ee-85ea-1d5c4cfc61cc"}} +{"level":"debug","ts":"2023-08-02T19:42:12.736+0900","caller":"vcs/github_client.go:203","msg":"POST /repos/chroju/infrastructure/issues/comments/1661977503/reactions","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:13.230+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.react_to_comment.execution_time","value":0.493216042,"tags":{},"type":"timer"}} +{"level":"info","ts":"2023-08-02T19:42:13.230+0900","caller":"events/events_controller.go:556","msg":"parsed comment as command=\"plan\" verbose=false dir=\"\" workspace=\"\" project=\"\" policyset=\"\", clear-policy-approval=false, flags=\"\"","json":{"gh-request-id":"X-Github-Delivery=3c8e8900-3121-11ee-85ea-1d5c4cfc61cc"}} +{"level":"debug","ts":"2023-08-02T19:42:13.230+0900","caller":"events/events_controller.go:588","msg":"executing command","json":{"gh-request-id":"X-Github-Delivery=3c8e8900-3121-11ee-85ea-1d5c4cfc61cc"}} +{"level":"debug","ts":"2023-08-02T19:42:13.230+0900","caller":"server/middleware.go:72","msg":"POST /events – respond HTTP 200","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:13.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.react_to_comment.execution_success","value":1,"tags":{},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:13.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github_event.comment_created.success_200","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:13.774+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.get_pull_request.execution_time","value":0.543954334,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:13.775+0900","caller":"vcs/github_client.go:330","msg":"GET /repos/chroju/infrastructure/pulls/56/reviews","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:14.109+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.pull_is_approved.execution_time","value":0.333916,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:14.537+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.pull_is_mergeable.execution_time","value":0.427856125,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:14.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.pull_is_mergeable.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:14.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.get_pull_request.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:14.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.pull_is_approved.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:14.992+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.update_status.execution_time","value":0.454604916,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:14.992+0900","caller":"vcs/github_client.go:143","msg":"[attempt 1] GET /repos/chroju/infrastructure/pulls/56/files","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:15.307+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.get_modified_files.execution_time","value":0.314905208,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:15.307+0900","caller":"events/project_command_builder.go:288","msg":"4 files were modified in this pull request","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.307+0900","caller":"events/project_command_builder.go:330","msg":"got workspace lock","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.307+0900","caller":"events/working_dir.go:97","msg":"clone directory \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default\" already exists, checking if it's at the right commit","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.324+0900","caller":"events/working_dir.go:124","msg":"repo is at correct commit \"05389c73717aa2f12182474a0e9ca787d74e9097\" so will not re-clone","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"info","ts":"2023-08-02T19:42:15.325+0900","caller":"events/project_command_builder.go:355","msg":"successfully parsed atlantis.yaml file","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.325+0900","caller":"events/project_command_builder.go:362","msg":"moduleInfo for /Users/chroju/.atlantis/repos/chroju/infrastructure/56/default (matching \"\") = map[]","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.325+0900","caller":"events/project_finder.go:185","msg":"found downstream projects for \"terraform/a/.terraform.lock.hcl\": []","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.325+0900","caller":"events/project_finder.go:185","msg":"found downstream projects for \"terraform/a/providers.tf\": []","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.325+0900","caller":"events/project_finder.go:185","msg":"found downstream projects for \"terraform/b/.terraform.lock.hcl\": []","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.325+0900","caller":"events/project_finder.go:185","msg":"found downstream projects for \"terraform/b/providers.tf\": []","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.325+0900","caller":"events/project_finder.go:192","msg":"checking if project at dir \"terraform/a\" workspace \"default\" was modified","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"events/project_finder.go:233","msg":"file \"terraform/a/providers.tf\" matched pattern","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"events/project_finder.go:192","msg":"checking if project at dir \"terraform/b\" workspace \"default\" was modified","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"events/project_finder.go:233","msg":"file \"terraform/b/providers.tf\" matched pattern","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"info","ts":"2023-08-02T19:42:15.326+0900","caller":"events/project_command_builder.go:369","msg":"2 projects are to be planned based on their when_modified config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"events/project_command_builder.go:372","msg":"determining config for project at dir: \"terraform/a\" workspace: \"default\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:293","msg":"MergeProjectCfg started","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:571","msg":"setting allowed_overrides: [] from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:571","msg":"setting allow_custom_workflows: false from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:571","msg":"setting delete_source_branch_on_merge: false from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:571","msg":"setting repo_locking: true from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:571","msg":"setting plan_requirements: [] from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:571","msg":"setting apply_requirements: [] from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:571","msg":"setting import_requirements: [] from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:571","msg":"setting workflow: \"default\" from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"valid/global_cfg.go:359","msg":"final settings: plan_requirements: [], apply_requirements: [], import_requirements: [], workflow: default","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.326+0900","caller":"events/project_command_context_builder.go:96","msg":"Building project command context for plan","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.327+0900","caller":"terraform/terraform_client.go:320","msg":"Found required_version setting of \"1.4.6\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.327+0900","caller":"terraform/terraform_client.go:289","msg":"Listing Terraform versions available at: https://releases.hashicorp.com/terraform","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"info","ts":"2023-08-02T19:42:15.406+0900","caller":"terraform/terraform_client.go:361","msg":"Detected module requires version: 1.4.6","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"events/project_command_builder.go:372","msg":"determining config for project at dir: \"terraform/b\" workspace: \"default\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:293","msg":"MergeProjectCfg started","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:571","msg":"setting delete_source_branch_on_merge: false from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:571","msg":"setting repo_locking: true from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:571","msg":"setting plan_requirements: [] from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:571","msg":"setting apply_requirements: [] from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:571","msg":"setting import_requirements: [] from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:571","msg":"setting workflow: \"default\" from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:571","msg":"setting allowed_overrides: [] from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:571","msg":"setting allow_custom_workflows: false from default server config","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"valid/global_cfg.go:359","msg":"final settings: plan_requirements: [], apply_requirements: [], import_requirements: [], workflow: default","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.407+0900","caller":"events/project_command_context_builder.go:96","msg":"Building project command context for plan","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.408+0900","caller":"terraform/terraform_client.go:320","msg":"Found required_version setting of \"1.4.6\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.408+0900","caller":"terraform/terraform_client.go:289","msg":"Listing Terraform versions available at: https://releases.hashicorp.com/terraform","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"info","ts":"2023-08-02T19:42:15.440+0900","caller":"terraform/terraform_client.go:361","msg":"Detected module requires version: 1.4.6","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.440+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.builder.execution_time","value":0.448227042,"tags":{},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:15.440+0900","caller":"events/plan_command_runner.go:247","msg":"deleting previous plans and locks","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.get_modified_files.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:15.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.update_status.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:15.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.builder.execution_success","value":1,"tags":{},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:15.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.builder.projects","value":2,"tags":{},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:15.932+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.update_status.execution_time","value":0.453880833,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"info","ts":"2023-08-02T19:42:15.941+0900","caller":"events/project_locker.go:86","msg":"acquired lock with id \"chroju/infrastructure/terraform/a/default\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.941+0900","caller":"events/project_command_runner.go:522","msg":"acquired lock for project","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.941+0900","caller":"events/working_dir.go:97","msg":"clone directory \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default\" already exists, checking if it's at the right commit","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.954+0900","caller":"events/working_dir.go:124","msg":"repo is at correct commit \"05389c73717aa2f12182474a0e9ca787d74e9097\" so will not re-clone","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:15.967+0900","caller":"models/shell_command_runner.go:93","msg":"starting \"/Users/chroju/dev/bin/terraform init -input=false\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/a\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:16.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.update_status.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"info","ts":"2023-08-02T19:42:19.529+0900","caller":"models/shell_command_runner.go:156","msg":"successfully ran \"/Users/chroju/dev/bin/terraform init -input=false\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/a\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"info","ts":"2023-08-02T19:42:19.548+0900","caller":"terraform/terraform_client.go:422","msg":"Successfully ran \"/Users/chroju/dev/bin/terraform workspace show\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/a\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:19.548+0900","caller":"models/shell_command_runner.go:93","msg":"starting \"/Users/chroju/dev/bin/terraform plan -input=false -refresh -out \\\"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/a/default.tfplan\\\"\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/a\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:22.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.goroutines","value":15,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.cgo_calls","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.frees","value":50808,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.othersys","value":1833938,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.alloc","value":6538896,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.total","value":12525288,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.sys","value":20237328,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.lookups","value":0,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.malloc","value":86689,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.count","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.sys","value":5636640,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.next","value":9763104,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.last","value":1690972935386912000,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.pause_total","value":1035959,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.inuse","value":851968,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.sys","value":162720,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mspan_inuse","value":160128,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_inuse","value":9600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_sys","value":15600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.inuse","value":9404416,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.released","value":2195456,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.objects","value":35881,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.alloc","value":6538896,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.sys","value":11730944,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:22.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.idle","value":2326528,"tags":{},"type":"gauge"}} +{"level":"info","ts":"2023-08-02T19:42:25.928+0900","caller":"models/shell_command_runner.go:156","msg":"successfully ran \"/Users/chroju/dev/bin/terraform plan -input=false -refresh -out \\\"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/a/default.tfplan\\\"\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/a\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:26.397+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.update_status.execution_time","value":0.468734583,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"info","ts":"2023-08-02T19:42:26.397+0900","caller":"events/instrumented_project_command_runner.go:87","msg":"plan success. output available at: https://github.com/chroju/infrastructure/pull/56","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:26.397+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.execution_time","value":10.919517167,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56","project":"","project_path":"terraform/a","terraform_version":"1.4.6","workspace":"default"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:26.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56","project":"","project_path":"terraform/a","terraform_version":"1.4.6","workspace":"default"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:26.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.update_status.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:26.939+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.update_status.execution_time","value":0.541478458,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"info","ts":"2023-08-02T19:42:26.949+0900","caller":"events/project_locker.go:86","msg":"acquired lock with id \"chroju/infrastructure/terraform/b/default\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:26.949+0900","caller":"events/project_command_runner.go:522","msg":"acquired lock for project","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:26.949+0900","caller":"events/working_dir.go:97","msg":"clone directory \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default\" already exists, checking if it's at the right commit","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:26.968+0900","caller":"events/working_dir.go:124","msg":"repo is at correct commit \"05389c73717aa2f12182474a0e9ca787d74e9097\" so will not re-clone","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:26.981+0900","caller":"models/shell_command_runner.go:93","msg":"starting \"/Users/chroju/dev/bin/terraform init -input=false\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/b\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:27.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.update_status.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"info","ts":"2023-08-02T19:42:30.603+0900","caller":"models/shell_command_runner.go:156","msg":"successfully ran \"/Users/chroju/dev/bin/terraform init -input=false\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/b\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"info","ts":"2023-08-02T19:42:30.624+0900","caller":"terraform/terraform_client.go:422","msg":"Successfully ran \"/Users/chroju/dev/bin/terraform workspace show\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/b\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:30.624+0900","caller":"models/shell_command_runner.go:93","msg":"starting \"/Users/chroju/dev/bin/terraform plan -input=false -refresh -out \\\"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/b/default.tfplan\\\"\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/b\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.goroutines","value":14,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.cgo_calls","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.malloc","value":89701,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.frees","value":50905,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.othersys","value":1817458,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.alloc","value":6965408,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.total","value":12951800,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.sys","value":20237328,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.lookups","value":0,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.count","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.sys","value":5653120,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.next","value":9763104,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.last","value":1690972935386912000,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.pause_total","value":1035959,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mspan_inuse","value":160128,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_inuse","value":9600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_sys","value":15600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.inuse","value":851968,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.sys","value":162720,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.alloc","value":6965408,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.sys","value":11730944,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.idle","value":2048000,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.inuse","value":9682944,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.released","value":1916928,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:32.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.objects","value":38796,"tags":{},"type":"gauge"}} +{"level":"info","ts":"2023-08-02T19:42:36.233+0900","caller":"models/shell_command_runner.go:156","msg":"successfully ran \"/Users/chroju/dev/bin/terraform plan -input=false -refresh -out \\\"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/b/default.tfplan\\\"\" in \"/Users/chroju/.atlantis/repos/chroju/infrastructure/56/default/terraform/b\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:36.784+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.update_status.execution_time","value":0.550551666,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"info","ts":"2023-08-02T19:42:36.784+0900","caller":"events/instrumented_project_command_runner.go:87","msg":"plan success. output available at: https://github.com/chroju/infrastructure/pull/56","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:36.784+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.execution_time","value":10.386357542,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56","project":"","project_path":"terraform/b","terraform_version":"1.4.6","workspace":"default"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:36.784+0900","caller":"vcs/github_client.go:212","msg":"GET /repos/chroju/infrastructure/issues/56/comments","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:37.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56","project":"","project_path":"terraform/b","terraform_version":"1.4.6","workspace":"default"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:37.710+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.update_status.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:39.616+0900","caller":"server/middleware.go:45","msg":"POST /events – from [::1]:51954","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:39.616+0900","caller":"events/events_controller.go:103","msg":"handling GitHub post","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:39.740+0900","caller":"events/events_controller.go:169","msg":"request valid","json":{"gh-request-id":"X-Github-Delivery=4cb339c0-3121-11ee-8ff7-0ea3c44bcc1f"}} +{"level":"debug","ts":"2023-08-02T19:42:39.741+0900","caller":"server/middleware.go:72","msg":"POST /events – respond HTTP 200","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:40.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github_event.comment_edited.success_200","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:41.557+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.hide_prev_plan_comments.execution_time","value":4.772719667,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:41.558+0900","caller":"vcs/github_client.go:192","msg":"POST /repos/chroju/infrastructure/issues/56/comments","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:41.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.hide_prev_plan_comments.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:42.562+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.create_comment.execution_time","value":1.004028459,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:42.562+0900","caller":"events/db_updater.go:25","msg":"updating DB with pull results","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.goroutines","value":12,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.cgo_calls","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.alloc","value":8089040,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.total","value":14075432,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.sys","value":24431632,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.lookups","value":0,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.malloc","value":96051,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.frees","value":51605,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.othersys","value":1743578,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.create_comment.execution_success","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.sys","value":5710728,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.next","value":9763104,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.last","value":1690972935386912000,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.pause_total","value":1035959,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.count","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.inuse","value":851968,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.sys","value":178992,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mspan_inuse","value":178560,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_inuse","value":9600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_sys","value":15600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.inuse","value":10715136,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.released","value":5111808,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.objects","value":44446,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.alloc","value":8089040,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.sys","value":15925248,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.idle","value":5210112,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:42.942+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.update_status.execution_time","value":0.370512791,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"info","ts":"2023-08-02T19:42:42.942+0900","caller":"events/plan_command_runner.go:290","msg":"Running policy check for command=\"plan\" verbose=false dir=\"\" workspace=\"\" project=\"\" policyset=\"\", clear-policy-approval=false, flags=\"\"","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"info","ts":"2023-08-02T19:42:42.942+0900","caller":"events/policy_check_command_runner.go:42","msg":"no projects to run policy_check in","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:42.942+0900","caller":"events/policy_check_command_runner.go:47","msg":"setting VCS status to success with no projects found","json":{"repo":"chroju/infrastructure","pull":"56"}} +{"level":"debug","ts":"2023-08-02T19:42:43.117+0900","caller":"server/middleware.go:45","msg":"POST /events – from [::1]:51955","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:43.117+0900","caller":"events/events_controller.go:103","msg":"handling GitHub post","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:43.246+0900","caller":"events/events_controller.go:169","msg":"request valid","json":{"gh-request-id":"X-Github-Delivery=4ec6b070-3121-11ee-9cdb-7a589709a91d"}} +{"level":"debug","ts":"2023-08-02T19:42:43.247+0900","caller":"server/middleware.go:72","msg":"POST /events – respond HTTP 200","json":{}} +{"level":"debug","ts":"2023-08-02T19:42:43.350+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.github.update_status.execution_time","value":0.407531458,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:43.350+0900","caller":"metrics/debug.go:52","msg":"timer","json":{"name":"atlantis.cmd.comment.plan.execution_time","value":30.119683958,"tags":{},"type":"timer"}} +{"level":"debug","ts":"2023-08-02T19:42:43.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github.update_status.execution_success","value":2,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:43.711+0900","caller":"metrics/debug.go:42","msg":"counter","json":{"name":"atlantis.github_event.comment_created.success_200","value":1,"tags":{"base_repo":"chroju/infrastructure","pr_number":"56"},"type":"counter"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.cgo_calls","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.goroutines","value":10,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.malloc","value":98587,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.frees","value":51732,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.othersys","value":1731242,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.alloc","value":8503280,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.total","value":14489672,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.sys","value":24431632,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.lookups","value":0,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.sys","value":5723064,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.next","value":9763104,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.last","value":1690972935386912000,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.pause_total","value":1035959,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.count","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.inuse","value":753664,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.sys","value":178992,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mspan_inuse","value":178560,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_inuse","value":9600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_sys","value":15600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.alloc","value":8503280,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.sys","value":16023552,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.idle","value":4997120,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.inuse","value":11026432,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.released","value":4767744,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:42:52.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.objects","value":46855,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.710+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.goroutines","value":9,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.710+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.cgo_calls","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.710+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.total","value":14604320,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.710+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.sys","value":24431632,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.710+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.lookups","value":0,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.710+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.malloc","value":99609,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.710+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.frees","value":51744,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.othersys","value":1731242,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.alloc","value":8617928,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.pause_total","value":1035959,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.count","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.sys","value":5723064,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.next","value":9763104,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.last","value":1690972935386912000,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_inuse","value":9600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_sys","value":15600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.inuse","value":720896,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.sys","value":178992,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mspan_inuse","value":178560,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.inuse","value":11091968,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.released","value":4702208,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.objects","value":47865,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.alloc","value":8617928,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.sys","value":16056320,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:02.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.idle","value":4964352,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.711+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.goroutines","value":9,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.cpu.cgo_calls","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.sys","value":24431632,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.lookups","value":0,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.malloc","value":100628,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.frees","value":51756,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.othersys","value":1731242,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.alloc","value":8732160,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.total","value":14718552,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.sys","value":5723064,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.next","value":9763104,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.last","value":1690972935386912000,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.pause_total","value":1035959,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.712+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.gc.count","value":5,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_inuse","value":9600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mcache_sys","value":15600,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.inuse","value":720896,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.sys","value":178992,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.stack.mspan_inuse","value":178560,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.idle","value":4882432,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.inuse","value":11173888,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.released","value":4620288,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.objects","value":48872,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.alloc","value":8732160,"tags":{},"type":"gauge"}} +{"level":"debug","ts":"2023-08-02T19:43:12.713+0900","caller":"metrics/debug.go:47","msg":"gauge","json":{"name":"atlantis.scheduled.runtime.memory.heap.sys","value":16056320,"tags":{},"type":"gauge"}} +{"level":"warn","ts":"2023-08-02T19:43:17.259+0900","caller":"scheduled/executor_service.go:68","msg":"Received interrupt. Attempting to Shut down scheduled executor service","json":{},"stacktrace":"github.com/runatlantis/atlantis/server/scheduled.(*ExecutorService).Run\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/server/scheduled/executor_service.go:68"} +{"level":"warn","ts":"2023-08-02T19:43:17.259+0900","caller":"scheduled/executor_service.go:95","msg":"Received interrupt, cancelling job","json":{},"stacktrace":"github.com/runatlantis/atlantis/server/scheduled.(*ExecutorService).runScheduledJob.func1\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/server/scheduled/executor_service.go:95"} +{"level":"warn","ts":"2023-08-02T19:43:17.259+0900","caller":"scheduled/executor_service.go:73","msg":"All jobs completed, exiting.","json":{},"stacktrace":"github.com/runatlantis/atlantis/server/scheduled.(*ExecutorService).Run\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/server/scheduled/executor_service.go:73"} +{"level":"warn","ts":"2023-08-02T19:43:17.259+0900","caller":"server/server.go:984","msg":"Received interrupt. Waiting for in-progress operations to complete","json":{},"stacktrace":"github.com/runatlantis/atlantis/server.(*Server).Start\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/server/server.go:984\ngithub.com/runatlantis/atlantis/cmd.(*ServerCmd).run\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/server.go:775\ngithub.com/runatlantis/atlantis/cmd.(*ServerCmd).Init.func2\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/server.go:651\ngithub.com/runatlantis/atlantis/cmd.(*ServerCmd).withErrPrint.func1\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/server.go:1122\ngithub.com/spf13/cobra.(*Command).execute\n\t/Users/chroju/dev/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/Users/chroju/dev/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/Users/chroju/dev/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\ngithub.com/runatlantis/atlantis/cmd.Execute\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/cmd/root.go:30\nmain.main\n\t/Users/chroju/dev/src/github.com/chroju/atlantis/main.go:66\nruntime.main\n\t/opt/homebrew/Cellar/go/1.19.4/libexec/src/runtime/proc.go:250"} +{"level":"info","ts":"2023-08-02T19:43:17.259+0900","caller":"server/server.go:1010","msg":"All in-progress operations complete, shutting down","json":{}} diff --git a/runatlantis.io/docs/server-configuration.md b/runatlantis.io/docs/server-configuration.md index 505e2654c9..bca4e04da4 100644 --- a/runatlantis.io/docs/server-configuration.md +++ b/runatlantis.io/docs/server-configuration.md @@ -830,16 +830,6 @@ This is useful when you have many projects and want to keep the pull request cle * Allowlist all repositories * `--repo-allowlist='*'` -### `--set-atlantis-apply-check-successful-if-no-changes` - ```bash - atlantis server --set-atlantis-apply-check-successful-if-no-changes - # or - ATLANTIS_SET_ATLANTIS_APPLY_CHECK_SUCCESSFUL_IF_NO_CHANGES=true - ``` - `--set-atlantis-apply-check-successful-if-no-changes` will set the `atlantis/apply` status check to "passing" on a VCS pull request if the `atlantis plan` command results in "No Changes". - This is useful, for example, when enabling auto-merge for pull requests that do not involve resource changes, such as automatic dependency updates. - Defaults to `false`. - ### `--silence-fork-pr-errors` ```bash atlantis server --silence-fork-pr-errors diff --git a/server/controllers/events/events_controller_e2e_test.go b/server/controllers/events/events_controller_e2e_test.go index 03c69b9c2d..b02af1d06a 100644 --- a/server/controllers/events/events_controller_e2e_test.go +++ b/server/controllers/events/events_controller_e2e_test.go @@ -1425,7 +1425,6 @@ func setupE2E(t *testing.T, repoDir string, opt setupOption) (events_controllers lockingClient, discardApprovalOnPlan, e2ePullReqStatusFetcher, - false, ) applyCommandRunner := events.NewApplyCommandRunner( @@ -1443,7 +1442,6 @@ func setupE2E(t *testing.T, repoDir string, opt setupOption) (events_controllers silenceNoProjects, false, e2ePullReqStatusFetcher, - false, ) approvePoliciesCommandRunner := events.NewApprovePoliciesCommandRunner( diff --git a/server/events/apply_command_runner.go b/server/events/apply_command_runner.go index 4d8e0cfe44..06439aff01 100644 --- a/server/events/apply_command_runner.go +++ b/server/events/apply_command_runner.go @@ -22,7 +22,6 @@ func NewApplyCommandRunner( SilenceNoProjects bool, silenceVCSStatusNoProjects bool, pullReqStatusFetcher vcs.PullReqStatusFetcher, - SetAtlantisApplyCheckSuccessfulIfNoChanges bool, ) *ApplyCommandRunner { return &ApplyCommandRunner{ vcsClient: vcsClient, @@ -39,7 +38,6 @@ func NewApplyCommandRunner( SilenceNoProjects: SilenceNoProjects, silenceVCSStatusNoProjects: silenceVCSStatusNoProjects, pullReqStatusFetcher: pullReqStatusFetcher, - SetAtlantisApplyCheckSuccessfulIfNoChanges: SetAtlantisApplyCheckSuccessfulIfNoChanges, } } @@ -61,8 +59,7 @@ type ApplyCommandRunner struct { SilenceNoProjects bool // SilenceVCSStatusNoPlans is whether any plan should set commit status if no projects // are found - silenceVCSStatusNoProjects bool - SetAtlantisApplyCheckSuccessfulIfNoChanges bool + silenceVCSStatusNoProjects bool } func (a *ApplyCommandRunner) Run(ctx *command.Context, cmd *CommentCommand) { @@ -202,10 +199,7 @@ func (a *ApplyCommandRunner) updateCommitStatus(ctx *command.Context, pullStatus var numErrored int status := models.SuccessCommitStatus - numSuccess = pullStatus.StatusCount(models.AppliedPlanStatus) - if a.SetAtlantisApplyCheckSuccessfulIfNoChanges { - numSuccess += pullStatus.StatusCount(models.PlannedNoChangesPlanStatus) - } + numSuccess = pullStatus.StatusCount(models.AppliedPlanStatus) + pullStatus.StatusCount(models.PlannedNoChangesPlanStatus) numErrored = pullStatus.StatusCount(models.ErroredApplyStatus) if numErrored > 0 { diff --git a/server/events/command_runner_internal_test.go b/server/events/command_runner_internal_test.go index 8726ba7217..4cf3076a0f 100644 --- a/server/events/command_runner_internal_test.go +++ b/server/events/command_runner_internal_test.go @@ -10,16 +10,14 @@ import ( func TestApplyUpdateCommitStatus(t *testing.T) { cases := map[string]struct { - cmd command.Name - SetAtlantisApplyCheckSuccessfulIfNoChanges bool - pullStatus models.PullStatus - expStatus models.CommitStatus - expNumSuccess int - expNumTotal int + cmd command.Name + pullStatus models.PullStatus + expStatus models.CommitStatus + expNumSuccess int + expNumTotal int }{ "apply, one pending": { cmd: command.Apply, - SetAtlantisApplyCheckSuccessfulIfNoChanges: false, pullStatus: models.PullStatus{ Projects: []models.ProjectStatus{ { @@ -36,7 +34,6 @@ func TestApplyUpdateCommitStatus(t *testing.T) { }, "apply, all successful": { cmd: command.Apply, - SetAtlantisApplyCheckSuccessfulIfNoChanges: false, pullStatus: models.PullStatus{ Projects: []models.ProjectStatus{ { @@ -53,7 +50,6 @@ func TestApplyUpdateCommitStatus(t *testing.T) { }, "apply, one errored, one pending": { cmd: command.Apply, - SetAtlantisApplyCheckSuccessfulIfNoChanges: false, pullStatus: models.PullStatus{ Projects: []models.ProjectStatus{ { @@ -73,24 +69,6 @@ func TestApplyUpdateCommitStatus(t *testing.T) { }, "apply, one planned no changes": { cmd: command.Apply, - SetAtlantisApplyCheckSuccessfulIfNoChanges: false, - pullStatus: models.PullStatus{ - Projects: []models.ProjectStatus{ - { - Status: models.AppliedPlanStatus, - }, - { - Status: models.PlannedNoChangesPlanStatus, - }, - }, - }, - expStatus: models.PendingCommitStatus, - expNumSuccess: 1, - expNumTotal: 2, - }, - "apply, one planned no changes, skip apply when no changes": { - cmd: command.Apply, - SetAtlantisApplyCheckSuccessfulIfNoChanges: true, pullStatus: models.PullStatus{ Projects: []models.ProjectStatus{ { @@ -111,8 +89,7 @@ func TestApplyUpdateCommitStatus(t *testing.T) { t.Run(name, func(t *testing.T) { csu := &MockCSU{} cr := &ApplyCommandRunner{ - commitStatusUpdater: csu, - SetAtlantisApplyCheckSuccessfulIfNoChanges: c.SetAtlantisApplyCheckSuccessfulIfNoChanges, + commitStatusUpdater: csu, } cr.updateCommitStatus(&command.Context{}, c.pullStatus) Equals(t, models.Repo{}, csu.CalledRepo) @@ -271,8 +248,7 @@ func TestPlanUpdateApplyCommitStatus(t *testing.T) { t.Run(name, func(t *testing.T) { csu := &MockCSU{} cr := &PlanCommandRunner{ - commitStatusUpdater: csu, - SetAtlantisApplyCheckSuccessfulIfNoChanges: true, + commitStatusUpdater: csu, } cr.updateCommitStatus(&command.Context{}, c.pullStatus, command.Apply) Equals(t, models.Repo{}, csu.CalledRepo) diff --git a/server/events/command_runner_test.go b/server/events/command_runner_test.go index 45e42d94db..3b652d73db 100644 --- a/server/events/command_runner_test.go +++ b/server/events/command_runner_test.go @@ -70,14 +70,13 @@ var preWorkflowHooksCommandRunner events.PreWorkflowHooksCommandRunner var postWorkflowHooksCommandRunner events.PostWorkflowHooksCommandRunner type TestConfig struct { - parallelPoolSize int - SilenceNoProjects bool - silenceVCSStatusNoPlans bool - silenceVCSStatusNoProjects bool - StatusName string - discardApprovalOnPlan bool - SetAtlantisApplyCheckSuccessfulIfNoChanges bool - backend locking.Backend + parallelPoolSize int + SilenceNoProjects bool + silenceVCSStatusNoPlans bool + silenceVCSStatusNoProjects bool + StatusName string + discardApprovalOnPlan bool + backend locking.Backend } func setup(t *testing.T, options ...func(testConfig *TestConfig)) *vcsmocks.MockClient { @@ -93,8 +92,7 @@ func setup(t *testing.T, options ...func(testConfig *TestConfig)) *vcsmocks.Mock SilenceNoProjects: false, StatusName: "atlantis-test", discardApprovalOnPlan: false, - SetAtlantisApplyCheckSuccessfulIfNoChanges: false, - backend: defaultBoltDB, + backend: defaultBoltDB, } for _, op := range options { @@ -163,7 +161,6 @@ func setup(t *testing.T, options ...func(testConfig *TestConfig)) *vcsmocks.Mock lockingLocker, testConfig.discardApprovalOnPlan, pullReqStatusFetcher, - testConfig.SetAtlantisApplyCheckSuccessfulIfNoChanges, ) applyCommandRunner = events.NewApplyCommandRunner( @@ -181,7 +178,6 @@ func setup(t *testing.T, options ...func(testConfig *TestConfig)) *vcsmocks.Mock testConfig.SilenceNoProjects, testConfig.silenceVCSStatusNoProjects, pullReqStatusFetcher, - testConfig.SetAtlantisApplyCheckSuccessfulIfNoChanges, ) approvePoliciesCommandRunner = events.NewApprovePoliciesCommandRunner( diff --git a/server/events/plan_command_runner.go b/server/events/plan_command_runner.go index 65f64aecd1..9313f14d4c 100644 --- a/server/events/plan_command_runner.go +++ b/server/events/plan_command_runner.go @@ -26,7 +26,6 @@ func NewPlanCommandRunner( lockingLocker locking.Locker, discardApprovalOnPlan bool, pullReqStatusFetcher vcs.PullReqStatusFetcher, - SetAtlantisApplyCheckSuccessfulIfNoChanges bool, ) *PlanCommandRunner { return &PlanCommandRunner{ silenceVCSStatusNoPlans: silenceVCSStatusNoPlans, @@ -47,7 +46,6 @@ func NewPlanCommandRunner( lockingLocker: lockingLocker, DiscardApprovalOnPlan: discardApprovalOnPlan, pullReqStatusFetcher: pullReqStatusFetcher, - SetAtlantisApplyCheckSuccessfulIfNoChanges: SetAtlantisApplyCheckSuccessfulIfNoChanges, } } @@ -76,9 +74,8 @@ type PlanCommandRunner struct { lockingLocker locking.Locker // DiscardApprovalOnPlan controls if all already existing approvals should be removed/dismissed before executing // a plan. - DiscardApprovalOnPlan bool - pullReqStatusFetcher vcs.PullReqStatusFetcher - SetAtlantisApplyCheckSuccessfulIfNoChanges bool + DiscardApprovalOnPlan bool + pullReqStatusFetcher vcs.PullReqStatusFetcher } func (p *PlanCommandRunner) runAutoplan(ctx *command.Context) { @@ -152,9 +149,7 @@ func (p *PlanCommandRunner) runAutoplan(ctx *command.Context) { } p.updateCommitStatus(ctx, pullStatus, command.Plan) - if p.SetAtlantisApplyCheckSuccessfulIfNoChanges { - p.updateCommitStatus(ctx, pullStatus, command.Apply) - } + p.updateCommitStatus(ctx, pullStatus, command.Apply) // Check if there are any planned projects and if there are any errors or if plans are being deleted if len(policyCheckCmds) > 0 && @@ -279,9 +274,7 @@ func (p *PlanCommandRunner) run(ctx *command.Context, cmd *CommentCommand) { } p.updateCommitStatus(ctx, pullStatus, command.Plan) - if p.SetAtlantisApplyCheckSuccessfulIfNoChanges { - p.updateCommitStatus(ctx, pullStatus, command.Apply) - } + p.updateCommitStatus(ctx, pullStatus, command.Apply) // Runs policy checks step after all plans are successful. // This step does not approve any policies that require approval. diff --git a/server/events/plan_command_runner_test.go b/server/events/plan_command_runner_test.go index 6d85493abf..2048830c7e 100644 --- a/server/events/plan_command_runner_test.go +++ b/server/events/plan_command_runner_test.go @@ -152,7 +152,6 @@ func TestPlanCommandRunner_IsSilenced(t *testing.T) { } } - func TestPlanCommandRunner_ExecutionOrder(t *testing.T) { logger := logging.NewNoopLogger(t) RegisterMockTestingT(t) @@ -510,41 +509,34 @@ func TestPlanCommandRunner_ExecutionOrder(t *testing.T) { } } -func TestPlanCommandRunner_IsSetAtlantisApplyStatus(t *testing.T) { +func TestPlanCommandRunner_AtlantisApplyStatus(t *testing.T) { logger := logging.NewNoopLogger(t) RegisterMockTestingT(t) cases := []struct { - Description string - PrevPlanStored bool - SetAtlantisApplyCheckSuccessfulIfNoChanges bool - ExpVCSApplyStatusSet bool - ExpVCSApplyStatusTotal int - ExpVCSApplyStatusSucc int + Description string + PrevPlanStored bool // stores a "No Changes" plan in the backend + Targeted bool + ExpVCSApplyStatusTotal int + ExpVCSApplyStatusSucc int }{ { - Description: "When planning without the flag, don't set the atlantis/apply VCS status", - }, - { - Description: "When planning with the flag, set the atlantis/apply VCS status to 0/0", - SetAtlantisApplyCheckSuccessfulIfNoChanges: true, - ExpVCSApplyStatusSet: true, - ExpVCSApplyStatusTotal: 0, - ExpVCSApplyStatusSucc: 0, + Description: "When planning with no previous plan, set the atlantis/apply VCS status to 0/0", + ExpVCSApplyStatusTotal: 0, + ExpVCSApplyStatusSucc: 0, }, { - Description: "When planning with the previous plan that results in No Changes and without the flag, don't set the atlantis/apply VCS status", - PrevPlanStored: true, - SetAtlantisApplyCheckSuccessfulIfNoChanges: false, - ExpVCSApplyStatusSet: false, + Description: "When planning with the previous plan that results in No Changes, set the atlantis/apply VCS status to 1/1", + PrevPlanStored: true, + ExpVCSApplyStatusTotal: 1, + ExpVCSApplyStatusSucc: 1, }, { - Description: "When planning with the previous plan that results in No Changes and setting the flag, set the atlantis/apply VCS status to 1/1", - PrevPlanStored: true, - SetAtlantisApplyCheckSuccessfulIfNoChanges: true, - ExpVCSApplyStatusSet: true, - ExpVCSApplyStatusTotal: 1, - ExpVCSApplyStatusSucc: 1, + Description: "When planning with unmatched target and any previous apply's, maintain VCS status", + PrevPlanStored: true, + Targeted: true, + ExpVCSApplyStatusTotal: 1, + ExpVCSApplyStatusSucc: 1, }, } @@ -556,7 +548,6 @@ func TestPlanCommandRunner_IsSetAtlantisApplyStatus(t *testing.T) { Ok(t, err) vcsClient := setup(t, func(tc *TestConfig) { - tc.SetAtlantisApplyCheckSuccessfulIfNoChanges = c.SetAtlantisApplyCheckSuccessfulIfNoChanges tc.backend = db }) @@ -564,6 +555,9 @@ func TestPlanCommandRunner_IsSetAtlantisApplyStatus(t *testing.T) { modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState, Num: testdata.Pull.Num} cmd := &events.CommentCommand{Name: command.Plan} + if c.Targeted { + cmd.RepoRelDir = "mydir" + } ctx := &command.Context{ User: testdata.User, Log: logging.NewNoopLogger(t), @@ -592,32 +586,21 @@ func TestPlanCommandRunner_IsSetAtlantisApplyStatus(t *testing.T) { planCommandRunner.Run(ctx, cmd) - vcsClient.VerifyWasCalledOnce().CreateComment(AnyRepo(), AnyInt(), AnyString(), AnyString()) + vcsClient.VerifyWasCalledOnce().CreateComment(Any[models.Repo](), AnyInt(), AnyString(), AnyString()) ExpCommitStatus := models.SuccessCommitStatus if c.ExpVCSApplyStatusSucc != c.ExpVCSApplyStatusTotal { ExpCommitStatus = models.PendingCommitStatus } - if c.ExpVCSApplyStatusSet { - commitUpdater.VerifyWasCalledOnce().UpdateCombinedCount( - matchers.AnyModelsRepo(), - matchers.AnyModelsPullRequest(), - matchers.EqModelsCommitStatus(ExpCommitStatus), - matchers.EqCommandName(command.Apply), - EqInt(c.ExpVCSApplyStatusSucc), - EqInt(c.ExpVCSApplyStatusTotal), - ) - } else { - commitUpdater.VerifyWasCalled(Never()).UpdateCombinedCount( - matchers.AnyModelsRepo(), - matchers.AnyModelsPullRequest(), - matchers.AnyModelsCommitStatus(), - matchers.EqCommandName(command.Apply), - AnyInt(), - AnyInt(), - ) - } + commitUpdater.VerifyWasCalledOnce().UpdateCombinedCount( + Any[models.Repo](), + Any[models.PullRequest](), + Eq[models.CommitStatus](ExpCommitStatus), + Eq[command.Name](command.Apply), + Eq(c.ExpVCSApplyStatusSucc), + Eq(c.ExpVCSApplyStatusTotal), + ) }) } -} \ No newline at end of file +} diff --git a/server/server.go b/server/server.go index a14889ddd5..91aca3be87 100644 --- a/server/server.go +++ b/server/server.go @@ -706,7 +706,6 @@ func NewServer(userConfig UserConfig, config Config) (*Server, error) { lockingClient, userConfig.DiscardApprovalOnPlanFlag, pullReqStatusFetcher, - userConfig.SetAtlantisApplyCheckSuccessfulIfNoChanges, ) applyCommandRunner := events.NewApplyCommandRunner( @@ -724,7 +723,6 @@ func NewServer(userConfig UserConfig, config Config) (*Server, error) { userConfig.SilenceNoProjects, userConfig.SilenceVCSStatusNoProjects, pullReqStatusFetcher, - userConfig.SetAtlantisApplyCheckSuccessfulIfNoChanges, ) approvePoliciesCommandRunner := events.NewApprovePoliciesCommandRunner( diff --git a/server/user_config.go b/server/user_config.go index c1f5fd4369..209482049e 100644 --- a/server/user_config.go +++ b/server/user_config.go @@ -102,27 +102,26 @@ type UserConfig struct { SilenceVCSStatusNoProjects bool `mapstructure:"silence-vcs-status-no-projects"` SilenceAllowlistErrors bool `mapstructure:"silence-allowlist-errors"` // SilenceWhitelistErrors is deprecated in favour of SilenceAllowlistErrors - SilenceWhitelistErrors bool `mapstructure:"silence-whitelist-errors"` - SetAtlantisApplyCheckSuccessfulIfNoChanges bool `mapstructure:"set-atlantis-apply-check-successful-if-no-changes"` - SkipCloneNoChanges bool `mapstructure:"skip-clone-no-changes"` - SlackToken string `mapstructure:"slack-token"` - SSLCertFile string `mapstructure:"ssl-cert-file"` - SSLKeyFile string `mapstructure:"ssl-key-file"` - RestrictFileList bool `mapstructure:"restrict-file-list"` - TFDownload bool `mapstructure:"tf-download"` - TFDownloadURL string `mapstructure:"tf-download-url"` - TFEHostname string `mapstructure:"tfe-hostname"` - TFELocalExecutionMode bool `mapstructure:"tfe-local-execution-mode"` - TFEToken string `mapstructure:"tfe-token"` - VarFileAllowlist string `mapstructure:"var-file-allowlist"` - VCSStatusName string `mapstructure:"vcs-status-name"` - DefaultTFVersion string `mapstructure:"default-tf-version"` - Webhooks []WebhookConfig `mapstructure:"webhooks"` - WebBasicAuth bool `mapstructure:"web-basic-auth"` - WebUsername string `mapstructure:"web-username"` - WebPassword string `mapstructure:"web-password"` - WriteGitCreds bool `mapstructure:"write-git-creds"` - WebsocketCheckOrigin bool `mapstructure:"websocket-check-origin"` + SilenceWhitelistErrors bool `mapstructure:"silence-whitelist-errors"` + SkipCloneNoChanges bool `mapstructure:"skip-clone-no-changes"` + SlackToken string `mapstructure:"slack-token"` + SSLCertFile string `mapstructure:"ssl-cert-file"` + SSLKeyFile string `mapstructure:"ssl-key-file"` + RestrictFileList bool `mapstructure:"restrict-file-list"` + TFDownload bool `mapstructure:"tf-download"` + TFDownloadURL string `mapstructure:"tf-download-url"` + TFEHostname string `mapstructure:"tfe-hostname"` + TFELocalExecutionMode bool `mapstructure:"tfe-local-execution-mode"` + TFEToken string `mapstructure:"tfe-token"` + VarFileAllowlist string `mapstructure:"var-file-allowlist"` + VCSStatusName string `mapstructure:"vcs-status-name"` + DefaultTFVersion string `mapstructure:"default-tf-version"` + Webhooks []WebhookConfig `mapstructure:"webhooks"` + WebBasicAuth bool `mapstructure:"web-basic-auth"` + WebUsername string `mapstructure:"web-username"` + WebPassword string `mapstructure:"web-password"` + WriteGitCreds bool `mapstructure:"write-git-creds"` + WebsocketCheckOrigin bool `mapstructure:"websocket-check-origin"` } // ToAllowCommandNames parse AllowCommands into a slice of CommandName