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

API spec v0.2.0 #479

Closed
wants to merge 6 commits into from
Closed

API spec v0.2.0 #479

wants to merge 6 commits into from

Conversation

sherifnada
Copy link
Contributor

@sherifnada sherifnada commented Oct 2, 2020

What

  • Attaches a default DockerRepository and imageVersion to source/destination
  • keys SourceSpec/DestinationSpec on Source/Destination instead of having its own primary key
  • Adds the ability to create sources, and update a source or destination's default imageVersion

in the future, specs will be retrieved based on a (source/dest ID, source/dest version) tuple or a dedicated ID representing that tuple. But right now since there is no explicit versioning registry, we always use the source/destination's default image version.

If this looks good I'll go ahead and start editing the "inner" schemas behind the scenes

@sherifnada sherifnada requested review from cgardens, michel-tricot and jrhizor and removed request for cgardens October 2, 2020 18:21
Copy link
Contributor

@cgardens cgardens left a comment

Choose a reason for hiding this comment

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

Adds the ability to create sources, and update a source's default imageVersion

why just source and not destination?

Just commenting, because I feel like I'm missing an important piece here, which is what will be calling create / update. Definitely don't need you to implement it yet, but a few sentences explaining what you have in mind would be helpful so I have a better idea of how this will be used.

@@ -1458,4 +1512,4 @@ components:
InvalidInput:
description: Invalid Input
security:
- {}
- { }
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ij formatting, removed

@@ -121,6 +121,48 @@ paths:
description: Workspace not found
"422":
$ref: "#/components/responses/InvalidInput"
/v1/sources/create:
Copy link
Contributor

Choose a reason for hiding this comment

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

what is calling this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to make sure we are fully aligned on the terminology:

does it mean we will call source-connector: source?
does it mean we will call destination-connector: destination?

Challenging it: why don't we call it connector (with an enum type to distinguish between source and destination)?

@@ -895,21 +967,15 @@ components:
items:
$ref: "#/components/schemas/SourceRead"
# SOURCE SPECIFICATION
SourceSpecificationId:
type: string
format: uuid
SourceSpecification:
description: The specification for what values are required to configure the source.
example: { user: { type: string } }
SourceSpecificationRead:
Copy link
Contributor

@cgardens cgardens Oct 2, 2020

Choose a reason for hiding this comment

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

will the specification now read from the spec method on each docker image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is the idea, but it doesn't have to happen in strict lockstep with this change.

@sherifnada
Copy link
Contributor Author

Screen Shot 2020-10-02 at 12 02 05 PM

@cgardens the create endpoint will be called from this screen in the current mockups

@sherifnada
Copy link
Contributor Author

why just source and not destination?

We'll be able to change a destination's version but not add a new destination since we only support one destination rn.

@sherifnada
Copy link
Contributor Author

initial PR did not have destination update endpoint, added now.

type: object
required:
- name
- defaultDockerRepository
Copy link
Contributor

Choose a reason for hiding this comment

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

why is it called default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

future-proofing to allow specific connector instances to diverge from the global default version

@sherifnada sherifnada marked this pull request as draft October 6, 2020 16:07
@sherifnada
Copy link
Contributor Author

Superseded by #528 and #529

@sherifnada sherifnada closed this Oct 9, 2020
@sherifnada sherifnada deleted the sherif/api-v0.2.0 branch October 9, 2020 21:18
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.

None yet

3 participants