-
Notifications
You must be signed in to change notification settings - Fork 58
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
Lin 447 pipeline object #710
Merged
Merged
Conversation
This file contains 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
Create PipelineORM with many to many relationship with artifacts. Create Pipeline API class containing a TaskGraph.
Fix broken Table import in relational Add dependency as TaskGraph member so it can be used in pipeline generation.
The string key was just association so it was renamed to artifact_to_pipeline.
Copy logic from to_pipeline function and modify the code to fit Pipeline input parameters.
Since Pipeline is an object now, the TaskGraph can be initialized when the object is instead of when the orchestration occurs.
Have to_pipeline create a Pipeline object and call generate_pipeline and return the result.
…saving pipelines.
Add IDs to Artifact and Pipeline
…y into LIN-447-pipeline-object
Allow user to get PipelineORM object from database given name
Return a Pipeline object by name. Remove default value for PipelineORM name column because it is nonnullable so no default is needed.
This represents the one to many relationship between an artifact and it's sources in the context of a pipeline.
Makes copy notebokk tests pass. Add currently failing pytest dependency test.
In order to construct a proper many to many relationship between pre artifacts and dependencies, a secondary table must be constructed in sqlalchemy. Convert relationship between Pipeline and dependencies into a bidirectional relationship.
The dependencies must be fetched from the database and converted into a TaskGraphEdge to pass into Pipeline before returning the object.
It is assumed that all dependencies will be artifacts in the artifact list so dependencies do not need to be fetched separately. Instead they can be reused when fetching a Pipeline. Replace some object strings in sqlalchmy relationships with the ORM object types themselves Mypy was complaining about being unable to pick up on the type of a relationship.
If post artifact is None, the code would crash because none has no attribute name. Instead we want to skip attempting to fetch an incomplete dependency.
Test creating and fetching two pipelines with overlapping dependencies.
lionsardesai
reviewed
Jul 8, 2022
lionsardesai
reviewed
Jul 8, 2022
lionsardesai
reviewed
Jul 8, 2022
Make sure the db can handle multiple dependencies with the same pipeline id and pre artifacts. Disallow creation of empty pipelines.
Reduce number of tests to 3. The first test tests multiple pipelines with different artifact lists. The second test tests multiple pipelines with overlapping dependencies. The third test tests a signle pipeline with overlapping dependencies.
LordDarkula
commented
Jul 8, 2022
lionsardesai
approved these changes
Jul 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ship it!! 🚢
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.
Description
Create Pipeline object and enable the creation, saving of fetching of pipelines. Pipelines serve as an intermediary between
artifacts and exported production scripts.
Fixes # (issue)
447
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Four tests have been added to
test_linea_api.py
.