Closed samjsmart closed 1 year ago
A guess in the dark. Wondering if it's filesystem performance within Docker.
The terraspace build
stage reads and writes files.
When you get a chance, here's a special custom logger that will prepend timestamp to stdout.
config/app.rb
class CustomLogger < Terraspace::Logger
def format_message(severity, datetime, progname, msg)
out = (@formatter || @default_formatter).call(severity, datetime, progname, msg)
"#{out}\n"
end
end
Terraspace.configure do |config|config.logger.level = :debug
config.logger = CustomLogger.new($stdout)
config.logger.level = :debug
config.test_framework = "rspec"
end
You should see something like this:
$ terraspace build
[2021-12-30T19:45:52 #5181 ]: Building one stack to build all stacks
[2021-12-30T19:45:52 #5181 ]: Building .terraspace-cache/dev/stacks/demo
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/stacks/demo/backend.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/stacks/demo/provider.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/modules/example/main.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/modules/example/outputs.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/modules/example/variables.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/stacks/demo/backend.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/stacks/demo/provider.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/stacks/demo/main.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/stacks/demo/outputs.tf
[2021-12-30T19:45:52 #5181 ]: Created .terraspace-cache/dev/stacks/demo/variables.tf
[2021-12-30T19:45:52 #5181 ]: Built in .terraspace-cache/dev/stacks/demo
$
That may provide more diagnostic info.
Closing due to lack of updates
This doesn't appear to be a resource issue either, as there is minimal usage during execution:
From execution observation, it appears that the majority of the time is spent on the build step. Happy to provide further information as required.