databricks / run-notebook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Full path is being stripped

stoddabr opened this issue · comments

The full notebook path is being stripped if no file extension is passed.

For example the following action config will fail

name: Run dbx test on PR

on:
  pull_request:

env:
  DATABRICKS_HOST: ...

jobs:
  unit-test-notebook:
    runs-on: 
      group: ...
    timeout-minutes: 10

    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
      - name: Run test notebook
        uses: databricks/run-notebook@v0.0.3
        with:
          databricks-token: "${{ secrets.DATABRICKSTOKEN }}"
          local-notebook-path: tests/Test_ESGValidationRuleGenerator
          existing-cluster-id: ...
          git-commit: "${{ github.event.pull_request.head.sha }}"
          # Grant all users view permission on the notebook's results, so that they can
          # see the result of the notebook, if they have related access permissions.
          access-control-list-json: >
            [
              {
                "group_name": "users",
                "permission_level": "CAN_VIEW"
              }
            ]
          run-name: "Test Dbx"

Since the notebook path will be passed as "" leading to an error:

Job run did not succeed: Task notebook-task failed with message: Unable to access the notebook "". Either it does not exist, or the identity used to run this job, ..., lacks the required permissions. This caused all downstream tasks to get skipped.