Adopt vscode-common-python-lsp as a git submodule, synced via repository_dispatch, and stop Dependabot duplicates - #547
Conversation
…icates Adds .github/workflows/shared-package-release.yml to handle repository_dispatch (shared-package-release) events from vscode-common-python-lsp: it bumps the npm dep, recompiles the pip pin via uv, pushes a branch, and opens a tracking issue with a manual-PR link (org settings block auto-created PRs). Removes @vscode/common-python-lsp (npm) and vscode-common-python-lsp (pip) from Dependabot via the ignore lists so Dependabot no longer opens duplicate update PRs for the shared package. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the inline Python rewrite of requirements.in with a sed one-liner, keeping uv pip compile --generate-hashes --upgrade to regenerate the hash-locked requirements.txt (matching the command documented in requirements.in). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The dispatch workflow is a reasonable approach, but the dependency-pinning step needs to be made precise and verifiable before merge: scope the pip upgrade to the shared package and assert the pin actually changed. A few retry/idempotency and reproducibility hardening notes are also worth addressing. |
- Pin uv pip compile to the Python version documented in requirements.in (--python-version) so markers like exceptiongroup are not dropped - Scope the recompile with --upgrade-package so unrelated deps don't move - Assert the pip pin actually changed after sed; fail fast otherwise - Validate release_tag is present and version-shaped before any work - Add concurrency group, --force-with-lease, tracking-issue dedup, and tolerate Issues being disabled (surface compare URL via job summary) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thanks Rich Chiodo (@rchiodo) — addressed the feedback in the latest commit:
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The submodule-based sync approach is reasonable, but the new workflow has two integrity/safety issues worth fixing before merge: (1) the bare |
Consolidate the sync steps into a single script, add a retry wrapper for network operations, fail when the released tag is missing instead of silently falling back to main, and surface failures as workflow annotations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Point external/vscode-common-python-lsp at the v0.8.1 release and refresh package-lock.json to keep the branch npm ci-mergeable. Python (>=3.10) and Node (engines.node >=18.0.0) compatibility floors are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Overall this is a solid, well-guarded change. A couple of edge-case reliability notes on the sync workflow (unreachable warn-branch in the Node compat check, and a permanently-dropped tracking-issue notification on the branch-exists path) are worth addressing, plus two architectural notes about the |
Rich Chiodo (rchiodo)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
|
🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR. |
Add refs/tags/${VERSION} as a third tag candidate so a shared-package
release tagged as a bare 1.2.3 (not v1.2.3) is found regardless of
whether the dispatch payload was v-prefixed or bare.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
The old sed grabbed the first major.minor after requires-python regardless
of operator, so an upper-bound-only spec ("<3.14", "==3.11.*") was misread
as a floor and could spuriously fail a legitimate sync. Extract the quoted
requires-python value and read only a >=/~= lower bound, leaving the floor
empty (warn-and-skip) when none is present.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
The semver regex matches per line, so a multi-line release_tag (or a "+build" segment containing "..") could slip through and produce an invalid branch/ref name that fails later git operations loudly. Run git check-ref-format on the computed refs/heads/<branch> and hard-fail early if it is malformed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
Quote the title in the gh issue search so the bracketed "[Shared Package]" prefix is matched as a phrase instead of being tokenized (which could miss an existing issue and create a duplicate), and stop swallowing gh errors with 2>/dev/null/|| echo so a real lookup/create/comment failure surfaces instead of leaving the job green with no issue. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
Skip the build when dist/ is already present (avoids redundant rebuilds), and skip with guidance when the submodule's TypeScript toolchain is not installed instead of hard-failing. A dev-pruned install (npm ci --omit=dev, NODE_ENV=production, or a pruning VSIX packager) drops the shared package's typescript devDependency, which previously made the whole install fail at postinstall; build/packaging jobs run a full install and still produce dist/. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
The @vscode/common-python-lsp (now a file: dep, never bumped by Dependabot) and pip vscode-common-python-lsp (pin removed with the submodule move) ignore entries no longer guard anything. Annotate them as defensive no-ops so readers do not assume Dependabot would otherwise touch these. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
Review fixes applied (6 commits)Pushed 6 identical commits across all 5 consumer PRs (one per fix). The workflow/
Deferred (need human/CI judgement — left unresolved intentionally)Design/verification-level threads are not auto-fixed: lockfile drift from |
…ady exists Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
…compat gate Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
…issing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
Follow-up review fixes (3 more commits)Three additional identical commits address further review feedback:
Already addressed in the current workflow (earlier-round threads resolved)Several earlier comments referenced code that in-place hardening already fixed: the Still open for maintainer decision (not auto-changed)Lockfile drift from |
…ips under pipefail Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
…nstall Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
…dated
Use v${VERSION} in the tracking-issue title so re-dispatching the same release as 1.2.3 and �1.2.3 reuses one issue instead of creating a duplicate, and note in the issue body that the pushed branch must pass the normal PR checks before merging.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: edbe35d6-256c-40ad-9254-88df49980dba
Review follow-up completeAll review threads on this PR are now resolved. Latest round of identical fixes across all five consumer PRs:
Remaining review notes (lockfile |
|
GitHub cannot anchor PR review comments to unchanged lines in the diff. Falling back to a general PR comment for noxfile.py:L628. Installing the shared Python package with |
Rich Chiodo (rchiodo)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
Heejae Chang (heejaechang)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
Summary
Consumes the shared LSP package (
vscode-common-python-lsp) as a git submodule pinned to a release tag, instead of the published npm/PyPI packages, and keeps that submodule updated via arepository_dispatchevent fromvscode-common-python-lsprather than Dependabot.1. Git submodule
external/vscode-common-python-lsp(.gitmodules) pinned to a shared-package release tag.package.jsonsources it via"@vscode/common-python-lsp": "file:external/vscode-common-python-lsp/typescript";build/postinstall.jsbuilds the submodule's TS output on install (skips when already built or when the submodule toolchain is absent).noxfile.pyinstalls./external/vscode-common-python-lsp/pythoninto./bundled/libswith--no-deps --upgrade, so the bundled copy matches the pinned submodule commit.2. New
.github/workflows/shared-package-submodule-sync.ymlHandles the
shared-package-releaserepository_dispatch: branches offmain, advances the submodule pointer to the released tag, refreshes the npm lockfile, verifies the pinned tag and the Pythonrequires-pythonfloor, then pushes the branch and opens a tracking issue with a manual compare/PR link (org settings prevent the workflow from opening PRs automatically).3.
.github/dependabot.ymlMoves the shared package into the npm and pip
ignorelists so Dependabot no longer opens duplicate update PRs for it.