GitHub
09/08/2023, 7:11 AMGitHub
09/10/2023, 9:30 PMexec.Command()
.
why
Right now on main
running make test
causes a bunch of verbose errors (see below). Running make docker/test
had all tests pass (still the case with this change), it's just that the /bin/sh
has slightly different output based on operating system.
It's possible (probable) that other OSs (or operating system versions? Maybe even distros for linux?) will have still other outputs that need to be handled. I haven't attempted to address that, and tests will still fail in those cases, but this will give users a hint of how they could add code to fix for their sh
commands.
tests
Before:
```
atlantis % make test
? github.com/runatlantis/atlantis [no test files]
ok github.com/runatlantis/atlantis/cmd (cached)
ok github.com/runatlantis/atlantis/server (cached)
ok github.com/runatlantis/atlantis/server/controllers (cached)
ok github.com/runatlantis/atlantis/server/controllers/events (cached)
ok github.com/runatlantis/atlantis/server/controllers/templates (cached)
ok github.com/runatlantis/atlantis/server/controllers/websocket (cached)
ok github.com/runatlantis/atlantis/server/core/config (cached)
ok github.com/runatlantis/atlantis/server/core/config/raw (cached)
ok github.com/runatlantis/atlantis/server/core/config/valid (cached)
ok github.com/runatlantis/atlantis/server/core/db (cached)
ok github.com/runatlantis/atlantis/server/core/locking (cached)
ok github.com/runatlantis/atlantis/server/core/redis (cached)
? github.com/runatlantis/atlantis/testdrive [no test files]
--- FAIL: TestPostWorkflowHookRunner_Run (0.15s)
logger.go130 2023-09-10T172427.187-0400 INFO successfully ran "sh -c " in "/var/folders/rd/92z6dwy94ds2kzl28nr1_t0r0000gn/T/TestPostWorkflowHookRunner_Run1345747504/001"
logger.go130 2023-09-10T172427.198-0400 INFO successfully ran "sh -c echo hi" in "/var/folders/rd/92z6dwy94ds2kzl28nr1_t0r0000gn/T/TestPostWorkflowHookRunner_Run1345747504/002"
logger.go130 2023-09-10T172427.209-0400 INFO successfully ran "sh -c printf \\'your main.tf file does not provide default region.\\\\ncheck\\'" in "/var/folders/rd/92z6dwy94ds2kzl28nr1_t0r0000gn/T/TestPostWorkflowHookRunner_Run1345747504/003"
logger.go130 2023-09-10T172427.220-0400 INFO successfully ran "sh -c printf 'your main.tf file does not provide default region.\\ncheck'" in "/var/folders/rd/92z6dwy94ds2kzl28nr1_t0r0000gn/T/TestPostWorkflowHookRunner_Run1345747504/004"
logger.go130 2023-09-10T172427.231-0400 DEBUG error: exit status 2: running "sh -c echo 'a" in "/var/folders/rd/92z6dwy94ds2kzl28nr1_t0r0000gn/T/TestPostWorkflowHookRunner_Run1345747504/005":
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
testing_t_support.go41
/Users/lukemassa/go/pkg/mod/github.com/petergtz/pegomock/v4@v4.0.0/testing_t_support.go:40 +0x51
github.com/petergtz/pegomock/v4.(*GenericMock).Verify(0xc0003d7350, 0x0, {0x1493f20, 0xc00048b860}, {0x13f75fb, 0x10}, {0xc00048b920?, 0x3, 0x3}, {0xc000147878, ...})
/Users/lukemassa/go/pkg/mod/github.com/petergtz/pegomock/v4@v4.0.0/dsl.go:153 +0x675
github.com/runatlantis/atlantis/server/jobs/mocks.(*VerifierMockProjectCommandOutputHandler).SendWorkflowHook(_, {{{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, ...}, ...}, ...}, ...)
/Users/lukemassa/atlantis/server/jobs/mocks/mock_project_command_output_handler.go:300 +0x1cb
github.com/runatlantis/atlantis/server/core/runtime_test.TestPostWorkflowHookRunner_Run.func1(0xc0003ecb60?)
/Users/lukemassa/atlantis/server/core/runtime/post_workflow_hook_runner_test.go:188 +0x506
testing.tRunner(0xc0003ecb60, 0xc0003fa9b0)
/usr/local/Cellar/go/1.21.0/libexec/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 166
/usr/local/Cellar/go/1.21.0/libexec/src/testing/testing.go:1648 +0x3ad
Mock invocation count for SendWorkflowHook(Any(models.WorkflowHookCommandContext), Eq("sh: 1: Syntax error: Unterminated quoted string\r\n"), Eq(false)) does not match expectation.
Expected: 1; but got: 0
Actual interactions with this mock were:
SendWorkflowHook(models.WorkflowHookCommandContext{BaseRepomodels.Repo{FullName"", Owner:"baseowner", Name:"basename", CloneURL:"", SanitizedCloneURL:"", VCSHostmodels.VCSHost{Hostname"", Type:0}}, HeadRepomodels.Repo{FullName"", Owner:"headowner", Name:"headname", CloneURL:"", SanitizedCloneURL:"", VCSHostmodels.VCSHost{Hostname"", Type:0}}, Log:(*logging.StructuredLogger)(0xc000317d40), Pullmodels.PullRequest{Num2, HeadCommit:"12345abcdef", URL:"https://github.com/runatlantis/atlantis/pull/2", HeadBranch:"add-feat", BaseBranch:"main", Author:"acme", State:0, BaseRepomodels.Repo{FullName"", Owner:"", Name:"", CloneURL:"", SanitizedCloneURL:"", VCSHostmodels.VCSHost{Hostname"", Type:0}}}, Usermodels.User{Username"acme-user"}, Verbose:false, EscapedCommentArgs:[]string(nil), HookID:"", CommandName:"plan"}, "sh: -c: line 0: unexpected EOF while looking for matching `''\r\nsh: -c: line 1: syntax error: unexpected end of file\r\n", false)
SendWorkflowHook(models.WorkflowHookCommandContext{BaseRepomodels.Repo{FullName"", Owner:"baseowner", Name:"basename", CloneURL:"", SanitizedCloneURL:"", VCSHostmodels.VCSHost{Hostname"", Type:0}}, HeadRepomodels.Repo{FullName"", Owner:"headowner", Name:"headname", CloneURL:"", SanitizedCloneURL:"", VCSHostmodels.VCSHost{Hostname"", Type:0}}, Log:(*logging.StructuredLogger)(0xc000317d40), Pullmodels.PullRequest{Num2, HeadCommit:"12345abcdef", URL:"https://github.com/runatlantis/atlantis/pull/2", HeadBranch:"add-feat", BaseBranch:"main", Author:"acme", State:0, BaseRepomodels.Repo{FullName"", Owner:"", Name:"", CloneURL:"", SanitizedCloneURL:"", VCSHostmodels.VCSHost{Hostname"", Type:0}}}, Usermodels.User{Username"acme-user"}, Verbose:false, EscapedCommentArgs:[]string(nil), HookID:"", CommandName:"plan"}, "\n", true)
logger.go130 2023-09-10T172427.246-0400 INFO successfully ran "sh -c echo hi >> file && cat file" in "/var/folders/rd/92z6dwy94ds2kzl28nr1_t0r0000gn/T/TestPostWorkflowHookRunner_Run1345747504/006"
logger.go130 2023-09-10T172427.257-0400 DEBUG error: exit status 127: running "sh -c lkjlkj" in "/var/folders/rd/92z6dwy94ds2kzl28nr1_t0r0000gn/T/TestPostWorkflowHookRunner_Run1345747504/007":
sh: lkjlkj: command not found
testing_t_support.go41
/Users/lukemassa/go/pkg/mod/github.com/petergtz/pegomock/v4@v4.0.0/testing_t_support.go:40 +0x51
…
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 11 other checks have passed
11/12 successful checksGitHub
09/11/2023, 2:02 AMGitHub
09/12/2023, 2:03 AMNew()
to README.md example. by @wlynch in https://github.com/bradleyfalzon/ghinstallation/pull/105
• Update go-github to v55 by @asvoboda in https://github.com/bradleyfalzon/ghinstallation/pull/106
Full Changelog: bradleyfalzon/ghinstallation@v2.6.0...v2.7.0
* * *
Configuration
📅 Schedule: Branch creation - "before 4am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
* * *
☐ If you want to rebase/retry this PR, check this box
* * *
This PR has been generated by Mend Renovate. View repository job log here.
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 12 other checks have passed
12/13 successful checksGitHub
09/13/2023, 1:14 AMGitHub
09/13/2023, 3:24 AMrequired
for time.Time
accidentally introduced in v10.15.2
* * *
Configuration
📅 Schedule: Branch creation - "before 4am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
* * *
☐ If you want to rebase/retry this PR, check this box
* * *
This PR has been generated by Mend Renovate. View repository job log here.
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 12 other checks have passed
12/13 successful checksGitHub
09/13/2023, 11:14 AMGitHub
09/13/2023, 4:39 PMcustom_policy_check
setting in repo config and atlantis.yaml
• Allows overrides for custom_policy_check
in atlantis.yaml
• When set, project_command_runner
no longer tries to parse the policy output as a JSON object directly into a struct assuming Conftest output format
• Instead, manually formats output into the struct
• Custom policy output is parsed for "fail" substrings to determine passing
why
• This change enables users to leverage other policy tools besides Conftest in their custom workflows
• Other tools will not have the same level of Atlantis integration, but they will at least run without errors in a policy check and interact with the approve_policies
command
tests
• I have tested this in a private repo, both with the server-side setting and atlantis.yaml
override setting. Approve_policies behavior is unaffected.
• Open to any suggestions for adding a test case where relevant. I didn't see many tests for policy check steps to use for reference.
• This PR's only behavior change is within the Policy Check step, when the flag is set
references
• Closes #3682
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 13 other checks have passed
13/14 successful checksGitHub
09/14/2023, 2:01 AMGitHub
09/15/2023, 3:20 AMDict
as a Field
.
• #1319: Add WithLazy
method to Logger
which lazily evaluates the structured
context.
• #1350: String encoding is much (~50%) faster now.
Thanks to @hhk7734, @jquirke, @cdvr1993 for their contributions to this release.
* * *
Configuration
📅 Schedule: Branch creation - "before 4am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
* * *
☐ If you want to rebase/retry this PR, check this box
* * *
This PR has been generated by Mend Renovate. View repository job log here.
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 12 other checks have passed
12/13 successful checksGitHub
09/15/2023, 10:49 AMruntime: goroutine stack exceeds 1000000000-byte limit runtime: sp=0xc021478380 stack=[0xc021478000, 0xc041478000] fatal error: stack overflow
[...]
<http://github.com/runatlantis/atlantis/server/events.moduleInfo.load(...)|github.com/runatlantis/atlantis/server/events.moduleInfo.load(...)>
...atlantis/server/events/modules.go:108 +0x46b fp=0xc021478750 sp=0xc021478570 pc=0xfeaa6b
<http://github.com/runatlantis/atlantis/server/events.moduleInfo.load(...)|github.com/runatlantis/atlantis/server/events.moduleInfo.load(...)>
...atlantis/server/events/modules.go:108 +0x46b fp=0xc021478930 sp=0xc021478750 pc=0xfeaa6b
<http://github.com/runatlantis/atlantis/server/events.moduleInfo.load(...)|github.com/runatlantis/atlantis/server/events.moduleInfo.load(...)>
...atlantis/server/events/modules.go:108 +0x46b fp=0xc021478b10 sp=0xc021478930 pc=0xfeaa6b
... and so on, several hundred times.
tests
☑︎ I have tested my changes by make test-all
references
runatlantis/atlantis
GitHub Actions: runner / gotest
GitHub Actions: runner / gotest
GitHub Actions: build (debian)
GitHub Actions: build (alpine)
✅ 8 other checks have passed
8/12 successful checksGitHub
09/15/2023, 11:37 AMGitHub
09/16/2023, 12:56 AMGitHub
09/17/2023, 2:24 AMGitHub
09/18/2023, 1:00 AMGitHub
09/18/2023, 3:05 AMGitHub
09/18/2023, 7:49 PMGitHub
09/19/2023, 1:55 AM--import
flag (Moshe Atlow) #43942
• [`a68a67f54d`] - (SEMVER-MINOR) events: allow safely adding listener to abortSignal (Chemi Atlow) #48596
• [`3a8586bee2`] - fs, stream: initial Symbol.dispose
and Symbol.asyncDispose
support (Moshe Atlow) #48518
• [`863bdb785d`] - net: add autoSelectFamily global getter and setter (Paolo Insogna) #45777
• [`c59ae86ba0`] - (SEMVER-MINOR) url: add value argument to has and delete methods (Sankalp Shubham) #47885
Commits
• [`d1f43317ea`] - benchmark: add bar.R (Rafael Gonzaga) #47729
• [`4f74be3c92`] - benchmark: refactor crypto oneshot (Filip Skokan) #48267
• [`fe9da9df0f`] - benchmark: add crypto.create*Key (Filip Skokan) #48284
• [`9cb18b3e9d`] - build: do not pass target toolchain flags to host toolchain (Ivan Trubach) #48597
• [`7dc731d4bf`] - build: sync libuv header change (Jiawen Geng) #48078
• [`211a4f88a9`] - build: update action to close stale PRs (Michael Dawson) #48196
• [`cc33a1864b`] - child_process: harden against prototype pollution (Livia Medeiros) #48726
• [`b5df084e1e`] - child_process: use addAbortListener (atlowChemi) #48550
• [`611db8df1a`] - child_process: support Symbol.dispose
(Moshe Atlow) #48551
• [`490fc004b0`] - crypto: update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
• [`dd8cd97d4d`] - crypto: update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
• [`b2bc839d4c`] - crypto: remove OPENSSL_FIPS guard for OpenSSL 3 (Richard Lau) #48392
• [`c8da8c80b9`] - deps: update nghttp2 to 1.55.0 (Node.js GitHub Bot) #48746
• [`7e04242dcb`] - deps: update minimatch to 9.0.3 (Node.js GitHub Bot) #48704
• [`ea23870bec`] - deps: add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078
• [`88855e0b1b`] - deps: upgrade to libuv 1.46.0 (Santiago Gimeno) #48078
• [`fb2b80fca0`] - deps: upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
• [`59fca4e09a`] - deps: update acorn to 8.10.0 (Node.js GitHub Bot) #48713
• [`bcb255d5a8`] - deps: V8: cherry-pick `cb00db4` (Keyhan Vakil) #48671
• [`65a6c90fc6`] - deps: update acorn to 8.9.0 (Node.js GitHub Bot) #48484
• [`6b6d5d91e9`] - deps: update zlib to 1.2.13.1-motley-f81f385 (Node.js GitHub Bot) #48541
• [`56249b0770`] - deps: update googletest to `ec4fed9` (Node.js GitHub Bot) #48538
• [`8914a5204a`] - deps: update minimatch to 9.0.2 (Node.js GitHub Bot) #48542
• [`1b960d9988`] - deps: update icu to 73.2 (Node.js GitHub Bot) #48502
• [`f0e2e3c549`] - deps: update zlib to 1.2.13.1-motley-3ca9f16 (Node.js GitHub Bot) #48413
• [`9cf8fe6b93`] - deps: upgrade npm to 9.8.1 (npm team) #48838
• [`d9ff473ff3`] - deps: upgrade npm to 9.8.0 (npm team) <https://togithub.com/n…
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 11 other checks have passed
11/12 successful checksGitHub
09/19/2023, 8:23 AMatlantis plan
command finds no projects that are modified. This makes
atlantis plan
behave like autoplan
in this regard.
why
If you have set policy_check as a required status in github, this would only work with autoplan for PRs that did not modify any projects. The code path for autoplan and "atlantis plan" were different in this regard, but autoplan is not always appropriate.
tests
☑︎ I have tested my changes by make test-all
references
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 11 other checks have passed
11/12 successful checksGitHub
09/19/2023, 9:28 AMimage▾
image▾
GitHub
09/20/2023, 4:47 AMimage▾
image▾
GitHub
09/21/2023, 12:04 AMCLIENT SETINFO
commands introduced in Redis 7.2.
Other notable improvements
• Add the ability to set a connection growth limit with MaxActiveConns configuration setting (#2646)
• Add support for multiple values in the bitfield cmd (#2648)
Breaking Changes
• Changing the suffix for probablistic commands acceptings arguments to WithArgs from Args (#2701)
🧰 Maintenance
• Making command structs digestible (#2716)
• change interfaces probabilistic and redis gears from private to public (#2695)
• Adding CONTRIBUTING guidelines (#2718)
• Adding Go 1.21.x for CI coverage (#2697)
• chore(deps): bump actions/checkout from 3 to 4 (#2702)
• chore(deps): bump github.com/bsm/ginkgo/v2 from 2.9.5 to 2.12.0 (#2690)
• chore(deps): bump github.com/bsm/gomega from 1.26.0 to 1.27.10 (#2689)
• Adding stale issues workflow (#2700)
• Updating redis binary for makefile to 7.2.1 (#2693)
• Skip flaky tests (#2699)
• Format code and fix go vet (#2696)
• Use time duration calculation (#2651)
Contributors
We'd like to thank all the contributors who worked on this release!
@NikanV, @SoulPancake, @chayim, @dependabot, @dependabot[bot], @nvorobev, @ofekshenawa, @peczenyj, @taytzehao and @wzlove
* * *
Configuration
📅 Schedule: Branch creation - "before 4am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
* * *
☐ If you want to rebase/retry this PR, check this box
* * *
This PR has been generated by Mend Renovate. View repository job log here.
runatlantis/atlantis
GitHub Actions: runner / gotest
CircleCI Checks: Workflow: branch
✅ 11 other checks have passed
11/13 successful checksGitHub
09/21/2023, 9:19 PMGitHub
08/31/2023, 7:07 AM├── google
│ ├── environments
│ │ ├── prod
│ │ ├── staging
│ │ ├── dev
│ │ ├── modules
└── atlantis.yaml
Any time a change is made to a module used by the 3 environments a plan needs to run but all the times one ore none of them can run the plan properly becouse the next error:
╷
│ Error: Required plugins are not installed
│
│ The installed provider plugins are not consistent with the packages
│ selected in the dependency lock file:
│ - <http://registry.terraform.io/hashicorp/google|registry.terraform.io/hashicorp/google>: the cached package for <http://registry.terraform.io/hashicorp/google|registry.terraform.io/hashicorp/google> 4.80.0 (in .terraform/providers) does not match any of the checksums recorded in the dependency lock file
│
│ Terraform uses external plugins to integrate with a variety of different
│ infrastructure services. You must install the required plugins before
│ running Terraform operations.
╵
The package that changes id different on each run that means that seems to be a race condition.
tests
references
#3547
hashicorp/terraform#31964
hashicorp/terraform#33479
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 13 other checks have passed
13/14 successful checksGitHub
09/25/2023, 1:41 AMGitHub
09/25/2023, 5:43 PM--disable-autoplan-label=<string>
• Environment variable: ATLANTIS_DISABLE_AUTOPLAN_LABEL=<string>
• If --disable-autoplan
flag is set to true
, the new flag --disable-autoplan-label
has no effect
• If --disable-autoplan-label
is unset or if it's an empty string, it will have no effect
why
We encounter this especially in a large repository used by many developers. It gets hard to manage the lock queue so we use an external bot to manage the queue for us. Only in certain pull requests, we don't want the autoplan feature to kick in.
• Example 1: Working on a multi-project pull request and some locks are taken by other pull requests. You'd rather wait until all locks are free before planning all the directories (in the meantime, you receive pull request reviews and push commits to the PR)
• Example 2: A pull request that is marked as ready for review but requires some changes and you don't want to keep acquiring the lock on each commit
• Example 3: Automations that create pull requests but you don't want them to take the lock on each created PR.
tests
Tested with a Github pull request and environment variable ATLANTIS_DISABLE_AUTOPLAN_LABEL=no-autoplan
.
1. Adding the label then pushing a commit:
image▾
image▾
image▾
GitHub
09/25/2023, 7:17 PMGitHub
09/25/2023, 7:39 PMGitHub
09/25/2023, 7:53 PM.git-credentials
file contained something
why
• Needed if you configure atlantis for more than one VCS
• The fix now addes a new function to check if a GH token credential exists. If it does it calls the replaceLine
function if not it calls the appendLine
function
tests
references
closes #3674
runatlantis/atlantis
GitHub Actions: runner / gotest
✅ 11 other checks have passed
11/12 successful checksGitHub
09/26/2023, 1:11 AM