-
Notifications
You must be signed in to change notification settings - Fork 83
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
Feature: Add incremental deploys #260
Comments
Please note that this change is unlikely based on the atomic nature of deploys and several implications in the system, especially around deploy previews / branch deploys.
which list of "existing files" should this extend? |
It should be the current, active deploy ( Another way to think about this is to look at |
That would mean it would only work for production deploys. This could be a footgun if you don't mean to update your production deployment. Nonetheless, thank you a lot for the suggestion. |
Seems like I was blind and adding one file to an existing deployment is already possible without creating a new deploy. It can be done with: PUT /sites/{site_id}/deploys/{deploy_id} Sorry for generating unnecessary traffic. Thanks a lot for your prompt replies, please close this issue. |
this is likely not true. remember, deploys are atomic. |
Thanks for pointing this out, you are correct: the above PUT endpoint only works on unpublished deploys. So, atomic deploys means that a deploy is immutable after being published. I fully agree that any feature request should not change this property of the current system architecture. I still think this property can be preserved, here is a new, slightly modified proposal for incremental deploys:
Upload will be the same and should be done with PUT /deploys/{deployId}/files/{path}. @mraerino: Please let me know, if you see a chance in getting this feature considered. |
Description
If you want to add a single file to a site, you currently have to
/sites/{site_id}/files
/sites/{siteId}/deploys
/deploys/{deployId}/files/{path}
This process is not only error prone, it also leads to a lot of unnecessary network traffic, especially for long file list. The proposed feature aims at improving and simplifying this process.
Feature
At a minimum steps 1. + 2. are not needed with a new version of
/sites/{siteId}/deploys
. This new version could have the following signature:PATCH
/sites/{siteId}/deploys
Parameters: sha keys of all files that should be added to the existing files
Return: same as before: list of required files for upload and a new deployId
Step number 4 would still be necessary, if an upload is required.
Alternatives
Maybe it is possible to avoid steps 1.-3. altogether with an improved version of PUT
/deploys/{deployId}/files/{path}
, theerby simplifying the process even further.Note: This is a feature request for the API core functionality and not a spec issue.
The text was updated successfully, but these errors were encountered: