Skip to content

Commit

Permalink
[SITE-2845] Release 1.4.5 (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwtyler authored Jan 21, 2025
2 parents ec6ddd9 + 276f96c commit 63e63f8
Show file tree
Hide file tree
Showing 19 changed files with 638 additions and 443 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
echo "GITHUB_TOKEN environment variables missing; assuming unauthenticated build"
exit 0
fi
echo "Setting GitHub OAuth token with suppressed ouput"
echo "Setting GitHub OAuth token with suppressed output"
{
composer config -g github-oauth.github.com $GITHUB_TOKEN
} &> /dev/null
Expand Down
38 changes: 21 additions & 17 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
timezone: America/Los_Angeles
day: tuesday
target-branch: "default"
open-pull-requests-limit: 99
ignore:
- dependency-name: phpunit/phpunit
versions:
- ">= 8.a"
- "< 9"
- dependency-name: phpunit/phpunit
versions:
- ">= 9.a"
- "< 10"
- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
timezone: America/Los_Angeles
day: tuesday
target-branch: "main"
open-pull-requests-limit: 99
ignore:
- dependency-name: phpunit/phpunit
versions:
- ">= 8.a"
- "< 9"
- dependency-name: phpunit/phpunit
versions:
- ">= 9.a"
- "< 10"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
23 changes: 23 additions & 0 deletions .github/workflows/build-tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build, Tag, and Release
on:
push:
branches:
- 'release'

permissions:
pull-requests: write
contents: write

jobs:
tag:
name: Tag and Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build, tag, and release
uses: pantheon-systems/plugin-release-actions/build-tag-release@v0
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: "true"
draft: "true"
28 changes: 28 additions & 0 deletions .github/workflows/composer-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Composer Diff
on:
pull_request:
paths:
- 'composer.lock'
permissions:
contents: write
pull-requests: write
jobs:
composer-diff:
name: Composer Diff
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate composer diff
id: composer_diff
uses: IonBazan/composer-diff-action@v1
- uses: marocchino/sticky-pull-request-comment@v2
if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }}
with:
header: composer-diff
message: |
<summary>Composer Changes</summary>
${{ steps.composer_diff.outputs.composer_diff }}
25 changes: 17 additions & 8 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: pantheon-systems/validate-readme-spacing@v1
lint:
name: PHPCS Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/vendor
key: test-lint-dependencies-{{ checksum "composer.json" }}
Expand All @@ -34,17 +34,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: WP.org Validator
uses: pantheon-systems/action-wporg-validator@1.0.0
uses: pantheon-systems/action-wporg-validator@v1.1.5
with:
type: plugin
php8-compatibility:
name: PHP 8.x Compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: pantheon-systems/phpcompatibility-action@dev
with:
paths: ${{ github.workspace }}/*.php
Expand All @@ -65,7 +65,7 @@ jobs:
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -78,17 +78,26 @@ jobs:
sudo apt-get install -y redis-tools
redis-cli -h localhost ping
- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/vendor
key: test-dependencies-{{ checksum "composer.json" }}
restore-keys: test-dependencies-{{ checksum "composer.json" }}
- name: Setup WP-CLI
uses: godaddy-wordpress/setup-wp-cli@1
- name: Install dependencies
run: |
if [ ${{ matrix.php_version }} = "7.4" ]; then
composer update
fi
composer install
- name: Install SVN if needed
run: |
if ! command -v svn &> /dev/null; then
echo "SVN is not installed. Installing now..."
sudo apt-get update
sudo apt-get install -y subversion
fi
- name: Run PHPUnit
run: |
if [ ${{ matrix.redis_enabled }} = 'true' ]; then
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/plugin-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Validate "Tested Up To"

on:
schedule:
- cron: '0 0 * * 0'

permissions:
contents: write
pull-requests: write

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate Plugin Version
uses: jazzsequence/[email protected]
4 changes: 2 additions & 2 deletions .github/workflows/wordpress-plugin-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@2.1.1
uses: 10up/action-wordpress-plugin-deploy@2.2.2
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/wporg-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# On push, run the action-wporg-validator workflow.
name: WP.org Validator
on: [push]
jobs:
wporg-validation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: WP.org Validator
uses: pantheon-systems/[email protected]
with:
type: plugin
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ tests/pantheon-wordpress-upstream
bin/install-local-tests.sh
bin/install-wp-tests.sh
bin/phpunit-test.sh
bin/helpers.sh
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @pantheon-systems/cms-platform @pantheon-systems/cms-ecosystem
* @pantheon-systems/site-experience
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pull requests and issues are welcome!

Development and releases are structured around two branches, `main` and `release`. The `main` branch is the default branch for the repository, and is the source and destination for feature branches.

We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `main` when merging, and to include the PR # in the commit message. PRs to `main` should also include any relevent updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `main`.
We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `main` when merging, and to include the PR # in the commit message. PRs to `main` should also include any relevant updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `main`.

`main` should be stable and usable, though possibly a few commits ahead of the public release on wp.org.

Expand Down Expand Up @@ -39,19 +39,17 @@ The behat tests require a Pantheon site with Redis enabled. Once you've created
* Push the release branch up.
1. Open a Pull Request to merge `release_X.Y.Z` into `release`. Your PR should consist of all commits to `main` since the last release, and one commit to update the version number. The PR name should also be `Release X.Y.Z`.
1. After all tests pass and you have received approval from a [CODEOWNER](./CODEOWNERS), merge the PR into `release`. A merge commit is preferred in this case. _Never_ squash to `release`.
1. Locally, pull the `release` branch, create a new tag (based on version number from previous steps), and push up. The tag should _only_ be the version number. It _should not_ be prefixed `v` (i.e. `X.Y.Z`, not `vX.Y.X`).
* `git tag X.Y.Z`
* `git push --tags`
1. CI will then tag and draft a [new release](https://github.com/pantheon-systems/wp-redis/releases)
1. Confirm that the necessary assets are present in the newly created tag, and test on a WP install if desired.
1. Create a [new release](https://github.com/pantheon-systems/wp-redis/releases/new) using the tag created in the previous steps, naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from the `Changelog` section of [the readme](readme.txt) into the body of the release, including the links to the closed issues if applicable.
1. Open the release draft, review the changelog, and publish the release when ready.
1. Wait for the [_Release wp-redis plugin to wp.org_ action](https://github.com/pantheon-systems/wp-redis/actions/workflows/wordpress-plugin-deploy.yml) to finish deploying to the WordPress.org plugin repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
1. Check WordPress.org: Ensure that the changes are live on [the plugin repository](https://wordpress.org/plugins/wp-redis/). This may take a few minutes.
1. Following the release, prepare the next dev version with the following steps:
* `git checkout release`
* `git pull origin release`
* `git checkout main`
* `git rebase release`
* Update the version number in all locations, incrementing the version by one patch version, and add the `-dev` flag (e.g. after releasing `1.2.3`, the new verison will be `1.2.4-dev`)
* Update the version number in all locations, incrementing the version by one patch version, and add the `-dev` flag (e.g. after releasing `1.2.3`, the new version will be `1.2.4-dev`)
* Add a new `** X.Y.X-dev **` heading to the changelog
* `git add -A .`
* `git commit -m "Prepare X.Y.X-dev"`
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [mboynes](https://profiles.wordpress.org/mboynes), [Outlandish Josh](https://profiles.wordpress.org/outlandish-josh) [jspellman](https://profiles.wordpress.org/jspellman/) [jazzs3quence](https://profiles.wordpress.org/jazzs3quence/)
**Tags:** cache, plugin, redis
**Requires at least:** 3.0.1
**Tested up to:** 6.4.1
**Stable tag:** 1.4.4
**Tested up to:** 6.7.1
**Stable tag:** 1.4.5
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -96,7 +96,7 @@ This plugin is for the internal application object cache. It doesn't have anythi

### How do I disable the persistent object cache for a bad actor? ###

A page load with 2,000 Redis calls can be 2 full seonds of object cache transactions. If a plugin you're using is erroneously creating a huge number of cache keys, you might be able to mitigate the problem by disabling cache persistency for the plugin's group:
A page load with 2,000 Redis calls can be 2 full seconds of object cache transactions. If a plugin you're using is erroneously creating a huge number of cache keys, you might be able to mitigate the problem by disabling cache persistency for the plugin's group:

wp_cache_add_non_persistent_groups( array( 'bad-actor' ) );

Expand All @@ -108,6 +108,9 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a

## Changelog ##

### 1.4.5 (January 21, 2024) ###
* Support Relay in `check_client_dependencies()` correctly [[#471](https://github.com/pantheon-systems/wp-redis/pull/471)] (props @EarthlingDavey)

### 1.4.4 (November 27, 2023) ###
* Updates Pantheon WP Coding Standards to 2.0 [[#445](https://github.com/pantheon-systems/wp-redis/pull/445)]
* Handle duplicate keys in `get_multiple` function [[#448](https://github.com/pantheon-systems/wp-redis/pull/448)] (props @Souptik2001)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"pantheon-systems/pantheon-wp-coding-standards": "^2.0",
"pantheon-systems/pantheon-wordpress-upstream-tests": "dev-master",
"phpunit/phpunit": "^9",
"yoast/phpunit-polyfills": "^1.0",
"pantheon-systems/wpunit-helpers": "^1.0"
"yoast/phpunit-polyfills": "^3.0",
"pantheon-systems/wpunit-helpers": "^2.0"
},
"scripts": {
"lint": [
Expand Down
Loading

0 comments on commit 63e63f8

Please sign in to comment.