<@UB89GSWCF> I see <@U07R6DNLS0N> has a PR with a ...
# atmos-dev
e
@Andriy Knysh (Cloud Posse) I see @Vinny has a PR with a test failure related to your recent tests I think
Copy code
=== RUN   TestTerraformGenerateBackendCmd
2025/03/14 18:07:20 INFO {
   "terraform": {
   "backend": {
   "s3": {
   "acl": "bucket-owner-full-control",
   "bucket": "nonprod-tfstate",
   "dynamodb_table": "nonprod-tfstate-lock",
   "encrypt": true,
   "key": "terraform.tfstate",
   "region": "us-east-2",
   "workspace_key_prefix": "mock"
}
}
}
}
    terraform_generate_backend_test.go:49: 
        	Error Trace:	/home/runner/work/atmos/atmos/cmd/terraform_generate_backend_test.go:49
        	Error:      	"" does not contain "nonprod-tfstate-lock"
        	Test:       	TestTerraformGenerateBackendCmd
        	Messages:   	'TestTerraformGenerateBackendCmd' output should contain information about the generated backend
--- FAIL: TestTerraformGenerateBackendCmd (0.02s)
I wonder what could cause that.. your PR passed tests in
main
oh, easy
image.png
I don't know hy this change broke it
a
yes, removing those lines is the problem
we need them, but we need to figure out how to print them using the new logger (if we don't want to check the log level for the entire code block)
we can update the tests to not read from sdterr but read the generated file instead. but we prob want to maintain the existing functionality - print the generated backend to the console when log level is Debug
since the porpose of the PR "Implement: atmos list values", i would not change anything else not related to it (e.g. logging)
@Vinny
v
yess I was trying to debug it this afternoon
this https://github.com/cloudposse/atmos/pull/1036/commits/d7084e9e51d8f2a4b98d116b58d5bb4b898ab2c5 does not break it, its just a hack to fix it previously but i removed since the PR has nothing to do with that
a
please put those lines back
we need them for two reasons (in the test (which we can update) and to show the generated backend in the console)
we can deal with the logging in a separate PR
v
I think we are confused here wait a second let me revert this
done now the CI will pass because we are directly printing it the output
a
do you mean it was from another PR?
v
AH I found the cause
its because I changed the way we are logging it here
e
That’s a very dangerous change
We continue to have a lot of problems with what is logging versus the intended output of the command
Logging != output
Printing != logging
But we also consistently use the log levels to control printing which is 100% wrong. This is what probably confuses developers.
I opened an issue to fix that
v
agree, so I was thinking it was ok to keep that since we are migrating and got confused more
e
Let's not refactor that in your PR 😉
✅ 1
v
I guess I still need more eyes into it
in local exactly same code is passing
ok found it its because of list stacks
I guess I entered in a refactoring infinite loop because of the linter previously 🤷‍♂️