Skip to content

Fix/24875 empty source url - #52

Closed
watmildon wants to merge 4 commits into
JOSM:masterfrom
watmildon:fix/24875-empty-source-url
Closed

watmildon wants to merge 4 commits into
JOSM:masterfrom
watmildon:fix/24875-empty-source-url

Conversation

@watmildon

Copy link
Copy Markdown
Contributor

Properly consume the new STAC feed from Overture.

We crawl through their endpoint to get the latest and then find the themes.

@stoecker

stoecker commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Fails to build. Is that a workflow problem or a problem in your code?

@watmildon

Copy link
Copy Markdown
Contributor Author

It looks like this needs to be updated to a newer ant https://github.com/JOSM/JOSMPluginAction/blob/c50cad09202cc1bf610bf73a6f49ab211e935e66/.github/workflows/ant.yml#L38. Or I could override it here.

(maybe roll to apache-ant-1.10.18?)

@watmildon

Copy link
Copy Markdown
Contributor Author

I pushed an override just to see if that gets CI sorted out. I can pull it back out of course.

@stoecker

stoecker commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

The override should no longer be necessary. Please remove it.

@tsmock

tsmock commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator
[INFO] Building jar: /home/runner/work/MapWithAI/MapWithAI/josm/plugins/MapWithAI/target/MapWithAI-1.0-SNAPSHOT-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  39.117 s
[INFO] Finished at: 2026-10-06T19:10:13Z
[INFO] ------------------------------------------------------------------------
+ mv 'target/mapwithai-*-sources.jar' ../../dist/mapwithai-sources.jar
mv: cannot stat 'target/mapwithai-*-sources.jar': No such file or directory

Looks like the workflow is failing due to looking for mapwithai-*-sources instead of MapWithAI-*-sources.

EDIT: That was probably deliberate; mapwithai is what the jar should be named due to case sensitive filesystems.

@watmildon

Copy link
Copy Markdown
Contributor Author

There are a few ordering issues in the tests (these also fail on an unmodified branch). LMK if you'd like me to sort through those in a separate PR.

@tsmock
tsmock force-pushed the fix/24875-empty-source-url branch from c0fb585 to abe7e68 Compare October 7, 2026 00:05
@tsmock

tsmock commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

There are a few ordering issues in the tests (these also fail on an unmodified branch). LMK if you'd like me to sort through those in a separate PR.

Got the tests "fixed". One that was consistently failing was probably due to another test, but syncing threads fixed it.

…catalog

The default source list currently fails to load at all: the overture catalog
referenced from sources.json returns 403, and that IOException discarded every
default source. The preferences then only show the "Loading" placeholder row,
which has an empty URL but still counted as valid, so enabling it stored it as
a source and every download failed with
"MalformedURLException: no protocol:".

* A blank URL is no longer a valid URL (MapWithAIInfo#hasValidUrl)
* MapWithAILayerInfo#add ignores sources without a URL; this also drops
  already-stored broken entries on load
* The placeholder row can no longer be enabled/activated
* Downloads skip sources without a URL instead of throwing
* A failing overture catalog only drops the overture sources
The pmtiles catalog used for the overture sources no longer exists (403).
Overture now publishes releases at https://stac.overturemaps.org/catalog.json
and tiles at
https://overturemaps-extras-us-west-2.s3.us-west-2.amazonaws.com/tiles/<release>/<theme>.pmtiles

When the source URL points at the STAC catalog, create the sources for the
latest release. Only the last few releases are kept, so these sources have an
id without the release in it; user entries then follow new releases instead
of being dropped.

The old catalog format is still supported. sources.json (pages branch) needs
to point at the STAC catalog for this to take effect.
…a hardcoded bucket

The theme catalogs link to the tiles ("rel": "pmtiles", currently on
tiles.overturemaps.org), so follow root -> latest release -> theme and use
that link. Themes without a tiles link are skipped with a warning. This costs
one small (cached) request per theme, but means the plugin follows Overture
if the tiles move again.
The shared workflow defaults to apache-ant-1.10.15, which is no longer on
downloads.apache.org, so setup-ant fails before anything is built.
@tsmock
tsmock force-pushed the fix/24875-empty-source-url branch from abe7e68 to 59cdebe Compare October 7, 2026 20:47
@tsmock

tsmock commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

In v850. Minus the ant bit.

@tsmock tsmock closed this Oct 7, 2026
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.

3 participants