-
Notifications
You must be signed in to change notification settings - Fork 34
Adopt vscode-common-python-lsp as a git submodule, synced via repository_dispatch, and stop Dependabot duplicates #547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Eduardo Villalpando Mello (edvilme)
merged 25 commits into
main
from
shared-package-sync
Jul 22, 2026
Merged
Changes from 4 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5af883d
Add shared package release dispatch workflow and stop Dependabot dupl…
edvilme 6c8d828
Use sed + uv pip compile for the pip dependency update
edvilme 5ed122e
Harden shared package release workflow from review feedback
edvilme 6f89692
Experiment: integrate shared package as a git submodule (#548)
edvilme adac6da
Simplify and harden shared package submodule sync workflow
edvilme abb9d2f
Address review feedback on submodule sync and install
edvilme 265ac1d
Harden submodule sync workflow and clean dependency metadata
edvilme 77cd50c
Verify extension/shared-package Python floors in submodule sync
edvilme 5df2f6f
Split submodule sync into discrete, readable steps
edvilme bc2f1ce
Document submodule initialization in the README
edvilme b47dff7
Verify extension/shared-package Node versions in submodule sync
edvilme 8966f46
Harden shared-package submodule sync workflow
edvilme 478041e
Update shared package submodule to v0.8.1
edvilme 7541d64
Probe bare release tags symmetrically in submodule sync
edvilme 85bfbe5
Parse only a >=/~= lower bound from requires-python
edvilme f3de76d
Validate the computed branch ref before emitting it
edvilme 2f51bb7
Harden tracking-issue lookup in submodule sync
edvilme fd914ac
Guard shared-package postinstall build
edvilme d2cad3a
Document dead shared-package Dependabot ignores as no-ops
edvilme 8b314f1
Fix 7: re-notify maintainers on re-dispatch when the sync branch alre…
edvilme d0bb0ba
Fix 8: resolve symbolic minimumPythonVersion constants in the Python …
edvilme 272b876
Fix 9: fail fast with guidance when the shared-package submodule is m…
edvilme 2516b49
Harden Node/Python floor parsing so an unparseable floor warns and sk…
edvilme e98818c
Clarify that non-recursive clones fail at file: resolution, not posti…
edvilme c1225f0
Make the tracking-issue title canonical and flag the branch as unvali…
edvilme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| name: Shared Package Submodule Sync | ||
|
|
||
| on: | ||
| repository_dispatch: | ||
| types: [shared-package-release] | ||
|
edvilme marked this conversation as resolved.
|
||
|
|
||
| permissions: | ||
| contents: write | ||
| issues: write | ||
|
|
||
| concurrency: | ||
| group: 'shared-package-submodule-${{ github.event.client_payload.release_tag }}' | ||
| cancel-in-progress: false | ||
|
|
||
| env: | ||
| SUBMODULE_PATH: external/vscode-common-python-lsp | ||
|
|
||
|
edvilme marked this conversation as resolved.
|
||
| jobs: | ||
| update-submodule: | ||
| name: Update shared package submodule | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Validate dispatch payload | ||
| env: | ||
| RELEASE_TAG: ${{ github.event.client_payload.release_tag }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [ -z "${RELEASE_TAG}" ]; then | ||
| echo 'release_tag is missing from the dispatch payload.' >&2 | ||
| exit 1 | ||
| fi | ||
| if ! printf '%s' "${RELEASE_TAG}" | grep -Eq '^v?[0-9A-Za-z][0-9A-Za-z.+-]*$'; then | ||
| echo "release_tag '${RELEASE_TAG}' is not a valid version/ref." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Create branch for this release | ||
|
edvilme marked this conversation as resolved.
Outdated
|
||
| env: | ||
| RELEASE_TAG: ${{ github.event.client_payload.release_tag }} | ||
| run: | | ||
| set -euo pipefail | ||
| BRANCH="shared-package-v${RELEASE_TAG#v}" | ||
| git fetch origin main | ||
| # Fetch any pre-existing remote branch so --force-with-lease has a ref. | ||
| git fetch origin "+refs/heads/${BRANCH}:refs/remotes/origin/${BRANCH}" 2>/dev/null || true | ||
| git checkout -B "$BRANCH" origin/main | ||
|
edvilme marked this conversation as resolved.
Outdated
|
||
| # Re-sync the submodule to whatever the freshly checked-out main records. | ||
|
edvilme marked this conversation as resolved.
Outdated
|
||
| git submodule update --init --recursive "${SUBMODULE_PATH}" | ||
|
|
||
| - name: Move submodule to the released commit | ||
| env: | ||
|
edvilme marked this conversation as resolved.
Outdated
|
||
| RELEASE_TAG: ${{ github.event.client_payload.release_tag }} | ||
| run: | | ||
|
edvilme marked this conversation as resolved.
Outdated
|
||
| set -euo pipefail | ||
| cd "${SUBMODULE_PATH}" | ||
| git fetch --tags --force origin | ||
| STRIPPED="${RELEASE_TAG#v}" | ||
| if git rev-parse -q --verify "refs/tags/${RELEASE_TAG}^{commit}" >/dev/null; then | ||
| TARGET="refs/tags/${RELEASE_TAG}" | ||
| elif git rev-parse -q --verify "refs/tags/v${STRIPPED}^{commit}" >/dev/null; then | ||
| TARGET="refs/tags/v${STRIPPED}" | ||
| else | ||
| echo "Release tag '${RELEASE_TAG}' not found upstream; falling back to origin/main." >&2 | ||
| git fetch origin main | ||
| TARGET="origin/main" | ||
| fi | ||
|
edvilme marked this conversation as resolved.
|
||
| echo "Checking out submodule at ${TARGET}." | ||
| git checkout --detach "${TARGET}" | ||
|
|
||
|
edvilme marked this conversation as resolved.
edvilme marked this conversation as resolved.
|
||
| - name: Push branch and open tracking issue if changed | ||
| env: | ||
| RELEASE_TAG: ${{ github.event.client_payload.release_tag }} | ||
|
edvilme marked this conversation as resolved.
Outdated
|
||
| RELEASE_URL: ${{ github.event.client_payload.release_url }} | ||
| REPO: ${{ github.repository }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| git config user.name 'github-actions[bot]' | ||
| git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
| # Only the submodule gitlink should have moved. | ||
| if git diff --quiet -- "${SUBMODULE_PATH}"; then | ||
| echo 'Submodule already at the released commit; nothing to do.' | ||
| exit 0 | ||
| fi | ||
| BRANCH="shared-package-v${RELEASE_TAG#v}" | ||
| git add "${SUBMODULE_PATH}" | ||
| git commit -m "Update shared package submodule to ${RELEASE_TAG}" | ||
| git push --force-with-lease --set-upstream origin "$BRANCH" | ||
| COMPARE_URL="https://github.com/${REPO}/compare/main...${BRANCH}?expand=1" | ||
|
edvilme marked this conversation as resolved.
|
||
| TITLE="[Shared Package] Open PR to update submodule to ${RELEASE_TAG}" | ||
| { | ||
| echo "### Shared package submodule update ready" | ||
| echo '' | ||
| echo "Branch \`${BRANCH}\` has been pushed." | ||
| echo '' | ||
| echo "[Open the pull request](${COMPARE_URL})" | ||
| echo '' | ||
| echo "Source release: ${RELEASE_URL}" | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
| BODY_FILE="$(mktemp)" | ||
| cat > "$BODY_FILE" <<EOF | ||
| Branch \`${BRANCH}\` has been pushed, moving the \`${SUBMODULE_PATH}\` submodule to ${RELEASE_TAG}. | ||
|
|
||
| Organization settings prevent this workflow from opening pull requests automatically. Please open the PR manually: | ||
|
|
||
| ${COMPARE_URL} | ||
|
|
||
| Source release: ${RELEASE_URL} | ||
| EOF | ||
| # Reuse an existing open tracking issue for this release if present. | ||
| EXISTING="$(gh issue list --repo "$REPO" --state open --search "in:title ${TITLE}" --json number,title --jq "map(select(.title == \"${TITLE}\")) | .[0].number // empty" 2>/dev/null || true)" | ||
| if [ -n "${EXISTING}" ]; then | ||
| echo "Reusing existing tracking issue #${EXISTING}." | ||
| gh issue comment "${EXISTING}" --repo "$REPO" --body-file "$BODY_FILE" \ | ||
| || echo 'Could not comment on issue; compare URL is in the job summary.' | ||
| else | ||
| gh issue create --repo "$REPO" --title "${TITLE}" --body-file "$BODY_FILE" \ | ||
| || echo 'Could not create issue (Issues may be disabled); compare URL is in the job summary.' | ||
| fi | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule "external/vscode-common-python-lsp"] | ||
| path = external/vscode-common-python-lsp | ||
| url = https://github.com/microsoft/vscode-common-python-lsp.git |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| .vscode-test/** | ||
| out/** | ||
| node_modules/** | ||
| external/** | ||
| src/** | ||
| .gitignore | ||
| .yarnrc | ||
|
|
||
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
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
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
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
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
Submodule vscode-common-python-lsp
added at
74080a
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.