Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken links on experiment pages #3776

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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