From 3c5b176a66f5e125e8b7159ad471fb4939e7305f Mon Sep 17 00:00:00 2001 From: Serge Smertin <259697+nfx@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:19:48 +0200 Subject: [PATCH] Check downstream backwards compatibility (#600) ## Changes Comments on PR whenever downstream fails to compile or fails unit tests. See implementation for more details: - https://github.com/databrickslabs/sandbox/pull/141 Backwards incompatible changes would result in comments similar to: image Current downstream checking graph: ```mermaid graph TD pysdk[Python SDK: ***this PR***] --> ucx pysdk --> blueprint blueprint --> lsql blueprint --> ucx blueprint --> remorph lsql --> ucx lsql --> remorph ``` ## Tests Manual --------- Signed-off-by: Serge Smertin <259697+nfx@users.noreply.github.com> --- .github/workflows/downstreams.yml | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/downstreams.yml diff --git a/.github/workflows/downstreams.yml b/.github/workflows/downstreams.yml new file mode 100644 index 000000000..6f57457cd --- /dev/null +++ b/.github/workflows/downstreams.yml @@ -0,0 +1,54 @@ +name: downstreams + +on: + pull_request: + types: [opened, synchronize] + merge_group: + types: [checks_requested] + push: + # Always run on push to main. The build cache can only be reused + # if it was saved by a run from the repository's default branch. + # The run result will be identical to that from the merge queue + # because the commit is identical, yet we need to perform it to + # seed the build cache. + branches: + - main + +permissions: + id-token: write + contents: read + pull-requests: write + +jobs: + compatibility: + strategy: + fail-fast: false + matrix: + downstream: + - name: ucx + org: databrickslabs + - name: blueprint + org: databrickslabs + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install toolchain + run: | + pip install hatch==1.9.4 + + - name: Acceptance + uses: databrickslabs/sandbox/downstreams@downstreams/v0.0.1 + with: + repo: ${{ matrix.downstream.name }} + org: ${{ matrix.downstream.org }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}