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

v0.21.0 broke web interface rendering #1022

Closed
four43 opened this issue Dec 20, 2024 · 10 comments
Closed

v0.21.0 broke web interface rendering #1022

four43 opened this issue Dec 20, 2024 · 10 comments
Labels

Comments

@four43
Copy link

four43 commented Dec 20, 2024

I use the docker image gospatial/tegola:v0.21.0 and the upgrade from 0.20.0 to 0.21.0 broke the web interface for me.

It's making a request to http://capabilities/mvt_world.json (missing the localhost:9090 I have as my basepath). This results in a totally broken map. My layers still show correctly but the rest of the interactive maps is broken.

@ARolek
Copy link
Member

ARolek commented Dec 20, 2024

@four43 I hit this same issues yesterday and I'm working on a fix. Thanks for the report. I should have a fix in soon.

ARolek added a commit that referenced this issue Dec 20, 2024
The hostName func is used to dynamically determine
the hostName value in various API endpoints. The previous
logic favored the Host value of request URL, but this value
is often not set (i.e. when not operating behind a proxy).
The default handling has been changed to return the
request Host value if the request URL Host is not set.

closes #1022
@ARolek ARolek moved this to In Review in Tegola Roadmap Dec 20, 2024
ARolek added a commit that referenced this issue Dec 20, 2024
The hostName func is used to dynamically determine
the hostName value in various API endpoints. The previous
logic favored the Host value of request URL, but this value
is often not set (i.e. when not operating behind a proxy).
The default handling has been changed to return the
request Host value if the request URL Host is not set.

closes #1022
@ARolek
Copy link
Member

ARolek commented Dec 20, 2024

@four43 I just sent in a PR to address this issue along with the outstanding ui vulns. Give it a test if you have a chance: #1023

@four43
Copy link
Author

four43 commented Dec 23, 2024

This was super easy since you provide a Dockerfile ❤️ - Gah the default build doesn't build quite right and the options aren't the same as on Docker hub:

$ docker run --rm gospatial/tegola:latest version  
   version: Version Not Set
       git: not set @ not set
build tags: !noAzblobCache !noGpkgProvider !noPostgisProvider !noPrometheusObserver !noRedisCache !noS3Cache !noViewer !pprof cgo
 ui viewer: viewer not built

I'm not a golang guy but I can roll my face around on the keyboard with the best of them. Gonna try and figure out what's what here...

Okay so tags in go configure what's built, got it. It looks like there's a flag to turn off the UI, but I have !noViewer which maybe the ! means "not" so "not no viewer" would mean yes viewer, but then ti says ui viewer: viewer not built which is a bummer.

I can pass whatever tags I want to go build --tags and they're not validated at all. That seems not great, go.


Debug journal of saddness/noobness:

When querying the index (or really, nothing, the just http://localhost:9090) all I get back is:

<!doctype html>
<meta name="viewport" content="width=device-width">
<pre>
<a href=".keep">.keep</a>
</pre>

.... odd. Looking into your PR to see why...

A query to /capabilities works. Though responding with an odd version string:

{
"version": "Version Not Set",
"maps": [
{
"name": "mvt_world",
"attribution": "",
"bounds": [
...

@ARolek
Copy link
Member

ARolek commented Dec 23, 2024

@four43 I haven't merged the PR into master yet. I will do that today, but you would need to pull down the branch and build the container yourself to test the PR. I will circle back once I merge into master. Btw, are you using a uri_prefix in the webserver config at all?

@four43
Copy link
Author

four43 commented Dec 23, 2024

No, pretty basic config. Just using the Docker image.

I was just struggling to build the image and to find it in your GitHub actions. I'm not terribly familiar with golang which is my main problem :)

@ARolek ARolek closed this as completed in 60841ec Dec 23, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in Tegola Roadmap Dec 23, 2024
@ARolek
Copy link
Member

ARolek commented Dec 23, 2024

@four43 You can test the unreleased docker container (but with what's in master) by pulling the edge tag: https://hub.docker.com/r/gospatial/tegola/tags

@four43
Copy link
Author

four43 commented Dec 23, 2024

How is that built? Is that in Github actions?

@ARolek
Copy link
Member

ARolek commented Dec 23, 2024

How is that built? Is that in Github actions?

Yes. Here's the action: https://github.com/go-spatial/tegola/actions/runs/12472282702/job/34810822636 The step is called "Publish docker edge container"

@four43
Copy link
Author

four43 commented Dec 24, 2024

Ah that's what I was missing. All those build args defaulted to not working for what I was trying to test.

ANYWAY

The important part was you got the fix! Thank you so much!

@ARolek
Copy link
Member

ARolek commented Dec 26, 2024

@four43 glad it's working for you! We have one more bug fix then I will cut a patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants