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 end-point '/<env>/publish' created via FastAPI - request model #13

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

lmilbaum
Copy link
Contributor

@lmilbaum lmilbaum commented Aug 27, 2020

/{env}/publish end point.

Run:
curl -X PUT http://localhost:8000/{env}/publish
Expected Result:
{"detail":"Created Publish Id"}

https://projects.engineering.redhat.com/browse/RHELDST-2774

Additional Information:
Changes to .pylintrc file were added due to an import-error. Following suggestion from the following KB:
https://stackoverflow.com/questions/1899436/pylint-unable-to-import-error-how-to-set-pythonpath

@lmilbaum lmilbaum self-assigned this Aug 27, 2020
@lmilbaum lmilbaum force-pushed the publish branch 7 times, most recently from 6c4900d to c1126f9 Compare August 27, 2020 08:08
@negillett
Copy link
Member

What's the intended scope of this PR?
What you have looks okay but I'm not seeing where the API would connect to or create publish objects in the database. Is that coming later?

@lmilbaum
Copy link
Contributor Author

The scope of this PR is to act as the MVP of the feature. I am breaking the overall story implementation to baby steps/PRs, such that each PR is effectively re-viewable by the whole team.

Copy link
Member

@negillett negillett left a comment

Choose a reason for hiding this comment

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

This looks like a good base on which to build the API. So, +1 from me.

Copy link
Member

@rohanpm rohanpm left a comment

Choose a reason for hiding this comment

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

I am breaking the overall story implementation to baby steps/PRs, such that each PR is effectively re-viewable by the whole team.

I think this is too small, the way this is structured makes review less effective in my opinion rather than more effective, as it's unclear which parts of this PR (if any) aimed for completion.

Looking at the PR, what comes to mind includes:

  • request model is incomplete
  • response model is incomplete
  • missing settings functionality for environments
  • missing API docs
  • missing implementation
  • API for adding artifacts to a publish has appeared before the API for creating a publish, shouldn't it be the other way around?

This time I made inline comments on most of these, but I'm sure you were already aware of these points so I'm not sure if the review was just a waste of time. Maybe it would be better for a PR to try to complete at least one aspect of the work and point it out so that part could be reviewed?

If every single part of the PR falls into the category "it's not expected to be like this when it's finished" then I'm not sure what we're reviewing, it doesn't seem like there is much that can be done other than a rubber stamp +1 and a request to let us know when it's ready for proper review later.

exodus_gw/gateway.py Show resolved Hide resolved
exodus_gw/gateway.py Outdated Show resolved Hide resolved
exodus_gw/gateway.py Show resolved Hide resolved
exodus_gw/gateway.py Outdated Show resolved Hide resolved
exodus_gw/publish.py Outdated Show resolved Hide resolved
exodus_gw/gateway.py Outdated Show resolved Hide resolved
exodus_gw/gateway.py Outdated Show resolved Hide resolved
@lmilbaum
Copy link
Contributor Author

lmilbaum commented Sep 1, 2020

The PR should not be merged till #15 is. Some of the code changes in this PR will be removed as soon as #15 is merged and this PR is rebased.

Copy link
Member

@negillett negillett left a comment

Choose a reason for hiding this comment

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

The corresponding issue for this PR is about creating the publish objects in the database. The publish endpoint should only be responsible for creating the publish database object and that object's ID. So, I don't think it's in scope to publish_artifacts; that's encroaching on https://projects.engineering.redhat.com/browse/RHELDST-2160, I believe.

@lmilbaum
Copy link
Contributor Author

lmilbaum commented Sep 1, 2020

The corresponding issue for this PR is about creating the publish objects in the database. The publish endpoint should only be responsible for creating the publish database object and that object's ID. So, I don't think it's in scope to publish_artifacts; that's encroaching on https://projects.engineering.redhat.com/browse/RHELDST-2160, I believe.

I have read again the issue and figured out my confusion. @nathanegillett thanks for that :-)

exodus_gw/publish.py Outdated Show resolved Hide resolved
exodus_gw/publish.py Outdated Show resolved Hide resolved
exodus_gw/publish.py Outdated Show resolved Hide resolved
exodus_gw/publish.py Outdated Show resolved Hide resolved
exodus_gw/gateway.py Outdated Show resolved Hide resolved
@lmilbaum lmilbaum changed the title API for creating publish objects - initial commit API end-point '/<env>/publish' created via FastAPI Sep 3, 2020
@lmilbaum lmilbaum changed the title API end-point '/<env>/publish' created via FastAPI API end-point '/<env>/publish' created via FastAPI - request model Sep 3, 2020
exodus_gw/publish.py Outdated Show resolved Hide resolved
exodus_gw/gateway.py Show resolved Hide resolved
exodus_gw/publish.py Outdated Show resolved Hide resolved
@rohanpm rohanpm merged commit 09a2cb3 into release-engineering:master Sep 10, 2020
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

4 participants