Skip to content

fix: Error out on undetermined project version - #213

Merged
chrapkowski-sg merged 21 commits into
sourcegraph:scipfrom
jelmer:fix-undefined-project-version
Nov 2, 2026
Merged

chrapkowski-sg merged 21 commits into
sourcegraph:scipfrom
jelmer:fix-undefined-project-version

Conversation

@jelmer

@jelmer jelmer commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Indexing crashed with TypeError: Cannot read properties of undefined (reading 'indexOf') when project-version inference was exhausted. This can happen with PEP 621 dynamic = ["version"] when neither metadata nor Git provides a version.

Throw a dedicated error before constructing symbols and tell the caller to pass --project-version.

The guard checks specifically for undefined, preserving the supported empty-version sentinel. It does not change the existing metadata/Git inference precedence.

Verification

  • Added a real CLI regression: missing version exits with actionable advice instead of a TypeError; explicit empty and nonempty versions produce valid indexes.
  • Production and development builds, all 21 snapshot tests, all 7 SCIP Jest tests, and package formatting passed locally on Linux with Node 24.4.1 and Python 3.10.22.
  • Native Windows/macOS execution was not performed locally. GitHub checks should be assessed separately from these local results.

jelmer and others added 21 commits June 8, 2026 11:38
Indexing crashed with "TypeError: Cannot read properties of undefined
(reading 'indexOf')" on projects that declare their version dynamically
(PEP 621 dynamic = ["version"]) when it could not be inferred. The
project version stayed undefined and normalizeNameOrVersion dereferenced
it.

Throw a dedicated error instead, so indexing fails up front with a hint
to pass --project-version rather than baking a bogus version into every
symbol or crashing downstream.
…ra CAs (sourcegraph#233)

The pinned base (Alpine 3.18, Node 16, pip 23.2.1, certifi 2023.07.22)
still trusts the compromised eMudhra intermediates (INC-541) in curl,
wget, git, Node, pip and certifi, and Node 16 / Alpine 3.18 / Python 3.10
images no longer receive updates.

Move to python3.11-nodejs24-alpine (Alpine 3.24, Node 24.22.1,
pip 26.2.2, certifi 2026.10.19) and require ca-certificates
20261020-r0, which the base does not ship yet.

Amp-Thread-ID: https://ampcode.com/threads/T-01a16041-ef1e-774a-957e-9f7122a62a0e

Co-authored-by: Amp <amp@ampcode.com>
…ourcegraph#235)

The release job has no NPM_TOKEN secret, so npm publish fails with
ENEEDAUTH and the Docker image is never pushed. Publish with npm
trusted publishing (OIDC) like scip-typescript (#511, #514). Node 24
ships npm 11, which trusted publishing requires.

Amp-Thread-ID: https://ampcode.com/threads/T-01a16041-ef1e-774a-957e-9f7122a62a0e

Co-authored-by: Amp <amp@ampcode.com>
…ourcegraph#236)

* fix(autoindex): install scip-python from the release checkout, not npm

npm now holds newly published versions for malware scanning (about
five minutes), so the v0.6.7 release built its image with 0.6.6 from
the registry. Pack the package in the workflow and install that
tarball in Dockerfile.autoindex instead.

build-push-action defaults to a Git context, which does not contain
the untracked tarball, so build from the workspace with context: .

Amp-Thread-ID: https://ampcode.com/threads/T-01a16041-ef1e-774a-957e-9f7122a62a0e
Co-authored-by: Amp <amp@ampcode.com>

* chore: Prepare for v0.6.8 release

Amp-Thread-ID: https://ampcode.com/threads/T-01a16041-ef1e-774a-957e-9f7122a62a0e
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
… docker digest to f5f3688 (sourcegraph#237)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…aph#205)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…h#206)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency jdx/mise to v2026

* chore(deps): update Python to an attested 3.10 build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@chrapkowski-sg
chrapkowski-sg merged commit 06d728d into sourcegraph:scip Nov 2, 2026
4 checks passed
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