fix(mysql): fail update-parameter.sh on real SET GLOBAL errors#3080
Draft
weicao wants to merge 3 commits into
Draft
fix(mysql): fail update-parameter.sh on real SET GLOBAL errors#3080weicao wants to merge 3 commits into
weicao wants to merge 3 commits into
Conversation
Previously only ERROR 1045 failed the reconfigure exec action; every other error (unknown variable, invalid value, connection failure) was silently ignored and the Ops reported success while the running value never changed. Now tolerate exactly the two legitimate cannot-apply- online cases with explicit logs (1238 read-only -> effective after restart via rendered my.cnf; 1193 on loose_-prefixed params -> plugin not loaded), and exit non-zero on everything else. loose_ prefix strip is now anchored to the prefix instead of a global substitution. Fixes #3079 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3080 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 144 145 +1
Lines 23013 23126 +113
======================================
- Misses 23013 23126 +113 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
10 cases: numeric/suffix/quoting/dash-normalization apply paths with query capture, tolerated 1238 and loose_+1193 paths, and hard-failure paths (bare 1193, 1231, 1045, 2003). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A reconfigure of a variable removed in MySQL 8.4 (expire_logs_days, master_info_repository, etc.) previously fell through to the config file path and landed in my.cnf, crash-looping 8.4 on restart. Reject such a request by name before SET GLOBAL when the server is >= 8.4, with a clear reason surfaced in the action output. The SET GLOBAL unknown-variable error remains a backstop; 8.0 keeps the legacy variables valid. Adds ShellSpec coverage for 8.4-reject / 8.4-accept-non-removed / 8.0-legacy. Refs #3085 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes #3079.
Per review discussion: reconfigure success cannot be judged from this single SET GLOBAL alone (parameters have primary-only / all-nodes / config-then-restart modes), so this change does NOT alter framework dispatch. It only separates "legitimately cannot apply online" from real errors:
loose_-prefixed parameter: exit 0 — MySQL loose semantics (plugin not loaded), mirrored here. The loose_ strip is now prefix-anchored (${paramName#loose_}) instead of a global substring replace.Validation:
bash -npass. Runtime matrix for the mysql team via kubeblocks-tests before undraft: dynamic param happy path; static param via dynamic path (expect tolerated + restart-effective); invalid value (expect Ops fails); loose_ param without plugin (expect skipped).🤖 Generated with Claude Code