Add column field log to task pipeline#554
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #554 +/- ##
==========================================
- Coverage 86.54% 86.40% -0.15%
==========================================
Files 92 93 +1
Lines 6466 6641 +175
==========================================
+ Hits 5596 5738 +142
- Misses 870 903 +33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Description
Extends
TaskPipelineto detect and surface missing mandatory fields from acolumn-field log as task rows.
A new
column_field_pathparameter (alongsidemandatory_fields) can be passedto
TaskPipeline.run(). When provided, the pipeline reads the column-field CSV,compares the
fieldcolumn against the supplied mandatory fields list, and emitsone
column-fieldtask row per missing field — using the same schema and SHA-256referencehash as the existinglogandissuesources.Key behaviours:
mandatory_fieldsentries can be a plain string (field must be present) or alist of strings (any one of the alternatives is sufficient)
column_field_pathis given withoutmandatory_fields, a warning is loggedand the check is skipped gracefully
_transform_issues_to_tasksto guard againstNoneorganisation/endpoint(was passing
Nonedirectly topl.lit)run()now consistently returnsself.statusrather than the bare enum valueRelated Tickets & Documents
QA Instructions
Pass a column-field CSV (columns:
dataset,resource,column,field) and amandatory_fieldslist toTaskPipeline().run(). Rows for any fields absent fromthe CSV will appear in the output with
task-source=column-fieldanddetailscontaining
{"field": "...", "issue_type": "missing-field"}.Added/updated tests?
TestColumnFieldTasksintests/unit/pipeline/test_task.py