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

fix: logger nil pointer in instrumented_project_command_builder #4461

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

jippi
Copy link
Contributor

@jippi jippi commented Apr 19, 2024

what

Running the latest main on testing yielded this message from Atlantis.

Submitting it as-is since its end-of-week, and others might be hitting the issue.

runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x454cb7)
runtime/signal_unix.go:881 (0x454c85)
github.com/runatlantis/atlantis/server/events/instrumented_project_command_builder.go:75 (0x106ba3a)
github.com/runatlantis/atlantis/server/events/instrumented_project_command_builder.go:35 (0x106b58a)
github.com/runatlantis/atlantis/server/events/plan_command_runner.go:194 (0x1074081)
github.com/runatlantis/atlantis/server/events/plan_command_runner.go:306 (0x1075844)
github.com/runatlantis/atlantis/server/events/command_runner.go:367 (0x1059483)
runtime/asm_amd64.s:1695 (0x4725c0)

why

A refactor should have passed in the logger to the struct.

tests

  • No more nil-pointer panics in our testing environment

@jippi jippi requested review from a team as code owners April 19, 2024 17:21
@jippi jippi requested review from chenrui333, lukemassa and nitrocode and removed request for a team April 19, 2024 17:21
@github-actions github-actions bot added the go Pull requests that update Go code label Apr 19, 2024
@jippi jippi changed the title fix logger nil pointer fix: logger nil pointer in instrumented_project_command_builder Apr 19, 2024
@jippi
Copy link
Contributor Author

jippi commented Apr 19, 2024

🤔 I'm not sure why the tests are failing - would love some hints - not familiar enough with the output produced to effectively triage it

Seems to be related to + keepers = {} being in the output from TF - but my changes shouldn't (??) have affected any of that behavior?

@jamengual
Copy link
Contributor

jamengual commented Apr 19, 2024 via email

@jippi
Copy link
Contributor Author

jippi commented Apr 19, 2024

Should be fixed in #4462 once the pipelines complete

@jamengual jamengual added the bug Something isn't working label Apr 19, 2024
@jamengual
Copy link
Contributor

@jippi could you update you branch and push the changes?

@jippi
Copy link
Contributor Author

jippi commented Apr 25, 2024

@jamengual Done 👍

@lukemassa lukemassa merged commit 2c6abc4 into runatlantis:main Apr 25, 2024
24 checks passed
@lukemassa
Copy link
Contributor

/cherry-pick release-0.27

@jippi jippi deleted the fix-nilpointer branch April 25, 2024 13:38
@chenrui333 chenrui333 added this to the v0.28.0 milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants