Repository navigation
chore(deps): bump impit from 0.14.1 to 0.14.2 - #110
Merged
Merged
Conversation
Bumps [impit](https://github.com/apify/impit) from 0.14.1 to 0.14.2. - [Release notes](https://github.com/apify/impit/releases) - [Commits](apify/impit@js-0.14.1...js-0.14.2) --- updated-dependencies: - dependency-name: impit dependency-version: 0.14.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Medformatik
added a commit
that referenced
this pull request
Oct 28, 2026
…ge as such (#657) ## What changed and why On openmapx.com, Overpass rejects a query string repeated within about 30 seconds (diagnosed read-only on the host, not by me): - **Cause:** the `wiktorn/overpass-api` image sets `OVERPASS_ALLOW_DUPLICATE_QUERIES=no`. Its dispatcher then answers a query string that is running, or ran moments ago, with `runtime error: open64: 0 Success /osm3s_osm_base Dispatcher_Client::request_read_and_idx::duplicate_query`. That answer is an HTML page with **HTTP 200**. - **Health:** our Docker healthcheck and `check`'s probe send the same `node(1)` string every time. The healthcheck failed 3 of its last 4 runs; the container only stays "healthy" because of `retries: 3`. This is the intermittent `check` failure, `response missing "elements"`. - **Users:** `packages/core/src/utils/overpass/client.ts` called `res.json()` on that 200 HTML page. A user's query repeated within the window failed with a `SyntaxError`. **1. The bundled service allows repeated queries.** `services/overpass/service.json` sets `"OVERPASS_ALLOW_DUPLICATE_QUERIES": "${OVERPASS_ALLOW_DUPLICATE_QUERIES:-yes}"`. - **Private instance:** only app-api, which bounds its requests, and the OpenConditions ingest reach it. - **Both dispatchers take it:** I checked the pinned image (`sha256:9bb5f4a9…`) locally. The main dispatcher's `/app/bin/dispatcher_start.sh` passes `--allow-duplicate-queries=${OVERPASS_ALLOW_DUPLICATE_QUERIES}`. `dispatcher_areas` in `/etc/supervisor/conf.d/supervisord.conf` runs `dispatcher --areas … --allow-duplicate-queries=%(ENV_OVERPASS_ALLOW_DUPLICATE_QUERIES)s`. The image's own `ENV` is `no`. - **Why the image's healthcheck works and ours didn't:** the image's `docker-healthcheck.sh` queries a random node id when duplicates aren't allowed. Ours is a fixed string, and works with them allowed. - **Opting out:** set `OVERPASS_ALLOW_DUPLICATE_QUERIES=no` in `infra/docker/.env`. It's documented in `infra/docker/.env.example` and `install/configuration.md`. - **Wrong comment fixed:** the comment over the probe in `packages/cli/src/commands/check.ts` blamed an orphaned shared-memory segment after a timeout-less query. It now names the real cause. - **Nothing to regenerate:** `check-service-files` reports "21 service files: the bundle list and their history are current". The history covers service files, not manifests, and no other generated file mirrors Overpass's environment. **2. The client never surfaces Overpass's error page as a `SyntaxError`.** It reads a 200 body as text and parses it as JSON. A body that isn't JSON is checked for Overpass's error page: each `<strong>Error</strong>: …` paragraph's text, with tags dropped (repeatedly, until none is left, so nested tags can't leave one) and entities decoded. A numeric entity is decoded only when it's a valid code point (up to `0x10FFFF`); any other, such as `�`, stays as written instead of throwing a `RangeError`. That text is then classified as follows, matching how statuses and remarks are already handled: | Error page says | Error | Like | | --- | --- | --- | | a dispatcher or runtime error: `duplicate_query`, `Dispatcher_Client`, `runtime error` | `OverpassUnavailableError`, with Overpass's text in its message and `detail` | 504 / 408 / a timeout without an answer | | `timed out`, `out of memory` | `OverpassTimeoutError` | the runtime-limit remark | | `rate_limited` | `OverpassRateLimitError` | 429 | | anything else (a parse error, say) | `Error("Overpass API error: <text>")` | other failures | | a body that is neither JSON nor such a page | `Error("Overpass API answered with a body that is neither JSON nor an error page")` | | Because the error is `OverpassUnavailableError`, a query to the default public endpoint falls back to the public mirror, as for a 504. A configured local instance (`OVERPASS_URL`, as here) gets no fallback, as before. **3. Release note** (`release-notes/overpass-duplicate-queries.md`, `operator-action`): the setting is in Overpass's container environment, so a render alone doesn't apply it. Recreate it once on the host with `pnpm openmapx services update overpass --no-deps`; its database persists and the dispatchers restart. ## Verification - **Tests, `packages/core/src/utils/overpass/client.test.ts`**, with an error page in the shape osm3s writes, carrying the exact `duplicate_query` text from openmapx.com: - **Repeated query:** it's an `OverpassUnavailableError` whose message carries that text, never a `SyntaxError`. - **Public endpoint:** the same page tries the public mirror, as a 504 does. - **Timeouts and rate limits:** a `Query timed out` page is an `OverpassTimeoutError`, and a dispatcher `rate_limited` page an `OverpassRateLimitError`. - **Other pages:** a parse error keeps its decoded text (`"nod"` becomes `"nod"`), and a non-JSON, non-page body says so. - **Nested tags:** `<b<i>>dis</i>patcher</b>` comes out as `dispatcher`. - **Numeric entities:** `n` decodes and `` (the last code point) decodes, while `�` and `�` stay as written; never a `RangeError`. Run against the previous code, this test fails with `RangeError: Invalid code point 99999999`. - **Updated:** `integrations/transit-overpass/overpass.test.ts` faked `fetch` with an object that had only `json()`. The client now reads the body with `text()`, so that test answers with a real `Response`. - **Ran locally:** - the full node project (`vitest run --project node`): 18268 passed, 265 skipped, none failed; - `vitest --project node` over `packages/core`, `packages/cli`, `integrations/poi-search`, `apps/api/src/routes` and the authority-gate script tests: 5364 passed and 20 skipped, with the Overpass client tests now at 16 passed (with poi-search: 92); - `tsc --noEmit` for core and cli, and `biome check`; - `prettier --check` on the docs and the release note; - `check-service-files`; - the extension-cli `dist/cli.js` is byte-identical to `origin/main`'s. - **Not run:** Overpass itself. I didn't start the image with a database, so I haven't seen the dispatcher accept a repeated query with the setting, nor a recreate on a host. The flag's effect is as the image's scripts above show. I didn't touch the production host. ## Release and upgrade impact Product impact: operator-action No package release: `@openmapx/extension-cli`'s built `dist/cli.js` is byte-identical on `origin/main` and on this branch; the core change doesn't reach its artifact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps impit from 0.14.1 to 0.14.2.
Release notes
Sourced from impit's releases.
... (truncated)
Commits
372d4a5chore(js-release): Update package version [skip ci]f52afa7fix(node): encode string chunks when serializing stream bodies (#487)ef7f4e9docs: update changelog [skip ci]4599228chore(py-release): bumppyproject.tomlversion [skip ci]163dc64chore: bump pyo3 to 0.29.0 (#485)9678630chore(deps): update actions/checkout action to v7 (#484)42f163bfix(python): raise on mid-stream body errors instead of silent EOF (#482)25cf5cbchore(deps): bump js-yaml and markdown-it to resolve security alerts (#483)195a7a1fix(python): share browser-string resolution across sync and async clients (#...c1d8c10chore(deps): update dependency proxy-chain to v3 (#460)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)