Skip to content

Fix #22942: dbt http config paramaters#27133

Open
SumanMaharana wants to merge 5 commits intomainfrom
fix-dbt-http-config
Open

Fix #22942: dbt http config paramaters#27133
SumanMaharana wants to merge 5 commits intomainfrom
fix-dbt-http-config

Conversation

@SumanMaharana
Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #22942
This pull request introduces enhanced support for custom HTTP headers and SSL verification when fetching dbt artifacts via HTTP, improves error handling, and adds comprehensive unit tests for these features. These changes make it easier and more secure to connect to dbt artifact endpoints that require authentication (such as private GitLab or GitHub repositories) or custom SSL settings.

dbt HTTP configuration and ingestion improvements:

  • Added support for custom HTTP headers (dbtHttpHeaders) and SSL verification options (dbtVerifySSL, dbtSSLConfig) to the DbtHttpConfig schema and ingestion logic, allowing users to specify authentication headers and SSL/TLS settings for all HTTP requests when fetching dbt artifacts. [1] [2] [3] [4] [5] [6]
  • Updated error handling to provide more informative messages for SSL errors and authentication failures (401/403), including hints to check the relevant configuration fields.

Testing improvements:

  • Added a new unit test suite (test_dbt_http_config.py) to verify that custom headers and SSL settings are correctly applied to all HTTP requests and that errors are handled as expected.

These changes significantly improve the flexibility, security, and reliability of dbt ingestion.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Copilot AI review requested due to automatic review settings April 7, 2026 15:18
@SumanMaharana SumanMaharana requested a review from a team as a code owner April 7, 2026 15:18
@github-actions github-actions bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Apr 7, 2026
Comment thread ingestion/tests/unit/test_dbt_http_config.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enhances dbt HTTP artifact fetching in the ingestion framework by allowing callers to configure request headers and SSL verification, improving support for private artifact endpoints (e.g., GitLab/GitHub) and custom CA validation.

Changes:

  • Extends DbtHttpConfig JSON schema with dbtHttpHeaders, dbtVerifySSL, and dbtSSLConfig.
  • Updates dbt HTTP fetching to forward headers and SSL verification options to all requests.get() calls, with improved manifest-fetch error messaging for SSL/auth failures.
  • Adds unit tests validating header/SSL forwarding and key error paths.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
openmetadata-spec/src/main/resources/json/schema/metadataIngestion/dbtconfig/dbtHttpConfig.json Adds schema fields to configure HTTP headers and SSL verification for dbt HTTP artifact downloads.
ingestion/src/metadata/ingestion/source/database/dbt/dbt_config.py Applies configured headers/SSL settings to dbt artifact HTTP requests and improves certain error messages.
ingestion/tests/unit/test_dbt_http_config.py Introduces unit tests for new dbt HTTP headers/SSL behavior and error handling.

Comment thread ingestion/src/metadata/ingestion/source/database/dbt/dbt_config.py
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

✅ TypeScript Types Auto-Updated

The generated TypeScript types have been automatically updated based on JSON schema changes in this PR.

@github-actions github-actions bot requested a review from a team as a code owner April 7, 2026 15:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

🟡 Playwright Results — all passed (25 flaky)

✅ 3593 passed · ❌ 0 failed · 🟡 25 flaky · ⏭️ 207 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 453 0 4 2
🟡 Shard 2 640 0 2 32
🟡 Shard 3 649 0 2 26
🟡 Shard 4 616 0 6 47
🟡 Shard 5 604 0 3 67
🟡 Shard 6 631 0 8 33
🟡 25 flaky test(s) (passed on retry)
  • Features/CustomizeDetailPage.spec.ts › Dashboard - customization should work (shard 1, 1 retry)
  • Features/CustomizeDetailPage.spec.ts › Ml Model - customization should work (shard 1, 1 retry)
  • Features/CustomizeDetailPage.spec.ts › API Endpoint - customization should work (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/DataQuality/BundleSuiteBulkOperations.spec.ts › Bulk selection operations (shard 2, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Flow/ExploreDiscovery.spec.ts › Should display deleted assets when showDeleted is checked and deleted is not present in queryFilter (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataProducts.spec.ts › Search Data Products (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with subdomains attached verifies subdomain accessibility (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with data products attached at domain and subdomain levels (shard 4, 1 retry)
  • Pages/DomainUIInteractions.spec.ts › Select domain from global dropdown filters explore (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Announcement create, edit & delete (shard 4, 1 retry)
  • Pages/EntityDataSteward.spec.ts › Tag Add, Update and Remove (shard 5, 1 retry)
  • Pages/ExploreTree.spec.ts › Verify Database and Database Schema available in explore tree (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Add and Remove Assets (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary Bulk Import Export (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/ProfilerConfigurationPage.spec.ts › Non admin user (shard 6, 1 retry)
  • Pages/TestSuite.spec.ts › Logical TestSuite (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Create team with domain and verify visibility of inherited domain in user profile after team removal (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Copilot AI review requested due to automatic review settings April 9, 2026 06:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 8 changed files in this pull request and generated 1 comment.

Comment on lines +39 to +40
"additionalProperties": {
"type": "string"
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dbtHttpHeaders will commonly include secrets (e.g., Authorization, PRIVATE-TOKEN). The schema currently defines it as a plain object of strings without mask: true/secret formatting, which can cause credentials to be exposed via persisted pipeline configs, API responses, or UI rendering. Consider marking this property as masked (or modelling header values as secret strings) so tokens are not displayed or logged inadvertently.

Suggested change
"additionalProperties": {
"type": "string"
"mask": true,
"additionalProperties": {
"type": "string",
"format": "password",
"mask": true

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 64%
64.27% (59551/92656) 43.75% (31025/70904) 46.94% (9362/19943)

@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 9, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Fixes HTTP config parameters in dbt by patching requests.get globally instead of at import location, improving test reliability. No issues found.

✅ 1 resolved
Quality: Tests patch requests.get globally instead of at import location

📄 ingestion/tests/unit/test_dbt_http_config.py:69 📄 ingestion/tests/unit/test_dbt_http_config.py:84 📄 ingestion/tests/unit/test_dbt_http_config.py:94 📄 ingestion/tests/unit/test_dbt_http_config.py:110-113 📄 ingestion/tests/unit/test_dbt_http_config.py:129 📄 ingestion/tests/unit/test_dbt_http_config.py:147 📄 ingestion/tests/unit/test_dbt_http_config.py:157 📄 ingestion/tests/unit/test_dbt_http_config.py:178-179 📄 ingestion/tests/unit/test_dbt_http_config.py:195 📄 ingestion/tests/unit/test_dbt_http_config.py:208
The tests use patch("requests.get", ...) which patches the function on the requests module globally. The recommended unittest.mock pattern is to patch where the name is looked up: patch("metadata.ingestion.source.database.dbt.dbt_config.requests.get", ...). The current approach works because dbt_config.py calls requests.get() (attribute lookup on the imported module), but it's fragile — if another thread or test runs concurrently that also uses requests.get, they would interfere with each other.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dbt Agent] Allow more customization in http config when fetching dbt files

4 participants