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

[GithubAppController] Can't evaluate field CleanedBasePath in type templates.GithubSetupData #2141

Closed
santelos opened this issue Mar 14, 2022 · 3 comments · Fixed by #2142
Closed
Labels
bug Something isn't working

Comments

@santelos
Copy link
Contributor

santelos commented Mar 14, 2022

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

Could not open Github App setup page during initial setup using Docker.

Reproduction Steps

Steps are executed in localhost network

  1. Pull the latest image of Atlantis Docker: https://github.com/runatlantis/atlantis/pkgs/container/atlantis
  2. Follow the https://www.runatlantis.io/docs/access-credentials.html#github-app
  3. Create the container with docker run -p 4141:4141 ghcr.io/runatlantis/atlantis server --gh-user fake --gh-token fake --repo-allowlist 'github.com/*org*/*repo*' --atlantis-url http://localhost:4141
  4. Go to http://localhost:4141/github-app/setup
  5. The server-side rendered HTML is broken and the page is blank

Logs

{"level":"error","ts":"2022-03-13T15:44:03.306Z","caller":"controllers/github_app_controller.go:146","msg":"template: github-app.html.tmpl:10:34: executing \"github-app.html.tmpl\" at <.CleanedBasePath>: can't evaluate field CleanedBasePath in type templates.GithubSetupData","json":{},"stacktrace":"github.com/runatlantis/atlantis/server/controllers.(*GithubAppController).New\n\tgit.luolix.top/runatlantis/atlantis/server/controllers/github_app_controller.go:146\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2047\ngit.luolix.top/gorilla/mux.(*Router).ServeHTTP\n\tgit.luolix.top/gorilla/mux@v1.8.0/mux.go:210\ngit.luolix.top/urfave/negroni.Wrap.func1\n\tgit.luolix.top/urfave/negroni@v1.0.0/negroni.go:46\ngit.luolix.top/urfave/negroni.HandlerFunc.ServeHTTP\n\tgit.luolix.top/urfave/negroni@v1.0.0/negroni.go:29\ngit.luolix.top/urfave/negroni.middleware.ServeHTTP\n\tgit.luolix.top/urfave/negroni@v1.0.0/negroni.go:38\ngit.luolix.top/runatlantis/atlantis/server.(*RequestLogger).ServeHTTP\n\tgit.luolix.top/runatlantis/atlantis/server/middleware.go:68\ngit.luolix.top/urfave/negroni.middleware.ServeHTTP\n\tgit.luolix.top/urfave/negroni@v1.0.0/negroni.go:38\ngit.luolix.top/urfave/negroni.(*Recovery).ServeHTTP\n\tgit.luolix.top/urfave/negroni@v1.0.0/recovery.go:193\ngit.luolix.top/urfave/negroni.middleware.ServeHTTP\n\tgit.luolix.top/urfave/negroni@v1.0.0/negroni.go:38\ngit.luolix.top/urfave/negroni.(*Negroni).ServeHTTP\n\tgit.luolix.top/urfave/negroni@v1.0.0/negroni.go:96\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2879\nnet/http.(*conn).serve\n\tnet/http/server.go:1930"}

Environment details

  • Docker setup
  • Localhost
  • atlantis version ->atlantis 0.19.2

Additional Context

From my vision the issue is:

@dgokcin
Copy link

dgokcin commented Apr 2, 2022

any updates on a fix?

@neerfri
Copy link

neerfri commented Apr 15, 2022

Until this PR is merged, another work-around is to deploy version v0.18.2, setup the github app, then update to latest

@jamengual
Copy link
Contributor

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

Successfully merging a pull request may close this issue.

4 participants