Skip to content

Commit

Permalink
Fixed broken links on expermient pages (#3776)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis256 authored Jan 16, 2025
1 parent 65c42c2 commit dbb03b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cli/commands/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,12 @@ func NewGlobalFlags(opts *options.TerragruntOptions) cli.Flags {
Name: TerragruntExperimentModeFlagName,
EnvVar: TerragruntExperimentModeEnvName,
Destination: &opts.ExperimentMode,
Usage: "Enables experiment mode for Terragrunt. For more information, see https://terragrunt.gruntwork.io/docs/reference/experiment-mode .",
Usage: "Enables experiment mode for Terragrunt. For more information, see https://terragrunt.gruntwork.io/docs/reference/experiments/ .",
},
&cli.SliceFlag[string]{
Name: TerragruntExperimentFlagName,
EnvVar: TerragruntExperimentEnvName,
Usage: "Enables specific experiments. For a list of available experiments, see https://terragrunt.gruntwork.io/docs/reference/experiment-mode .",
Usage: "Enables specific experiments. For a list of available experiments, see https://terragrunt.gruntwork.io/docs/reference/experiments/ .",
Action: func(ctx *cli.Context, val []string) error {
experiments := experiment.NewExperiments()
warning, err := experiments.ValidateExperimentNames(val)
Expand Down
6 changes: 3 additions & 3 deletions internal/experiment/experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// By default experiment mode is disabled, but when enabled, experimental features can be enabled.
// These features are not yet stable and may change in the future.
//
// Note that any behavior outlined here should be documented in /docs/_docs/04_reference/experiment-mode.md
// Note that any behavior outlined here should be documented in /docs/_docs/04_reference/experiments.md
//
// That is how users will know what to expect when they enable experiment mode, and how to customize it.
package experiment
Expand Down Expand Up @@ -122,7 +122,7 @@ type CompletedExperimentsWarning struct {
}

func (e CompletedExperimentsWarning) String() string {
return "The following experiment(s) are already completed: " + strings.Join(e.ExperimentNames, ", ") + ". Please remove any completed experiments, as setting them no longer does anything. For a list of all ongoing experiments, and the outcomes of previous experiments, see https://terragrunt.gruntwork.io/docs/reference/experiment-mode"
return "The following experiment(s) are already completed: " + strings.Join(e.ExperimentNames, ", ") + ". Please remove any completed experiments, as setting them no longer does anything. For a list of all ongoing experiments, and the outcomes of previous experiments, see https://terragrunt.gruntwork.io/docs/reference/experiments/"
}

// InvalidExperimentsError is an error that is returned when an invalid experiments are requested.
Expand All @@ -131,7 +131,7 @@ type InvalidExperimentsError struct {
}

func (e InvalidExperimentsError) Error() string {
return "The following experiment(s) are invalid: " + strings.Join(e.ExperimentNames, ", ") + ". For a list of all valid experiments, see https://terragrunt.gruntwork.io/docs/reference/experiment-mode"
return "The following experiment(s) are invalid: " + strings.Join(e.ExperimentNames, ", ") + ". For a list of all valid experiments, see https://terragrunt.gruntwork.io/docs/reference/experiments/"
}

// Evaluate returns true if either the experiment is enabled, or experiment mode is enabled.
Expand Down
4 changes: 2 additions & 2 deletions internal/experiment/experiment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestValidateExperiments(t *testing.T) {
},
},
experimentNames: []string{experiment.Symlinks},
expectedWarning: "The following experiment(s) are already completed: symlinks. Please remove any completed experiments, as setting them no longer does anything. For a list of all ongoing experiments, and the outcomes of previous experiments, see https://terragrunt.gruntwork.io/docs/reference/experiment-mode",
expectedWarning: "The following experiment(s) are already completed: symlinks. Please remove any completed experiments, as setting them no longer does anything. For a list of all ongoing experiments, and the outcomes of previous experiments, see https://terragrunt.gruntwork.io/docs/reference/experiments/",
expectedError: nil,
},
{
Expand All @@ -62,7 +62,7 @@ func TestValidateExperiments(t *testing.T) {
},
},
experimentNames: []string{"invalid", experiment.Symlinks},
expectedWarning: "The following experiment(s) are already completed: symlinks. Please remove any completed experiments, as setting them no longer does anything. For a list of all ongoing experiments, and the outcomes of previous experiments, see https://terragrunt.gruntwork.io/docs/reference/experiment-mode",
expectedWarning: "The following experiment(s) are already completed: symlinks. Please remove any completed experiments, as setting them no longer does anything. For a list of all ongoing experiments, and the outcomes of previous experiments, see https://terragrunt.gruntwork.io/docs/reference/experiments/",
expectedError: experiment.InvalidExperimentsError{
ExperimentNames: []string{"invalid"},
},
Expand Down

0 comments on commit dbb03b4

Please sign in to comment.