Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 fix: Removing filter enabled check on empty stacks by yhakbar · Pull Request #4992 · gruntwork-io/terragrunt · GitHub
Nothing Special   »   [go: up one dir, main page]

Skip to content
Open
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
8000
2 changes: 0 additions & 2 deletions internal/runner/common/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ func (err InfiniteRecursionError) Error() string {
return errors.Errorf("Hit what seems to be an infinite recursion after going %d levels deep. Please check for a circular dependency! Units involved: %v", err.RecursionLevel, err.Units).Error()
}

var ErrNoUnitsFound = errors.New("could not find any subfolders with Terragrunt configuration files")

type DependencyCycleError []string

func (err DependencyCycleError) Error() string {
Expand Down
46 changes: 23 additions & 23 deletions internal/runner/runnerpool/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,35 @@ func (r *Runner) SetQueue(q *queue.Queue) {
}

// NewRunnerPoolStack creates a new stack from discovered units.
func NewRunnerPoolStack(ctx context.Context, l log.Logger, terragruntOptions *options.TerragruntOptions, discovered component.Components, opts ...common.Option) (common.StackRunner, error) {
func NewRunnerPoolStack(
ctx context.Context,
l log.Logger,
terragruntOptions *options.TerragruntOptions,
discovered component.Components,
opts ...common.Option,
) (common.StackRunner, error) {
if len(discovered) == 0 {
// If any filtering options are enabled that can result in valid empty results, create an empty runner.
isFilteringEnabled := terragruntOptions.StrictInclude ||
len(terragruntOptions.ModulesThatInclude) > 0

if isFilteringEnabled {
// Create an empty runner that will process no units
stack := common.Stack{
TerragruntOptions: terragruntOptions,
ParserOptions: config.DefaultParserOptions(l, terragruntOptions),
}

runner := &Runner{
Stack: &stack,
}
l.Warnf("No units discovered. Creating an empty runner.")

// Create an empty queue
q, queueErr := queue.NewQueue(component.Components{})
if queueErr != nil {
return nil, queueErr
}
// Create an empty runner that will process no units
stack := common.Stack{
TerragruntOptions: terragruntOptions,
ParserOptions: config.DefaultParserOptions(l, terragruntOptions),
}

runner.queue = q
runner := &Runner{
Stack: &stack,
}

return runner.WithOptions(opts...), nil
// Create an empty queue
q, queueErr := queue.NewQueue(component.Components{})
if queueErr != nil {
return nil, queueErr
}

return nil, common.ErrNoUnitsFound
runner.queue = q

return runner.WithOptions(opts...), nil
}

// Initialize stack; queue will be constructed after resolving units so we can filter excludes first.
Expand Down
3 changes: 1 addition & 2 deletions test/integration_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestRunNoStacksGenerate(t *testing.T) {
name: "AllNoGenerate",
cmd: "terragrunt run apply --all --no-stack-generate --non-interactive",
subfolder: "live",
shouldFail: true,
shouldFail: false,
},
{
name: "Standard",
Expand Down Expand Up @@ -118,7 +118,6 @@ func TestRunNoStacksGenerate(t *testing.T) {
// assert.Empty(t, stderr)
} else {
require.NoError(t, err)
assert.NotEmpty(t, stdout)
assert.NotEmpty(t, stderr)
}

Expand Down
8 changes: 5 additions & 3 deletions test/integration_stacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,14 @@ func TestStacksNoGenerate(t *testing.T) {
require.NoError(t, err)

for _, entry := range entries {
err := os.RemoveAll(filepath.Join(path, entry.Name()))
err = os.RemoveAll(filepath.Join(path, entry.Name()))
require.NoError(t, err)
}

_, _, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --no-stack-generate --non-interactive --working-dir "+rootPath)
require.Error(t, err)
_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --no-stack-generate --non-interactive --working-dir "+rootPath)
require.NoError(t, err)

assert.Contains(t, stderr, "No units discovered. Creating an empty runner.")
}

func TestStacksInputs(t *testing.T) {
Expand Down
Loading
0