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

No output in atlantis/post_workflow_hook due to websocket 500 internal invalid key error #3008

Closed
nitrocode opened this issue Jan 19, 2023 · 2 comments · Fixed by #3091
Closed
Labels
bug Something isn't working hook

Comments

@nitrocode
Copy link
Member

nitrocode commented Jan 19, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

No output in atlantis/post_workflow_run

This issue may also affect atlantis/pre_workflow_run

Reproduction Steps

  1. atlantis plan
  2. click details link of atlantis/post_workflow_run and see no output

Logs

Logs
{
  "level": "error",
  "ts": "2023-01-24T18:54:10.762Z",
  "caller": "logging/simple_logger.go:163",
  "msg": "invalid key: fb5f8646-125e-4dc8-afab-51f1a11ccda7",
  "json": {},
  "stacktrace": ""
}
github.com/runatlantis/atlantis/server/logging.(*StructuredLogger).Log
	github.com/runatlantis/atlantis/server/logging/simple_logger.go:163
github.com/runatlantis/atlantis/server/controllers.(*JobsController).respond
	github.com/runatlantis/atlantis/server/controllers/jobs_controller.go:92
github.com/runatlantis/atlantis/server/controllers.(*JobsController).getProjectJobsWS
	github.com/runatlantis/atlantis/server/controllers/jobs_controller.go:70
github.com/runatlantis/atlantis/server/controllers.(*JobsController).GetProjectJobsWS
	github.com/runatlantis/atlantis/server/controllers/jobs_controller.go:83
net/http.HandlerFunc.ServeHTTP
	net/http/server.go:2109
github.com/gorilla/mux.(*Router).ServeHTTP
	github.com/gorilla/[email protected]/mux.go:210
github.com/urfave/negroni/v3.Wrap.func1
	github.com/urfave/negroni/[email protected]/negroni.go:59
github.com/urfave/negroni/v3.HandlerFunc.ServeHTTP
	github.com/urfave/negroni/[email protected]/negroni.go:33
github.com/urfave/negroni/v3.middleware.ServeHTTP
	github.com/urfave/negroni/[email protected]/negroni.go:51
github.com/runatlantis/atlantis/server.(*RequestLogger).ServeHTTP
	github.com/runatlantis/atlantis/server/middleware.go:70
github.com/urfave/negroni/v3.middleware.ServeHTTP
	github.com/urfave/negroni/[email protected]/negroni.go:51
github.com/urfave/negroni/v3.(*Recovery).ServeHTTP
	github.com/urfave/negroni/[email protected]/recovery.go:210
github.com/urfave/negroni/v3.middleware.ServeHTTP
	github.com/urfave/negroni/[email protected]/negroni.go:51
github.com/urfave/negroni/v3.(*Negroni).ServeHTTP
	github.com/urfave/negroni/[email protected]/negroni.go:111
net/http.serverHandler.ServeHTTP
	net/http/server.go:2947
net/http.(*conn).serve
	net/http/server.go:1991

Environment details

  • Atlantis version: 0.22.3

Atlantis server-side config file:

repos:
  - id: /.*/
    apply_requirements:
      - mergeable
      - approved
    workflow: terraform
    post_workflow_hooks:
      - run: |
          echo "Post workflow run completed successfully"

Additional Context

Note that the other websocket URLs for plan and apply work as expected

@nitrocode nitrocode added the bug Something isn't working label Jan 19, 2023
@nitrocode nitrocode changed the title No output in atlantis/post_workflow_run No output in atlantis/post_workflow_hook Jan 24, 2023
@nitrocode nitrocode changed the title No output in atlantis/post_workflow_hook No output in atlantis/post_workflow_hook due to websocket 500 internal invalid key error Jan 24, 2023
@nitrocode nitrocode added the hook label Jan 25, 2023
@gtirloni
Copy link
Contributor

gtirloni commented Feb 3, 2023

Not only in pre/post workflow hook but also in any plan steps.

{"level":"error","ts":"2023-02-03T13:42:00.455Z","caller":"logging/simple_logger.go:163","msg":"invalid key: e3e75639-5ece-4dde-affe-1f036caceb04","json":{},"stacktrace":"github.com/runatlantis/atlantis/server/logging.(*StructuredLogger).Log\n\tgithub.com/runatlantis/atlantis/server/logging/simple_logger.go:163\ngithub.com/runatlantis/atlantis/server/controllers.(*JobsController).respond\n\tgithub.com/runatlantis/atlantis/server/controllers/jobs_controller.go:92\ngithub.com/runatlantis/atlantis/server/controllers.(*JobsController).getProjectJobsWS\n\tgithub.com/runatlantis/atlantis/server/controllers/jobs_controller.go:70\ngithub.com/runatlantis/atlantis/server/controllers.(*JobsController).GetProjectJobsWS\n\tgithub.com/runatlantis/atlantis/server/controllers/jobs_controller.go:83\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2109\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\tgithub.com/gorilla/[email protected]/mux.go:210\ngithub.com/urfave/negroni/v3.Wrap.func1\n\tgithub.com/urfave/negroni/[email protected]/negroni.go:59\ngithub.com/urfave/negroni/v3.HandlerFunc.ServeHTTP\n\tgithub.com/urfave/negroni/[email protected]/negroni.go:33\ngithub.com/urfave/negroni/v3.middleware.ServeHTTP\n\tgithub.com/urfave/negroni/[email protected]/negroni.go:51\ngithub.com/runatlantis/atlantis/server.(*RequestLogger).ServeHTTP\n\tgithub.com/runatlantis/atlantis/server/middleware.go:70\ngithub.com/urfave/negroni/v3.middleware.ServeHTTP\n\tgithub.com/urfave/negroni/[email protected]/negroni.go:51\ngithub.com/urfave/negroni/v3.(*Recovery).ServeHTTP\n\tgithub.com/urfave/negroni/[email protected]/recovery.go:210\ngithub.com/urfave/negroni/v3.middleware.ServeHTTP\n\tgithub.com/urfave/negroni/[email protected]/negroni.go:51\ngithub.com/urfave/negroni/v3.(*Negroni).ServeHTTP\n\tgithub.com/urfave/negroni/[email protected]/negroni.go:111\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2947\nnet/http.(*conn).serve\n\tnet/http/server.go:1991"}

This is a regression (at least compared to 0.20.1 where this used to work).

@nitrocode
Copy link
Member Author

I can see my plan execute in the details links.

Could you share your configuration workflow and what you saw in 0.20.1 vs what you see in the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hook
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants