Skip to content

Conversation

@mgyucht
Copy link
Contributor

@mgyucht mgyucht commented Mar 21, 2025

What changes are proposed in this pull request?

Integration tests for the Python SDK are run once for each environment (a grid covering cloud, account/workspace, and with or without UC). All tests are executed by the test runner in each environment, even though most tests only work in a specific context (e.g. you can't run a test that depends on a catalog in a workspace with no catalog).

Each test uses pytest fixtures to express its dependencies. One of these is the Databricks client to use for the test. There are four options, depending on whether the test is meant to be run at the workspace/account level and with or without UC: w for workspace-level without UC, ucws for workspace-level with UC, a for account-level without UC, and ucacct for account-level with UC. Any test that uses these clients in the tests/integration directory will have a marker called integration automatically added to it. make integration runs these tests.

However, currently, tests using the ucacct client are skipped. In this case, this is happening by pytest itself because these tests are not annotated with the integration marker. This is fixed by adding ucacct to the list of fixtures whose presence indicates that they are integration tests.

How is this tested?

  • Run integration tests, and verify that ucacct tests are executed after this change.

NO_CHANGELOG=true

@mgyucht mgyucht temporarily deployed to test-trigger-is March 21, 2025 09:35 — with GitHub Actions Inactive
@mgyucht mgyucht temporarily deployed to test-trigger-is March 21, 2025 09:36 — with GitHub Actions Inactive
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 934
  • Commit SHA: 75c65b220114f1b9b5b407120997d76b7f05147f

Checks will be approved automatically on success.

@mgyucht mgyucht added this pull request to the merge queue Mar 21, 2025
Merged via the queue into main with commit 0bd31d6 Mar 21, 2025
17 checks passed
@mgyucht mgyucht deleted the fix/run-ucacct-tests-during-integration-tests branch March 21, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants