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

PUT/DELETE methods for /repositories/{id}/builds #3

Open
akash2237778 opened this issue Jun 12, 2021 · 1 comment
Open

PUT/DELETE methods for /repositories/{id}/builds #3

akash2237778 opened this issue Jun 12, 2021 · 1 comment
Labels
discuss Needs input from various people documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@akash2237778
Copy link
Collaborator

For implementing DELETE/PUT methods for /repositories/{id}/builds endpoint we need to figure out a plan for handling the consequences of deleting/modifying a build. There will be various scenarios to deal with:

  • What should happen if the build is deleted/modified before the start? Do we count that (deleted/unmodified) build and maintain history OR simply eliminate/update it as nothing was posted.
  • What should happen if the build is started but not finished yet?
  • What should happen if some/all deployments have been notified?
  • If the solution has something to do with history or revert back to the previous build, then we also need to figure out for corner cases like DELETE/PUT request after the first build.

Broker Specs (broker.yaml)
Broker Swagger UI

@akash2237778 akash2237778 added documentation Improvements or additions to documentation help wanted Extra attention is needed discuss Needs input from various people labels Jun 12, 2021
@lvarin
Copy link
Collaborator

lvarin commented Jun 15, 2021

What should happen if the build is deleted/modified before the start? Do we count that (deleted/unmodified) build and maintain history OR simply eliminate/update it as nothing was posted.

I like the idea of marking it as CANCELED, and keep the information we have about it

What should happen if the build is started but not finished yet?

Again, I think it should be marked as CANCELED

What should happen if some/all deployments have been notified?

This is interesting. If the deployment have been notified, it means there was an image already built. It the image/build is then deleted, the deployment pulling it will fail. This should only happen if the image is dangerous or unsecured, and then a new fixed image should be built by the developer.

If the solution has something to do with history or revert back to the previous build, then we also need to figure out for corner cases like DELETE/PUT request after the first build.

In docker hub, when a tag is deleted, the tag is lost. Docker hub will not allow you to come back to a previous tag. So IMHO losing the image is the desired outcome. There should be a history in the API of past builds even the deleted/canceled ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Needs input from various people documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants