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

Revert "[core][tile mode] Make sure only a single tile is used" #492

Closed
wants to merge 4 commits into from

Conversation

acalcutt
Copy link
Collaborator

This reverts commit 9ceb619. for #479 .

If the tile returned is off center, this causes vector layers to be missing on the tiles that were not included

This reverts commit 9ceb619. for maplibre#479 .

If the tile returned is off center, this causes vector layers to be missing on the tiles that were not included
@acalcutt
Copy link
Collaborator Author

acalcutt commented Sep 19, 2022

I'm still unsure why the render test in my node workflow exit with code 1 after this change, if anyone has any idea. the render test seems to work as it did before with the same number of successes/errors. on linux the exist code is 0, but when i tested in macos it did seem to get an exit code of 1 like it does in the workflow.

@acalcutt
Copy link
Collaborator Author

acalcutt commented Sep 20, 2022

I did some testing on the mac and actually found it's this 'tile-avoid-edges' test that causes the exit code 1 to happen. If I exclude "render-tests/map-mode/tile-avoid-edges" the workflow completes.

It's strange though, the "actual" image generated by the "render-tests/map-mode/tile-avoid-edges" test now looks much more like the expected one...even though the test fails

actual.png
actual

expected.png
expected

On another note, even if I replaced expected.png with the generated actual.png, this test does not pass. (note the "echo $?" at the end shows the last exit code. if i run it with other test the exist code is 0)

MAC:maplibre-gl-native Administrator$ ./build/mbgl-render-test-runner --manifestPath metrics/macos-xcode11-release-style.json --filter "render-tests/map-mode/tile-avoid-edges"
2022-09-19 20:34:29.099 mbgl-render-test-runner[76422:862811] [WARNING] {}[ParseStyle]: The 'width' metadata field is ignored in tile map mode
2022-09-19 20:34:29.100 mbgl-render-test-runner[76422:862811] [WARNING] {}[ParseStyle]: The 'height' metadata field is ignored in tile map mode
2022-09-19 20:34:29.215 mbgl-render-test-runner[76422:862811] [INFO] {}[General]: GPU Identifier: Intel HD Graphics 4000 OpenGL Engine
* failed render-tests/map-mode/tile-avoid-edges
1 failed (100.0%)
Results at: /Users/Administrator/maplibre-gl-native/metrics/macos-xcode11-release-style.html
MAC:maplibre-gl-native Administrator$ echo $?
1

@birkskyum
Copy link
Member

I, for some reason, get a lot more errors when running the tests - and not just in this PR:

What commands did you run on the mac to build and run the tests? Those from node-ci, or those from DEVELOPING.md?

@birkskyum
Copy link
Member

birkskyum commented Sep 20, 2022

I run (from node-ci), on an M1 Arm mac

cmake . -B build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DMBGL_WITH_COVERAGE=ON

cmake --build build -j $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null)

./build/mbgl-render-test-runner --manifestPath metrics/macos-xcode11-release-style.json

@acalcutt
Copy link
Collaborator Author

acalcutt commented Sep 20, 2022

brew list cmake || brew install cmake
brew list ccache || brew install ccache
brew list ninja || brew install ninja
brew list pkg-config || brew install pkg-config
brew list glfw || brew install glfw
brew list libuv || brew install libuv

git clone --recurse-submodules https://github.com/maplibre/maplibre-gl-native.git
cd maplibre-gl-native
cmake . -B build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DMBGL_WITH_COVERAGE=ON
cmake --build build -j $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null)
./build/mbgl-render-test-runner --manifestPath metrics/macos-xcode11-release-style.json

Just a FYI, there were lots of render errors previous to this change, but they didn't cause a exit code of 1 that caused the workflow to fail.

ex, in main right now

1173 passed (89.4%)
14 passed but were ignored (1.1%)
78 ignored (5.9%)
31 failed (2.4%)
16 errored (1.2%)

@acalcutt
Copy link
Collaborator Author

acalcutt commented Sep 20, 2022

I made a few updates to what I remember running. I used the node workflow to get the commands too. One thing I notice is I chose "Release" build type. I wonder if Debug would give more info.

I have been testing the main change in this, removing the single tile restriction and it does for sure fix this issue it tileserver. This is really the one thing holding back a release of that.

I am a bit annoyed the test I used to troubleshoot this had to be disabled though. I tried a few things to update the test, like updating the image and manifest, but the test still failed (even though the image it makes looks good)

@birkskyum
Copy link
Member

birkskyum commented Sep 20, 2022

I noticed the two images you posted look identical but have much different file sizes. I wonder if there is a hint.

@acalcutt
Copy link
Collaborator Author

acalcutt commented Sep 20, 2022

I did notice the size difference. maybe something is ending prematurely and the image isn't quite complete? I tried to update the expected image so it matched but the test still fails.

The other thing I didn't really get was what the diff is showing. Almost like it is a comparing the image with the missing tiles.
diff

@birkskyum
Copy link
Member

The CI for ios is blocked until we merge this #494

@acalcutt
Copy link
Collaborator Author

acalcutt commented Sep 21, 2022

When I was looking through the commits for this, I noticed they had also updated the expected image and metrics in this commit. 8f8b7af . So it does seem the outcome of a single tile being displayed in tile mode was expected. We don't have that updated image in the maplibre-gl-js, so it is comparing against the original.

In tileserver-gl where I am having this issue, I decided to look again at creating a separate pool of renderers in static mode. I made this update which didn't require as many changes as I thought it would. maptiler/tileserver-gl#608

Now I am unsure if I could continue this PR or just fix it in tileserver. the original 9ceb619 says it was for "various symbol placement problems like, symbol duplications or cut-offs, memory/cpu overhead, so maybe I should just close this and rework the tileserver side.

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

Successfully merging this pull request may close these issues.

2 participants