Skip to content

Commit

Permalink
chore: fix typos (#5202)
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 authored Dec 28, 2024
1 parent ecc58b9 commit 591931a
Show file tree
Hide file tree
Showing 26 changed files with 47 additions and 47 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Maintenance release for security patches with atlantis-base image
* docker: bump git-lfs and gosu dependencies by @hi-artem in https://github.com/runatlantis/atlantis/pull/2096
* fix(docker): fix base image for multi-platform build by @Tenzer in https://github.com/runatlantis/atlantis/pull/2099
* fix(docker): fix installation of git-lfs in armv7 image by @Tenzer in https://github.com/runatlantis/atlantis/pull/2100
* fix(docker): download Terraform and conftest versions maching image architecture by @Tenzer in https://github.com/runatlantis/atlantis/pull/2101
* fix(docker): download Terraform and conftest versions matching image architecture by @Tenzer in https://github.com/runatlantis/atlantis/pull/2101

# v0.18.3

Expand Down Expand Up @@ -237,7 +237,7 @@ Maintenance release for security patches with atlantis-base image
* build(deps): bump github.com/hashicorp/go-version from 1.3.0 to 1.4.0 by @dependabot in https://github.com/runatlantis/atlantis/pull/1987
* build(deps): bump go.uber.org/zap from 1.19.1 to 1.20.0 by @dependabot in https://github.com/runatlantis/atlantis/pull/1988
* docs: document `undiverged` apply requirement in more places by @fishpen0 in https://github.com/runatlantis/atlantis/pull/1992
* fix: fix autoplan when .terraform.lock.hcl is modifed by @gezb in https://github.com/runatlantis/atlantis/pull/1991
* fix: fix autoplan when .terraform.lock.hcl is modified by @gezb in https://github.com/runatlantis/atlantis/pull/1991
* feat: add XTerm JS to the server static files by @Ka1wa in https://github.com/runatlantis/atlantis/pull/1985
* feat: post workflow hooks by @tim775 in https://github.com/runatlantis/atlantis/pull/1990
* docs: add colon to policy checking yaml by @williamlord-wise in https://github.com/runatlantis/atlantis/pull/1996
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Because I'm going to host the site on AWS services, I need requests to <www.runa

At this point, we've generated an SSL certificate for <www.runatlantis.io> and our website is available on the internet via its S3 url so can't we just CNAME to the S3 bucket and call it a day? Unfortunately not.

Since we generated our own certificate, we would need S3 to sign its responses using our certificiate. S3 doesn't support this and thus we need CloudFront. CloudFront supports using our own SSL cert and will just pull its data from the S3 bucket.
Since we generated our own certificate, we would need S3 to sign its responses using our certificate. S3 doesn't support this and thus we need CloudFront. CloudFront supports using our own SSL cert and will just pull its data from the S3 bucket.

# Terraform Time

Expand Down
4 changes: 2 additions & 2 deletions runatlantis.io/docs/custom-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ workflows:
name: TF_IN_AUTOMATION
value: 'true'
- run:
# Allow for targetted plans/applies as not supported for Terraform wrappers by default
# Allow for targeted plans/applies as not supported for Terraform wrappers by default
command: terragrunt plan -input=false $(printf '%s' $COMMENT_ARGS | sed 's/,/ /g' | tr -d '\\') -no-color -out $PLANFILE
output: hide
- run: |
Expand Down Expand Up @@ -727,7 +727,7 @@ Full:
| multienv.command | string | none | yes | Name of the custom script to run |
| multienv.shell | string | "sh" | no | Name of the shell to use for command execution |
| multienv.shellArgs | string or []string | "-c" | no | Command line arguments to be passed to the shell. Cannot be set without `shell` |
| multienv.output | string | "show" | no | Setting output to "hide" will supress the message obout added environment variables |
| multienv.output | string | "show" | no | Setting output to "hide" will suppress the message obout added environment variables |

The output of the command execution must have the following format:
`EnvVar1Name=value1,EnvVar2Name=value2,EnvVar3Name=value3`
Expand Down
2 changes: 1 addition & 1 deletion runatlantis.io/docs/post-workflow-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ back to the PR as a comment.
Post workflow hooks can only be specified in the Server-Side Repo Config under
the `repos` key.

## Atlantis Command Targetting
## Atlantis Command Targeting

By default, the workflow hook will run when any command is processed by Atlantis.
This can be modified by specifying the `commands` key in the workflow hook containing a comma delimited list
Expand Down
2 changes: 1 addition & 1 deletion runatlantis.io/docs/pre-workflow-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ behavior can be changed by setting the [fail-on-pre-workflow-hook-error](server-
flag in the Atlantis server configuration.
:::

## Atlantis Command Targetting
## Atlantis Command Targeting

By default, the workflow hook will run when any command is processed by Atlantis.
This can be modified by specifying the `commands` key in the workflow hook containing a comma delimited list
Expand Down
2 changes: 1 addition & 1 deletion runatlantis.io/docs/repo-and-project-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ checking if the external command exited with code `0` and if the last line
of output is `pass`.

```text
# Psuedo-code of Atlantis evaluation of external commands
# Pseudo-code of Atlantis evaluation of external commands
user_authorized =
external_command.exit_code == 0
Expand Down
2 changes: 1 addition & 1 deletion runatlantis.io/docs/repo-level-atlantis-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ in your repo.
If you have many directories with Terraform configuration, each directory will
need to be defined.

This behavior can be overriden by setting `autodiscover.mode` to
This behavior can be overridden by setting `autodiscover.mode` to
`enabled` in which case Atlantis will still try to discover projects which were not
explicitly configured. If the directory of any discovered project conflicts with a
manually configured project, the manually configured project will take precedence.
Expand Down
6 changes: 3 additions & 3 deletions runatlantis.io/docs/server-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ and set `--autoplan-modules` to `false`.

This will not work with `-d` yet and to use `-p` the repo projects must be defined in the repo `atlantis.yaml` file.

This will bypass `--restrict-file-list` if regex is used, normal commands will stil be blocked if necessary.
This will bypass `--restrict-file-list` if regex is used, normal commands will still be blocked if necessary.

::: warning SECURITY WARNING
It's not supposed to be used with `--disable-apply-all`.
Expand Down Expand Up @@ -1140,7 +1140,7 @@ This is useful when you have many projects and want to keep the pull request cle

`--restrict-file-list` will block plan requests from projects outside the files modified in the pull request.
This will not block plan requests with regex if using the `--enable-regexp-cmd` flag, in these cases commands
like `atlantis plan -p .*` will still work if used. normal commands will stil be blocked if necessary.
like `atlantis plan -p .*` will still work if used. normal commands will still be blocked if necessary.
Defaults to `false`.

### `--silence-allowlist-errors`
Expand Down Expand Up @@ -1342,7 +1342,7 @@ This flag is useful when having multiple projects that need to run a plan and ap
* [plugin_cache_dir concurrently discussion](https://github.com/hashicorp/terraform/issues/31964)
* [PR to improve the situation](https://github.com/hashicorp/terraform/pull/33479)

The effect of the race condition is more evident when using parallel configuration to run plan and apply, by disabling the use of plugin cache will impact in the performance when starting a new plan or apply, but in large atlantis deployments with multiple projects and shared modules the use of `--parallel_plan` and `--parallel_apply` is mandatory for an efficient managment of the PRs.
The effect of the race condition is more evident when using parallel configuration to run plan and apply, by disabling the use of plugin cache will impact in the performance when starting a new plan or apply, but in large atlantis deployments with multiple projects and shared modules the use of `--parallel_plan` and `--parallel_apply` is mandatory for an efficient management of the PRs.

### `--var-file-allowlist`

Expand Down
4 changes: 2 additions & 2 deletions server/controllers/events/events_controller_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ func TestGitHubWorkflow(t *testing.T) {
},
},
{
Description: "omitting apply from allow commands always takes presedence",
Description: "omitting apply from allow commands always takes precedence",
RepoDir: "simple-yaml",
ModifiedFiles: []string{"main.tf"},
AllowCommands: []command.Name{command.Plan},
Expand Down Expand Up @@ -845,7 +845,7 @@ func TestSimpleWorkflow_terraformLockFile(t *testing.T) {

if !c.LockFileTracked {
// replace the lock file generated by the previous init to simulate
// dependcies needing updating in a latter plan
// dependencies needing updating in a latter plan
runCmd(t, "", "cp", oldLockFilePath, fmt.Sprintf("%s/repos/runatlantis/atlantis-tests/2/default/.terraform.lock.hcl", atlantisWorkspace.DataDir))
}

Expand Down
4 changes: 2 additions & 2 deletions server/core/config/raw/global_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func (g GlobalCfg) ToValid(defaultCfg valid.GlobalCfg) valid.GlobalCfg {
applyReqs := defaultCfg.Repos[0].ApplyRequirements
var globalApplyReqs []string
for _, req := range applyReqs {
for _, nonOverrideableReq := range valid.NonOverrideableApplyReqs {
if req == nonOverrideableReq {
for _, nonOverridableReq := range valid.NonOverridableApplyReqs {
if req == nonOverridableReq {
globalApplyReqs = append(globalApplyReqs, req)
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/core/config/raw/repo_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// DefaultEmojiReaction is the default emoji reaction for repos
const DefaultEmojiReaction = ""

// DefaultAbortOnExcecutionOrderFail being false is the default setting for abort on execution group failiures
// DefaultAbortOnExcecutionOrderFail being false is the default setting for abort on execution group failures
const DefaultAbortOnExcecutionOrderFail = false

// RepoCfg is the raw schema for repo-level atlantis.yaml config.
Expand Down
2 changes: 1 addition & 1 deletion server/core/config/raw/step_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ func TestStep_Validate(t *testing.T) {
{
// For atlantis.yaml v2, this wouldn't parse, but now there should
// be no error.
description: "unparseable shell command",
description: "unparsable shell command",
input: raw.Step{
StringVal: map[string]string{
"run": "my 'c",
Expand Down
2 changes: 1 addition & 1 deletion server/core/config/raw/workflow_step_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestGlobalConfigStep_Validate(t *testing.T) {
{
// For atlantis.yaml v2, this wouldn't parse, but now there should
// be no error.
description: "unparseable shell command",
description: "unparsable shell command",
input: raw.WorkflowHook{
StringVal: map[string]string{
"run": "my 'c",
Expand Down
4 changes: 2 additions & 2 deletions server/core/config/valid/global_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ var AllowedSilencePRComments = []string{"plan", "apply"}
// DefaultAtlantisFile is the default name of the config file for each repo.
const DefaultAtlantisFile = "atlantis.yaml"

// NonOverrideableApplyReqs will get applied across all "repos" in the server side config.
// NonOverridableApplyReqs will get applied across all "repos" in the server side config.
// If repo config is allowed overrides, they can override this.
// TODO: Make this more customizable, not everyone wants this rigid workflow
// maybe something along the lines of defining overridable/non-overrideable apply
// requirements in the config and removing the flag to enable policy checking.
var NonOverrideableApplyReqs = []string{PoliciesPassedCommandReq}
var NonOverridableApplyReqs = []string{PoliciesPassedCommandReq}

// GlobalCfg is the final parsed version of server-side repo config.
type GlobalCfg struct {
Expand Down
4 changes: 2 additions & 2 deletions server/core/locking/apply_locking.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NewApplyClient(backend Backend, disableApply bool, disableGlobalApplyLock b
}

// LockApply acquires global apply lock.
// DisableApply takes presedence to any existing locks, if it is set to true
// DisableApply takes precedence to any existing locks, if it is set to true
// this function returns an error
func (c *ApplyClient) LockApply() (ApplyCommandLock, error) {
response := ApplyCommandLock{}
Expand All @@ -76,7 +76,7 @@ func (c *ApplyClient) LockApply() (ApplyCommandLock, error) {
}

// UnlockApply releases a global apply lock.
// DisableApply takes presedence to any existing locks, if it is set to true
// DisableApply takes precedence to any existing locks, if it is set to true
// this function returns an error
func (c *ApplyClient) UnlockApply() error {
if c.disableApply {
Expand Down
2 changes: 1 addition & 1 deletion server/core/runtime/plan_step_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ locally at this time.
`

// remoteOpsErr100 is the error terraform plan will retrun if this project is
// remoteOpsErr100 is the error terraform plan will return if this project is
// using TFE remote operations in TF 1.0.{0,1}.
var remoteOpsErr100 = `Error: Saving a generated plan is currently not supported
Expand Down
4 changes: 2 additions & 2 deletions server/core/runtime/post_workflow_hook_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestPostWorkflowHookRunner_Run(t *testing.T) {

defaultShell := "sh"
defaultShellArgs := "-c"
defautShellCommandNotFoundErrorFormat := commandNotFoundErrorFormat(defaultShell)
defaultShellCommandNotFoundErrorFormat := commandNotFoundErrorFormat(defaultShell)
defaultUnterminatedStringError := unterminatedStringError(defaultShell, defaultShellArgs)

cases := []struct {
Expand Down Expand Up @@ -82,7 +82,7 @@ func TestPostWorkflowHookRunner_Run(t *testing.T) {
Command: "lkjlkj",
Shell: defaultShell,
ShellArgs: defaultShellArgs,
ExpOut: fmt.Sprintf(defautShellCommandNotFoundErrorFormat, "lkjlkj"),
ExpOut: fmt.Sprintf(defaultShellCommandNotFoundErrorFormat, "lkjlkj"),
ExpErr: "exit status 127: running \"sh -c lkjlkj\" in",
ExpDescription: "",
},
Expand Down
4 changes: 2 additions & 2 deletions server/core/runtime/pre_workflow_hook_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestPreWorkflowHookRunner_Run(t *testing.T) {

defaultShell := "sh"
defaultShellArgs := "-c"
defautShellCommandNotFoundErrorFormat := commandNotFoundErrorFormat(defaultShell)
defaultShellCommandNotFoundErrorFormat := commandNotFoundErrorFormat(defaultShell)
defaultUnterminatedStringError := unterminatedStringError(defaultShell, defaultShellArgs)

cases := []struct {
Expand Down Expand Up @@ -102,7 +102,7 @@ func TestPreWorkflowHookRunner_Run(t *testing.T) {
Command: "lkjlkj",
Shell: defaultShell,
ShellArgs: defaultShellArgs,
ExpOut: fmt.Sprintf(defautShellCommandNotFoundErrorFormat, "lkjlkj"),
ExpOut: fmt.Sprintf(defaultShellCommandNotFoundErrorFormat, "lkjlkj"),
ExpErr: "exit status 127: running \"sh -c lkjlkj\" in",
ExpDescription: "",
},
Expand Down
8 changes: 4 additions & 4 deletions server/core/terraform/terraform_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ is 0.11.13. You can update by downloading from developer.hashicorp.com/terraform
defer tempSetEnv(t, "PATH", fmt.Sprintf("%s:%s", tmp, os.Getenv("PATH")))()

mockDownloader := mocks.NewMockDownloader()
distibution := terraform.NewDistributionTerraformWithDownloader(mockDownloader)
distribution := terraform.NewDistributionTerraformWithDownloader(mockDownloader)

c, err := terraform.NewClient(logger, distibution, binDir, cacheDir, "", "", "", cmd.DefaultTFVersionFlag, cmd.DefaultTFDownloadURL, true, true, projectCmdOutputHandler)
c, err := terraform.NewClient(logger, distribution, binDir, cacheDir, "", "", "", cmd.DefaultTFVersionFlag, cmd.DefaultTFDownloadURL, true, true, projectCmdOutputHandler)
Ok(t, err)

Ok(t, err)
Expand Down Expand Up @@ -301,10 +301,10 @@ func TestEnsureVersion_downloaded(t *testing.T) {
projectCmdOutputHandler := jobmocks.NewMockProjectCommandOutputHandler()

mockDownloader := mocks.NewMockDownloader()
distibution := terraform.NewDistributionTerraformWithDownloader(mockDownloader)
distribution := terraform.NewDistributionTerraformWithDownloader(mockDownloader)

downloadsAllowed := true
c, err := terraform.NewTestClient(logger, distibution, binDir, cacheDir, "", "", "0.11.10", cmd.DefaultTFVersionFlag, cmd.DefaultTFDownloadURL, downloadsAllowed, true, projectCmdOutputHandler)
c, err := terraform.NewTestClient(logger, distribution, binDir, cacheDir, "", "", "0.11.10", cmd.DefaultTFVersionFlag, cmd.DefaultTFDownloadURL, downloadsAllowed, true, projectCmdOutputHandler)
Ok(t, err)

Equals(t, "0.11.10", c.DefaultVersion().String())
Expand Down
2 changes: 1 addition & 1 deletion server/events/markdown_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (m *MarkdownRenderer) renderProjectResults(ctx *command.Context, results []
resultData.Rendered = m.renderTemplateTrimSpace(templates.Lookup("stateRmSuccessUnwrapped"), result.StateRmSuccess)
}
// Error out if no template was found, only if there are no errors or failures.
// This is because some errors and failures rely on additional context rendered by templtes, but not all errors or failures.
// This is because some errors and failures rely on additional context rendered by templates, but not all errors or failures.
} else if !(result.Error != nil || result.Failure != "") {
resultData.Rendered = "Found no template. This is a bug!"
}
Expand Down
2 changes: 1 addition & 1 deletion server/events/models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ type TeamAllowlistCheckerContext struct {
API bool
}

// WorkflowHookCommandContext defines the context for a pre and post worklfow_hooks that will
// WorkflowHookCommandContext defines the context for a pre and post workflow_hooks that will
// be executed before workflows.
type WorkflowHookCommandContext struct {
// BaseRepo is the repository that the pull request will be merged into.
Expand Down
4 changes: 2 additions & 2 deletions server/events/project_command_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
DefaultWorkspace = "default"
// DefaultDeleteSourceBranchOnMerge being false is the default setting whether or not to remove a source branch on merge
DefaultDeleteSourceBranchOnMerge = false
// DefaultAbortOnExcecutionOrderFail being false is the default setting for abort on execution group failiures
// DefaultAbortOnExcecutionOrderFail being false is the default setting for abort on execution group failures
DefaultAbortOnExcecutionOrderFail = false
)

Expand Down Expand Up @@ -238,7 +238,7 @@ type DefaultProjectCommandBuilder struct {
AutoDetectModuleFiles string
// User config option: List of file patterns to to to check if a directory contains modified files.
AutoplanFileList string
// User config option: Format Terraform plan output into a markdown-diff friendy format for color-coding purposes.
// User config option: Format Terraform plan output into a markdown-diff friendly format for color-coding purposes.
EnableDiffMarkdownFormat bool
// User config option: Block plan requests from projects outside the files modified in the pull request.
RestrictFileList bool
Expand Down
2 changes: 1 addition & 1 deletion server/events/project_command_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ type ProjectApplyCommandRunner interface {
}

type ProjectPolicyCheckCommandRunner interface {
// PolicyCheck runs OPA defined policies for the project desribed by ctx.
// PolicyCheck runs OPA defined policies for the project described by ctx.
PolicyCheck(ctx command.ProjectContext) command.ProjectResult
}

Expand Down
2 changes: 1 addition & 1 deletion server/events/project_command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ func TestDefaultProjectCommandRunner_ApprovePolicies(t *testing.T) {
expFailure: "One or more policy sets require additional approval.",
},
{
description: "When user is a top-level ownner through membership, increment approval on all policies.",
description: "When user is a top-level owner through membership, increment approval on all policies.",
userTeams: []string{"someuserteam"},
policySetCfg: valid.PolicySets{
Owners: valid.PolicyOwners{
Expand Down
Loading

0 comments on commit 591931a

Please sign in to comment.