Repository navigation
[GH-P5] Previews de PR : instance par PR, commentaire unique, forks bloqués, nettoyage - #240
Merged
Merged
Conversation
…ited comment, fork guard, cleanup)
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.
P5: previews de PR (GitHub App)
pr_previews.rs:pull_request.opened|synchronize|reopenedon a repo linked to the installation (withpr_previews_enabled) deploys thehead_sha(pinned) into its own instance per PR,pv{hash10}→df-pv….pr-<n>-<slug>.<prod zone>: one level, valid DNS, label ≤ 63 chars.preview-<n>, so asynchronizecancels only the build of that same PR and never touches prod or dev.preview(new columnproject_env_vars.preview, default false), plusDEVFORGE_PREVIEW*. No production secrets.DEVFORGE_PREVIEW_MEMORY(default 1g), CPUDEVFORGE_PREVIEW_CPUS(default 1), no host ports, no volumes, no GPU.neutralcheck "Previews désactivées pour les forks" is posted instead.<!-- devforge-preview:<uuid> -->. It is created once, then edited (PATCH). If the comment id is lost, it is found again by its marker. Table: Projet | Statut | Preview | Commit | Mis à jour (Paris time).Preview PR #nwhoseenvironment_urlis the preview.closedremoves the container, network, image and DNS, sets the deployment status toinactive, and edits the comment to "Preview supprimée".tick(at most once an hour): previews whose PR is closed, or inactive for more than 7 days, are cleaned up.ProjectPreviewsPanel.tsx): list, Redéployer / Supprimer,pr_previews_enabledtoggle, and a warning when the project is not linked yet.No effect until the app exists and projects are linked (P7).
Tests
pr_previews_tests(11 tests):ProjectPreviewsPanel.test.tsx: empty state, list / redeploy / delete, toggle and unlinked project.