This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Conversation
d775b43 to
b04bf2e
Compare
delete all settings create all settings from scratch
b716d1a to
98d0743
Compare
Contributor
Author
|
PTAL @Jimdo/werkzeugschmiede @boris-jarkowicz |
seiffert
commented
Apr 10, 2018
library/fastly_service.py
Outdated
| actions.append("Deployed new version because settings are not up to date") | ||
| version_number = self.clone_old_version(service.id) | ||
| self.reset_version(service.id, version_number) | ||
| self.configure_version(service.id, fastly_configuration, activate_new_version, version_number) |
library/fastly_service.py
Outdated
| if current_version is None: | ||
| self.deploy_version_with_configuration(service.id, fastly_configuration, activate_new_version) | ||
| actions.append("Deployed new version because service has no active version") | ||
| if current_version is None or service.active_version is None: |
Contributor
Author
There was a problem hiding this comment.
add explicit branch for doing nothing
library/fastly_service.py
Outdated
| version_number = version['number'] | ||
| return version['number'] | ||
|
|
||
| def clone_old_version(self, service_id): |
Contributor
Author
There was a problem hiding this comment.
clone_active_version
library/fastly_service.py
Outdated
| 'DELETE') | ||
| if response.status == 200: | ||
| return response.payload | ||
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes how new versions of already deployed services are created. Instead of creating a plain new version, the old one is cloned.
This original work was done by @joaopereiramrf in #43. I'm extracting the version cloning here, refactor it a bit and fix the tests.