Repository navigation
Conversation
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
fix: prorate subscription upgrades in the local and e2e stores
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 was wrong
Everything the stack runs from source followed a moving branch or tag: the WordPress plugins and theme were cloned from their default branch (two of them from third-party mirrors,
polylang-profrom GitLab andwoocommerce-subscriptionsfrom Pronamic), the Nextcloud apps and the static site were fast-forwarded tomainon everymake up, the E2E stack downloaded the apps frommain, and Mailpit usedlatest. A commit pushed to any of these sources ran on the next install with access to the database and to the Nextcloud admin credentials.What changed
WORDPRESS_SETUP_CONFIG_YAMLstarts itspost_install_commandswith a fetch and checkout of a fixed commit, the current head of its default branch. The image runs these commands on every boot, so an existing clone is moved to the pinned commit too.post_install_commandsfor themes, so thelibresign-wp-customizationsentry clones the theme when it is missing and checks out its pinned commit. The image then finds the theme directory and skips its own clone.SITE_REPO_REF,ADMIN_GROUP_MANAGER_REFandWORDPRESS_LOGIN_BACKEND_REFin the Makefile replace themainbranch:make upfetches and checks out the commit instead of pulling.admin_group_managerandwordpress_login_backendat the same commits.v1.31.2, the version the E2E stack already uses.LibreCodeCoop/wordpress-docker#45 adds a
reffield for plugins and themes. Once it is merged and the submodule is bumped, these checkout commands can be replaced by that field.How it was verified
saas-e2estack built from scratch, which inherits the plugin list: 14 passed.git rev-parse HEAD), Mailpit reportsv1.31.2, and the two Nextcloud apps are installed from the archives of the pinned commits.make -nshows the checkout of each ref and nopull.