Skip to content

#22 Update schemas#23

Merged
ABMC831 merged 3 commits intomasterfrom
feature/#22-Update-schemas
Oct 23, 2024
Merged

#22 Update schemas#23
ABMC831 merged 3 commits intomasterfrom
feature/#22-Update-schemas

Conversation

@ABMC831
Copy link
Contributor

@ABMC831 ABMC831 commented Oct 17, 2024

Updates schema to ADR 009 as of 2024-10-17
closes #22

@ABMC831 ABMC831 self-assigned this Oct 17, 2024
Copy link

@yruslan yruslan left a comment

Choose a reason for hiding this comment

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

Looks good. Just one thing to check when we start using it. It should be allowed to send a run event with the empty jobs array to the run topic... i think.

conf/topics.json Outdated
"status"
],
"type": "object"
"required": ["event_id", "job_ref", "tenant_id", "source_app", "source_app_version", "environment", "timestamp_start", "timestamp_end", "jobs", "jobs.catalog_id", "jobs.status", " jobs.timestamp_start", "jobs.timestamp_end"]
Copy link

Choose a reason for hiding this comment

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

Not 100% sure how it works when jobs is a mandatory field. It is an array, and it is possible to have an empty array when the pipeline has failed and was not able to run any jobs. For instance, when EMR is not available 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually.... we need to remove
jobs.* required fields... as jsonschema validate complains as that prescribes them to be present in underlying object, not in the element of a array

those are
jobs.catalog_id
jobs.status
jobs.timestamp_start
jobs.timestamp_end
as none of those would be present at that xpath

as for jobs..... schema just requires field to be there and to be array.... so empty array is fine.... null is not fine though

ABMC831 and others added 2 commits October 23, 2024 10:09
Co-authored-by: Ruslan Yushchenko <yruslan@gmail.com>
@ABMC831 ABMC831 requested a review from yruslan October 23, 2024 08:44
@ABMC831 ABMC831 merged commit 3195c3e into master Oct 23, 2024
@ABMC831 ABMC831 deleted the feature/#22-Update-schemas branch October 23, 2024 09:46
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.

Update schemas

2 participants