Skip to content

fix: stop fetching datasource config from Cloud in local verification flow#2606

Merged
m1n0 merged 2 commits intomainfrom
dtl-1507-stop-fetching-datasource-config-from-cloud-in-local-flow
Mar 2, 2026
Merged

fix: stop fetching datasource config from Cloud in local verification flow#2606
m1n0 merged 2 commits intomainfrom
dtl-1507-stop-fetching-datasource-config-from-cloud-in-local-flow

Conversation

@m1n0
Copy link
Contributor

@m1n0 m1n0 commented Feb 26, 2026

Remove the code path in _create_datasource_yamls that fetched data source configurations from Soda Cloud when dataset identifiers were provided. This was a security risk: users with only contract execution permissions could access datasource config details (hosts, ports, etc.) that should require MANAGE_DATASOURCES_AND_AGENTS permissions.

Local flow (use_agent=False) now always requires a local --data-source config file. Agent flow continues to work as before — the agent provides its own config server-side.

Changes:

  • Remove Cloud datasource config fetch block from _create_datasource_yamls
  • Tighten validate_verify_arguments to require --data-source in local flow even when --dataset is provided
  • Remove dead is_using_remote_datasource helper
  • Update error messages to guide users toward --data-source flag

Description

as per commit message

Checklist

  • I added a test to verify the new functionality.
  • I verified this PR does not break soda-extensions.

… flow

Remove the code path in _create_datasource_yamls that fetched data source
configurations from Soda Cloud when dataset identifiers were provided.
This was a security risk: users with only contract execution permissions
could access datasource config details (hosts, ports, etc.) that should
require MANAGE_DATASOURCES_AND_AGENTS permissions.

Local flow (use_agent=False) now always requires a local --data-source
config file. Agent flow continues to work as before — the agent provides
its own config server-side.

Changes:
- Remove Cloud datasource config fetch block from _create_datasource_yamls
- Tighten validate_verify_arguments to require --data-source in local flow
  even when --dataset is provided
- Remove dead is_using_remote_datasource helper
- Update error messages to guide users toward --data-source flag
@m1n0 m1n0 requested a review from LaurenDebruyn February 26, 2026 11:07
Remove dataset_identifiers and soda_cloud_client parameters that became
unused after removing the Cloud datasource config fetch. Update caller
and tests accordingly.
@sonarqubecloud
Copy link

Comment on lines +220 to +229
"""
In the local flow (use_agent=False), _create_datasource_yamls
should NOT call fetch_data_source_configuration_for_dataset on the
SodaCloud client. Fetching datasource configs from Cloud in the local
flow is a security risk — it can expose host/connection info to users
who only have contract execution permissions.

When no local data source files are provided in local flow, it should
raise an error instead of fetching from Cloud.
"""

Choose a reason for hiding this comment

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

Curious -> is this the new standard in core for writing tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

new standard in what way? We are aiming for smaller tests, doing more unit testing so in that sense yeah, is that what you meant?

Choose a reason for hiding this comment

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

haha no, I meant the large comments :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah ok, that's just Claude explaining it and I kept it in - I kinda like it so that tests are even easier to read by humans 😅

Choose a reason for hiding this comment

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

as long as Claude updates those comments, they are useful indeed ;)

@m1n0 m1n0 merged commit 6245d3d into main Mar 2, 2026
19 checks passed
@m1n0 m1n0 deleted the dtl-1507-stop-fetching-datasource-config-from-cloud-in-local-flow branch March 2, 2026 14:30
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.

2 participants