Repository navigation
Conversation
Template names are unique per owner, and a deleted endpoint keeps its
template for a while before the platform removes it. Deploys named
every template {app}-{resource}-template, so redeploying an app soon
after deleting it, or deploying it to a second environment, failed
with "endpoint template names must be unique".
- new endpoints get {app}-{resource}-template-<6 hex chars>
- updates send the bound template's current name, read from the
environment query, so redeploys of existing endpoints are unchanged
- endpoints without template info fall back to the legacy name
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
rp flash deploynamed every endpoint template{app}-{resource}-template. Template names are unique per owner, and a deleted endpoint keeps its template for a while before the platform removes it. So these fail with "endpoint template names must be unique":Deploying an app to a second environment while the first one is live fails for the same reason.
Changes:
{app}-{resource}-template-<6 hex chars>.endpoints { id name template { name } }.Why this shape
Only new endpoints vary the name. Updates keep it, so this PR doesn't depend on how the platform treats a template name change during an update.
#683 fixes the same collision for
rp flash devsessions indev.py. This PR only touches the deploy path (deploy.pyand the environment queries), so the two don't overlap.Template cleanup after an endpoint is deleted isn't part of this PR. Held templates are removed by the platform.
Test plan
tests/test_apps/test_deploy.py:make quality-check(2778 passed)