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

Artifacts API #121

Merged
merged 14 commits into from
Nov 2, 2020
Merged

Artifacts API #121

merged 14 commits into from
Nov 2, 2020

Conversation

joshmeek
Copy link
Contributor

@joshmeek joshmeek commented Oct 28, 2020

Summary

Adds a new API for working with task run artifacts! This is the server side of the Artifacts API to be used in collaboration with the artifact_api branch on core (PrefectHQ/prefect#3581). This adds a new table to the db task_run_artifacts which is a many to one relationship of artifacts to task run. Adds three new API functions and graphql mutations for creating, updating, and deleting task run artifacts.

Checklist

This PR:

  • adds new tests (if appropriate)
  • adds a change file in the changes/ directory (if appropriate)

Server side of the Artifacts API to be used in collaboration with the artifact_api branch on core (PrefectHQ/prefect#3581).

This adds a new table to the db task_run_artifacts which is a many to one relationship of task runs to artifacts. Adds three new API functions and graphql mutations for creating, reading, and deleting task run artifacts. Comments welcome!

Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

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

Nice! I left some small comments / questions / requests

src/prefect_server/api/artifacts.py Show resolved Hide resolved
src/prefect_server/api/artifacts.py Show resolved Hide resolved
src/prefect_server/api/artifacts.py Show resolved Hide resolved
src/prefect_server/api/artifacts.py Outdated Show resolved Hide resolved
src/prefect_server/graphql/artifacts.py Show resolved Hide resolved
src/prefect_server/api/__init__.py Outdated Show resolved Hide resolved
@joshmeek joshmeek marked this pull request as ready for review November 2, 2020 19:10
@joshmeek joshmeek changed the title [WIP] Artifacts API POC Artifacts API Nov 2, 2020
Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

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

One minor request for a different error message, otherwise this LGTM!

src/prefect_server/api/artifacts.py Outdated Show resolved Hide resolved
Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

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

LGTM - nice work

@joshmeek joshmeek merged commit 23f9f1b into master Nov 2, 2020
@joshmeek joshmeek deleted the artifact_api branch November 2, 2020 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants