Modify

Opened 2 years ago

Closed 2 years ago

#21850 closed defect (fixed)

WMS and WMTS don't support {apikey}

Reported by: stoecker Owned by: taylor.smock
Priority: normal Milestone: 22.02
Component: Core imagery Version:
Keywords: Cc:

Description

To update the mapkey support in JOSM WMS and WMTS must also support the {apikey} placeholder.

Attachments (1)

21850.patch (4.8 KB ) - added by taylor.smock 2 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 by stoecker, 2 years ago

Milestone: 22.0222.03

Milestone renamed

comment:2 by stoecker, 2 years ago

Milestone: 22.0322.02

Join milestones

comment:3 by taylor.smock, 2 years ago

Owner: changed from team to taylor.smock
Status: newassigned

by taylor.smock, 2 years ago

Attachment: 21850.patch added

comment:4 by taylor.smock, 2 years ago

I've tested it with Lantmäteriet Historic Orthophoto 1975 (WMS) and Lantmäteriet Topographic Map (WMTS).

I'm checking error handling now, and then I'll be writing tests -- I don't know how critical this is -- it looks like we've replaced the api keys for those two already, so I'll probably apply it as soon as I see how it handles errors.

comment:5 by taylor.smock, 2 years ago

Resolution: fixed
Status: assignedclosed

In 18371/josm:

fix #21850: WMS and WMTS don't support {apikey}

This adds {apikey} as a valid template for WMS and WMTS.

in reply to:  4 ; comment:6 by stoecker, 2 years ago

Replying to taylor.smock:

it looks like we've replaced the api keys for those two already, so I'll probably apply it as soon as I see how it handles errors.

I reverted (removed) these changes. So currently no active entries exist.

comment:7 by taylor.smock, 2 years ago

In 18372/josm:

see #21850: WMS and WMTS don't support {apikey}

Add tests for r18371.

in reply to:  6 comment:8 by taylor.smock, 2 years ago

Replying to stoecker:

I reverted (removed) these changes. So currently no active entries exist.

We'll be able to re-apply those in a few months. Or as soon as most of the users migrate to the next tested version, anyway.

comment:9 by stoecker, 2 years ago

Resolution: fixed
Status: closedreopened

It's seems this solution has a big drawback. Hundreds of calls. The function to get the API-Key should only be called once and only if the pattern is found. Probably copy the replace code from TiledWMS class?

I got 13385 calls for "Mapa-Educativo-wms" in a few minutes and this entry doesn't even have an API key.

Last edited 2 years ago by stoecker (previous) (diff)

in reply to:  9 comment:10 by taylor.smock, 2 years ago

Replying to stoecker:

It's seems this solution has a big drawback. Hundreds of calls. The function to get the API-Key should only be called once and only if the pattern is found. Probably copy the replace code from TiledWMS class?

Ouch. I'll look into it.

Last edited 2 years ago by taylor.smock (previous) (diff)

comment:11 by stoecker, 2 years ago

No problem. The server can handle it without additional costs, as long as it does not exceed 1GBit/s ;-)

comment:12 by taylor.smock, 2 years ago

In 18378/josm:

see #21850: Fix calls to JOSM server where not apikey is needed

in reply to:  9 ; comment:13 by taylor.smock, 2 years ago

Replying to stoecker:

I got 13385 calls for "Mapa-Educativo-wms" in a few minutes and this entry doesn't even have an API key.

I presume this is for the imagery integration test. That seems like a lot anyway. Are we hammering other people's servers during testing? I should probably look into running the integration tests with a network monitor set up.

in reply to:  13 comment:14 by stoecker, 2 years ago

Replying to taylor.smock:

Replying to stoecker:

I got 13385 calls for "Mapa-Educativo-wms" in a few minutes and this entry doesn't even have an API key.

I presume this is for the imagery integration test.

Some Google service (xxx.googleusercontent.com), so probably not the integration test.

That seems like a lot anyway.

I'd say probably one call per map tile?

Are we hammering other people's servers during testing? I should probably look into running the integration tests with a network monitor set up.

Depends. Yes and no. The map integration tests do a lot network I/O, but for each related services that's minimal. Also that's the reason why these test are run relatively seldom.

Also that's one of the reasons why JOSM server acts as cache for remote data (e.g. geofabrik-index-v1-nogeom.json), so we don't hammer other servers.

But surely it's relatively easy to do harm with network I/O.

comment:15 by stoecker, 2 years ago

Resolution: fixed
Status: reopenedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain taylor.smock.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.