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

[BUGFIX] Validation Definition factory add_or_update doesnt allow updating batch definition #10960

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

joshua-stauffer
Copy link
Member

ValidationDefinitionFactory.add_or_update overwrites the ID of the incoming batch definition with the ID of the existing batch definition, and then calls BatchDefinition.save. This is ok if the BatchDefinition belongs to the same data source, but in the case that it does not, this errors unexpectedly.

This PR updates the ValidationDefinitionFactory to use the ID of the new batch definition, if one is available.

Copy link

netlify bot commented Feb 21, 2025

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit 42f1ecc
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/67b8e652c014f80008f7f091

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.84%. Comparing base (d4dc22d) to head (42f1ecc).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ions/core/factory/validation_definition_factory.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10960      +/-   ##
===========================================
- Coverage    80.84%   80.84%   -0.01%     
===========================================
  Files          471      471              
  Lines        40790    40791       +1     
===========================================
  Hits         32976    32976              
- Misses        7814     7815       +1     
Flag Coverage Δ
3.10 70.22% <50.00%> (-0.01%) ⬇️
3.10 athena or openpyxl or pyarrow or project or sqlite or aws_creds 56.55% <0.00%> (?)
3.10 aws_deps 46.51% <0.00%> (?)
3.10 big 54.96% <0.00%> (?)
3.10 bigquery 48.74% <0.00%> (?)
3.10 clickhouse 43.41% <0.00%> (?)
3.10 databricks 50.51% <0.00%> (?)
3.10 filesystem 63.00% <50.00%> (?)
3.10 mssql 51.51% <0.00%> (?)
3.10 mysql 51.89% <0.00%> (?)
3.10 postgresql 54.61% <0.00%> (?)
3.10 snowflake 51.25% <0.00%> (?)
3.10 spark 57.93% <0.00%> (?)
3.10 spark_connect 46.83% <0.00%> (?)
3.10 trino 52.43% <0.00%> (?)
3.11 70.22% <50.00%> (+<0.01%) ⬆️
3.11 athena or openpyxl or pyarrow or project or sqlite or aws_creds 56.55% <0.00%> (?)
3.11 aws_deps 46.51% <0.00%> (?)
3.11 big 54.96% <0.00%> (?)
3.11 bigquery 48.74% <0.00%> (?)
3.11 clickhouse 43.41% <0.00%> (?)
3.11 databricks 50.51% <0.00%> (?)
3.11 filesystem 63.00% <50.00%> (?)
3.11 mssql 51.51% <0.00%> (?)
3.11 mysql 51.89% <0.00%> (?)
3.11 postgresql 54.61% <0.00%> (?)
3.11 snowflake 51.25% <0.00%> (?)
3.11 spark 57.93% <0.00%> (?)
3.11 spark_connect 46.83% <0.00%> (?)
3.11 trino 52.43% <0.00%> (?)
3.12 70.23% <50.00%> (-0.01%) ⬇️
3.12 athena or openpyxl or pyarrow or project or sqlite or aws_creds 56.56% <0.00%> (-0.01%) ⬇️
3.12 aws_deps 46.51% <0.00%> (-0.01%) ⬇️
3.12 big 54.95% <0.00%> (-0.01%) ⬇️
3.12 bigquery 48.74% <0.00%> (-0.01%) ⬇️
3.12 databricks 50.51% <0.00%> (+<0.01%) ⬆️
3.12 filesystem 63.00% <50.00%> (-0.01%) ⬇️
3.12 mssql 51.51% <0.00%> (-0.01%) ⬇️
3.12 mysql 51.89% <0.00%> (-0.01%) ⬇️
3.12 postgresql 54.61% <0.00%> (-0.01%) ⬇️
3.12 snowflake 51.26% <0.00%> (-0.01%) ⬇️
3.12 spark 57.93% <0.00%> (-0.01%) ⬇️
3.12 spark_connect 46.83% <0.00%> (-0.01%) ⬇️
3.12 trino 52.44% <0.00%> (-0.01%) ⬇️
3.9 70.26% <50.00%> (+0.01%) ⬆️
3.9 athena or openpyxl or pyarrow or project or sqlite or aws_creds 56.55% <0.00%> (-0.01%) ⬇️
3.9 aws_deps 46.53% <0.00%> (-0.01%) ⬇️
3.9 big 54.97% <0.00%> (-0.01%) ⬇️
3.9 bigquery 48.73% <0.00%> (-0.01%) ⬇️
3.9 clickhouse 43.43% <0.00%> (-0.01%) ⬇️
3.9 databricks 50.51% <0.00%> (-0.01%) ⬇️
3.9 filesystem 63.01% <50.00%> (-0.01%) ⬇️
3.9 mssql 51.50% <0.00%> (-0.01%) ⬇️
3.9 mysql 51.87% <0.00%> (-0.01%) ⬇️
3.9 postgresql 54.60% <0.00%> (-0.01%) ⬇️
3.9 snowflake 51.26% <0.00%> (-0.01%) ⬇️
3.9 spark 57.90% <0.00%> (-0.01%) ⬇️
3.9 spark_connect 46.84% <0.00%> (-0.01%) ⬇️
3.9 trino 52.42% <0.00%> (-0.01%) ⬇️
cloud 0.00% <0.00%> (ø)
docs-basic 54.03% <0.00%> (-0.01%) ⬇️
docs-creds-needed 52.91% <0.00%> (-0.01%) ⬇️
docs-spark 52.46% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@joshua-stauffer joshua-stauffer changed the title [BUG] Validation Definition factory add_or_update doesnt allow updating batch definition [BUGFIX] Validation Definition factory add_or_update doesnt allow updating batch definition Feb 21, 2025
Copy link
Contributor

@tyler-hoffman tyler-hoffman left a comment

Choose a reason for hiding this comment

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

Looks totally legit, but I think this should have an accompanying test. LMK if that's prohibitively difficult

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