Skip to content

Commit

Permalink
Merge bundle-integ into main (#1414)
Browse files Browse the repository at this point in the history
## Changes
Decided to avoid bypassing branch protections by force pushing
`bundle-integ` into `main`.

Instead:
- checkout a new branch from `main`
- `git revert` everything until a common ancestor with the
`bundle-integ` (based on `git merge-base`), [here's the
commit](2b7e826)
- `git merge bundle-integ` 
- add [one additional commit to update GH
workflows](b802322).

## Tests
Built and checked the extension manually. Unit tests pass, will check
integ tests in this PR

---------

Co-authored-by: kartikgupta-db <[email protected]>
Co-authored-by: Kartik Gupta <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: releasebot <[email protected]>
Co-authored-by: eng-dev-ecosystem-bot <[email protected]>
Co-authored-by: eng-dev-ecosystem-bot <[email protected]>
Co-authored-by: Serge Smertin <[email protected]>
Co-authored-by: Fabian Jakobs <[email protected]>
Co-authored-by: Julia Crawford (Databricks) <[email protected]>
Co-authored-by: hectorcast-db <[email protected]>
  • Loading branch information
11 people authored Oct 30, 2024
1 parent 4de94c7 commit 1c35e51
Show file tree
Hide file tree
Showing 218 changed files with 33,947 additions and 8,259 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"overrides": [
{
"files": "**/*.test.ts",
"files": ["**/*.test.ts", "**/test/**"],
"rules": {
"no-console": "off"
}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
working-directory: packages/databricks-vscode
env:
GH_TOKEN: ${{ github.token }}
BUILD_PLATFORM_ARCH: linux_amd64

- uses: actions/upload-artifact@v3
with:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: integration

on:
pull_request:
types: [opened, synchronize]

merge_group:

jobs:
trigger-tests:
if: github.event_name == 'pull_request'
name: Trigger Tests
runs-on: ubuntu-latest
environment: "test-trigger-is"

steps:
- uses: actions/checkout@v4

- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.DECO_WORKFLOW_TRIGGER_APP_ID }}
private-key: ${{ secrets.DECO_WORKFLOW_TRIGGER_PRIVATE_KEY }}
owner: ${{ secrets.ORG_NAME }}
repositories: ${{secrets.REPO_NAME}}

- name: Trigger Workflow in Another Repo
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
gh workflow run vscode-isolated-pr.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \
--ref main \
-f pull_request_number=${{ github.event.pull_request.number }} \
-f commit_sha=${{ github.event.pull_request.head.sha }}
# Statuses and checks apply to specific commits (by hash).
# Enforcement of required checks is done both at the PR level and the merge queue level.
# In case of multiple commits in a single PR, the hash of the squashed commit
# will not match the one for the latest (approved) commit in the PR.
# We auto approve the check for the merge queue for two reasons:
# * Queue times out due to duration of tests.
# * Avoid running integration tests twice, since it was already run at the tip of the branch before squashing.
auto-approve:
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
steps:
- name: Mark Check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
gh api -X POST -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/statuses/${{ github.sha }} \
-f 'state=success' \
-f 'context=Integration Tests Check'
4 changes: 2 additions & 2 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
- name: Update nightly release
uses: softprops/action-gh-release@v1
with:
name: Nightly
name: Nightly - ${{ github.ref_name }}
prerelease: true
tag_name: nightly
tag_name: nightly-${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
files: "packages/databricks-vscode/databricks*/*.vsix"
17 changes: 8 additions & 9 deletions .github/workflows/publish-to-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:

jobs:
publish-to-vscode:
if: ${{ ! endsWith(github.event.inputs.version, 'preview') || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
environment: Production

Expand Down Expand Up @@ -54,13 +53,13 @@ jobs:
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}

- name: Install ovsx
run: npm install -g ovsx
# - name: Install ovsx
# run: npm install -g ovsx

- name: Publish to Open VSIX
run: |
ovsx verify-pat databricks
ovsx publish --packagePath databricks-*.vsix
# - name: Publish to Open VSIX
# run: |
# ovsx verify-pat databricks
# ovsx publish --packagePath databricks-*.vsix

env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
# env:
# OVSX_PAT: ${{ secrets.OVSX_PAT }}
24 changes: 2 additions & 22 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,8 @@ on:
branches: [main]

jobs:
run-tests:
strategy:
fail-fast: false
matrix:
arch:
[
{ cli_arch: darwin_amd64, os: macos-latest },
{ cli_arch: windows_amd64, os: windows-latest },
]
node-version: [18.x]
vscode-version: [stable]
uses: ./.github/workflows/tests.yml
with:
os: ${{ matrix.arch.os }}
node-version: ${{ matrix.node-version }}
vscode-version: ${{ matrix.vscode-version }}
cli_arch: ${{ matrix.arch.cli_arch }}
secrets: inherit

package:
name: Package VSIX
needs: "run-tests"
name: Package Arm64 VSIX
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v3
Expand All @@ -53,7 +33,7 @@ jobs:
- run: mkdir -p packages/databricks-vscode/artifacts

- name: Build VSIX
run: yarn package -o artifacts -t darwin-x64
run: yarn package -o artifacts -t darwin-arm64
working-directory: packages/databricks-vscode

- name: Upload artifacts
Expand Down
89 changes: 0 additions & 89 deletions .github/workflows/tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| System | Status |
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Build ([main branch](https://github.com/databricks/databricks-vscode/commits/main)) | [![GitHub CI Status](https://github.com/databricks/databricks-vscode/actions/workflows/push.yml/badge.svg?branch=main)](https://github.com/databricks/databricks-vscode/actions/workflows/push.yml) [![codecov](https://codecov.io/gh/databricks/databricks-vscode/branch/main/graph/badge.svg?token=PUN77X0W3Z)](https://codecov.io/gh/databricks/databricks-vscode) [![lines of code](https://tokei.rs/b1/github/databricks/databricks-vscode)]([https://codecov.io/github/databricks/databricks-vscode](https://github.com/databricks/databricks-vscode)) |
| Build ([main branch](https://github.com/databricks/databricks-vscode/commits/main)) | [![GitHub CI Status](https://github.com/databricks/databricks-vscode/actions/workflows/push.yml/badge.svg?branch=main)](https://github.com/databricks/databricks-vscode/actions/workflows/push.yml) [![codecov](https://codecov.io/gh/databricks/databricks-vscode/branch/main/graph/badge.svg?token=PUN77X0W3Z)](https://codecov.io/gh/databricks/databricks-vscode) |
| [Marketplace](https://marketplace.visualstudio.com/items?itemName=databricks.databricks) | [![Marketplace Version](https://img.shields.io/vscode-marketplace/v/databricks.databricks.svg) ![Marketplace Downloads](https://img.shields.io/vscode-marketplace/d/databricks.databricks.svg)](https://marketplace.visualstudio.com/items?itemName=databricks.databricks) |

## Introduction
Expand Down
4 changes: 3 additions & 1 deletion databricks-vscode.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"jupyter.interactiveWindow.cellMarker.codeRegex": "^# COMMAND ----------|^# Databricks notebook source|^(#\\s*%%|#\\s*\\<codecell\\>|#\\s*In\\[\\d*?\\]|#\\s*In\\[ \\])",
"jupyter.interactiveWindow.cellMarker.default": "# COMMAND ----------"
}
}
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@databricks/databricks-vscode",
"version": "1.4.0",
"version": "2.4.7",
"private": true,
"workspaces": [
"packages/*"
Expand Down Expand Up @@ -34,15 +34,15 @@
"homepage": "https://github.com/databricks/databricks-vscode#readme",
"packageManager": "[email protected]",
"devDependencies": {
"@types/node": "^20.5.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"conventional-changelog-cli": "^3.0.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^8.8.0",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"conventional-changelog-cli": "^4.1.0",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"ts-mockito": "^2.6.1",
"typescript": "5.1.6"
"typescript": "^5.3.3"
},
"resolutions": {
"json5": "2.2.2"
Expand Down
Loading

0 comments on commit 1c35e51

Please sign in to comment.