Skip to content
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

Clean databricks credentials in test/CI #969

Merged
merged 7 commits into from
May 16, 2024
Merged

Conversation

tatiana
Copy link
Collaborator

@tatiana tatiana commented May 15, 2024

We're changing the credentials for the Databricks cluster used to validate dbt Python models, and I noticed there were a few unnecessary credentials set in the CI. This PR aims to clean them up, making it easier for us to manage them.

All the tests passed in: https://github.com/astronomer/astronomer-cosmos/actions/runs/9109622858

The push tests failed because they relied on workflow configuration from the main branch.

Copy link

netlify bot commented May 15, 2024

Deploy Preview for sunny-pastelito-5ecb04 canceled.

Name Link
🔨 Latest commit e42b75c
🔍 Latest deploy log https://app.netlify.com/sites/sunny-pastelito-5ecb04/deploys/6645d4899029fc0008b4f466

@tatiana tatiana force-pushed the clean-databricks-credentials branch from e975678 to b5ce8a8 Compare May 15, 2024 14:12
.github/workflows/test.yml Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.69%. Comparing base (e2a4544) to head (d6a3bd8).

❗ Current head d6a3bd8 differs from pull request most recent head e42b75c. Consider uploading reports for the commit e42b75c to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #969   +/-   ##
=======================================
  Coverage   95.69%   95.69%           
=======================================
  Files          59       59           
  Lines        2880     2880           
=======================================
  Hits         2756     2756           
  Misses        124      124           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.github/workflows/test.yml Outdated Show resolved Hide resolved
[2024-05-15T15:00:02.751+0000] {config.py:291} INFO - Creating temporary profiles.yml with use_mock_values=False at /tmp/tmpheo8f1ns/profiles.yml with the following contents:
default:
    outputs:
        dev:
            connect_retries: 3
            host: adb-2703548196728655.15.azuredatabricks.net
            http_path: /sql/1.0/warehouses/368fe30b92228713
            schema: cosmos_9097739441
            token: '{{ env_var(''COSMOS_CONN_DATABRICKS_TOKEN'') }}'
            type: databricks
    target: dev

[2024-05-15T15:00:02.751+0000] {local.py:281} INFO - Trying to run dbtRunner with:
 ['run', '--models', 'customers', '--project-dir', '/tmp/tmpid0qcz29', '--profiles-dir', '/tmp/tmpheo8f1ns', '--profile', 'default', '--target', 'dev']
 in /tmp/tmpid0qcz29
15:00:02  Running with dbt=1.7.14
15:00:02  Registered adapter: databricks=1.7.14
15:00:02  Found 5 models, 3 seeds, 20 tests, 0 sources, 0 exposures, 0 metrics, 538 macros, 0 groups, 0 semantic models
15:00:02
15:00:04  Concurrency: 1 threads (target='dev')
15:00:04
15:00:04  1 of 1 START python table model cosmos_9097739441.customers .................... [RUN]
15:00:04  Unhandled error while executing target/run/jaffle_shop/models/customers.py
Databricks `http_path` or `cluster_id` of an all-purpose cluster is required for the `all_purpose_cluster` submission method.
15:00:04  1 of 1 ERROR creating python table model cosmos_9097739441.customers ........... [ERROR in 0.12s]
15:00:05
15:00:05  Finished running 1 table model in 0 hours 0 minutes and 2.13 seconds (2.13s).
15:00:05
15:00:05  Completed with 1 error and 0 warnings:
15:00:05
15:00:05    Databricks `http_path` or `cluster_id` of an all-purpose cluster is required for the `all_purpose_cluster` submission method.

As seen in:
https://github.com/astronomer/astronomer-cosmos/actions/runs/9097739441/job/25026817210
@tatiana tatiana marked this pull request as ready for review May 16, 2024 09:26
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. area:ci Related to CI, Github Actions, or other continuous integration tools profile:databricks Related to Databricks ProfileConfig labels May 16, 2024
@tatiana tatiana requested review from pankajkoti and pankajastro May 16, 2024 09:31
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 16, 2024
@tatiana tatiana merged commit a27ea94 into main May 16, 2024
14 checks passed
@tatiana tatiana deleted the clean-databricks-credentials branch May 16, 2024 09:40
@tatiana tatiana mentioned this pull request May 16, 2024
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this pull request Jul 14, 2024
We're changing the credentials for the Databricks cluster used to
validate dbt Python models, and I noticed there were a few unnecessary
credentials set in the CI. This PR aims to clean them up, making it
easier for us to manage them.

All the tests passed in:
https://github.com/astronomer/astronomer-cosmos/actions/runs/9109622858

The push tests failed because they relied on workflow configuration from
the `main` branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ci Related to CI, Github Actions, or other continuous integration tools lgtm This PR has been approved by a maintainer profile:databricks Related to Databricks ProfileConfig size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants