Conversation
WalkthroughAdds editor/lint configs and tooling updates, forwards cspell export and extends dictionaries, sets Playwright download host, upgrades dev deps and adds lint script, restructures one YAML example and updates troubleshooting for MySQL‑MGR columns, and applies widespread doc formatting/heading adjustments. Changes
Sequence Diagram(s)(Skipped — changes are configuration and documentation edits; no new runtime control flow to diagram.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 7
🔭 Outside diff range comments (2)
docs/en/functions/13_restart.mdx (1)
31-45: Fix shell quoting to ensure date substitution works in kubectl patchThe current command uses single quotes around the entire
--patchpayload and single quotes around the$(date ...)expression, which prevents shell substitution and breaks quoting.Use double quotes for the outer
--patchpayload and avoid single quotes inside the$(date ...)format:- kubectl patch mysql -n <namespace> <name> --type='merge' --patch ' + kubectl patch mysql -n <namespace> <name> --type='merge' --patch " spec: pxc: pxc: annotations: - percona.com/Restart-time: '$(date -u +'%Y-%m-%dT%H:%M:%SZ')' + percona.com/Restart-time: '$(date -u +%Y-%m-%dT%H:%M:%SZ)' proxysql: annotations: - percona.com/Restart-time: '$(date -u +'%Y-%m-%dT%H:%M:%SZ')' - ' + percona.com/Restart-time: '$(date -u +%Y-%m-%dT%H:%M:%SZ)' + "Alternative (more robust): use a heredoc to avoid complex quoting.
docs/en/trouble_shooting/pxc2mgr.mdx (1)
485-492: Fix broken multi-line SQL: current wrapping corrupts the INSERTThe interactive INSERT is split mid-string and with stray quotes/newlines, making it invalid when copied.
- mysql> INSERT INTO `user` VALUES ('%','test_user_2', ... 'N - ','2023-07-03 07:13:13',NULL,'N', 'Y', 'Y', NULL, NULL, NULL, NULL),('%','test_user_3', ... 'N - ','2023-07-03 07:13:13',NULL,'N', 'Y', 'Y', NULL, NULL, NULL, NULL),('%','test_user_1', ... NUL - L, NULL); + mysql> INSERT INTO `user` VALUES + ('%','test_user_2', ... 'N','2023-07-03 07:13:13',NULL,'N','Y','Y',NULL,NULL,NULL,NULL), + ('%','test_user_3', ... 'N','2023-07-03 07:13:13',NULL,'N','Y','Y',NULL,NULL,NULL,NULL), + ('%','test_user_1', ... 'N','2023-07-03 07:14:52',NULL,'N','Y','Y',NULL,NULL,NULL,NULL);Alternatively, keep it as a single line or wrap across lines only at tuple boundaries, never inside quoted strings.
🧹 Nitpick comments (8)
docs/en/functions/10_stop.mdx (1)
20-20: Align heading levels across tabsCLI headings are now H3, but the corresponding Web Console headings remain H4. Consider making both tabs consistent (H3) to match repo-wide formatting changes and improve ToC structure.
Example updates outside the changed lines:
- Change "#### Stop Instance" (Line 40) to "### Stop Instance"
- Change "#### Start Instance" (Line 62) to "### Start Instance"
Ensure doom lint rules for heading levels within Tabs are consistent across docs (compare with 25_log.mdx).
Also applies to: 29-29
.editorconfig (1)
1-10: Solid baseline editor configurationThese settings are sensible and align with consistent formatting across the repo.
If you encounter issues with MDX code fences requiring trailing spaces, consider adding a block to disable trim for specific filetypes/sections.
docs/en/functions/25_log.mdx (1)
14-16: Consistent indentation for fenced code blocks under TabsIndentation here looks correct for MDX nesting and should satisfy linting. Ensure other pages (e.g., stop/start) follow the same convention for consistency.
Run doom lint across docs to confirm unified formatting is applied everywhere.
Also applies to: 20-22
eslint.config.mjs (1)
1-3: Make URL to docs unambiguous and reusableUse an explicit relative directory URL to avoid edge-cases where "docs" could be treated as a file segment. This also improves readability.
import doom from '@alauda/doom/eslint' -export default doom(new URL('docs', import.meta.url)) +const docsUrl = new URL('./docs/', import.meta.url) +export default doom(docsUrl)docs/en/functions/03_para.mdx (1)
12-12: Update MySQL reference to 8.0 to align with PXC 8.0 docsThe MySQL link currently points to 5.7 while the Percona link targets 8.0. Recommend updating to the 8.0 reference for consistency.
-For more parameter information, please refer to the [MySQL Official Website](https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html) and [Percona Official Website](https://docs.percona.com/percona-xtradb-cluster/8.0/) . +For more parameter information, please refer to the [MySQL Official Website](https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html) and [Percona Official Website](https://docs.percona.com/percona-xtradb-cluster/8.0/).docs/en/functions/05_access.mdx (1)
34-36: Optional: account for multiple ports in jsonpathIf the Service exposes multiple ports, selecting ports[0] may be ambiguous. Consider selecting by name for robustness.
- kubectl get svc -n $namespace $name-proxysql -o jsonpath='{.spec.ports[0].nodePort}' + kubectl get svc -n $namespace $name-proxysql -o jsonpath="{.spec.ports[?(@.name=='mysql')].nodePort}"docs/en/trouble_shooting/pxc2mgr.mdx (2)
90-107: Avoid real passwords in examplesFor security hygiene and to prevent copy-paste of real-looking secrets, prefer placeholders or env vars in commands.
-... -p'jtr8eO0kS?lq' ... +... -p'<mysql_root_password>' ...Similarly adjust other occurrences within changed lines.
470-472: Good: Clarifies the six extra mysql.user fields for MGRThe appended values make the example compatible with MGR. Consider using an explicit column list as suggested above.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (20)
.cspell/compound.txt(1 hunks).cspell/k8s.txt(1 hunks).editorconfig(1 hunks).env.yarn(1 hunks)cspell.config.mjs(1 hunks)docs/en/functions/01_create_instance.mdx(4 hunks)docs/en/functions/03_para.mdx(3 hunks)docs/en/functions/05_access.mdx(3 hunks)docs/en/functions/07_delete_instance.mdx(1 hunks)docs/en/functions/10_stop.mdx(2 hunks)docs/en/functions/13_restart.mdx(2 hunks)docs/en/functions/15_back_restore.mdx(5 hunks)docs/en/functions/18_scheduling.mdx(2 hunks)docs/en/functions/20_user.mdx(3 hunks)docs/en/functions/25_log.mdx(1 hunks)docs/en/functions/35_monitor.mdx(1 hunks)docs/en/intro.mdx(1 hunks)docs/en/trouble_shooting/pxc2mgr.mdx(6 hunks)eslint.config.mjs(1 hunks)package.json(1 hunks)
🔇 Additional comments (21)
.cspell/k8s.txt (1)
1-1: LGTM: Kubernetes term whitelistingAdding "mysqls" to the K8s dictionary looks appropriate for CRD pluralization and avoids false positives.
.cspell/compound.txt (1)
1-2: LGTM: Domain-specific compound termsAdding these compound words reduces noise from the spell checker for Percona CRDs.
.env.yarn (1)
1-1: Playwright dependency detected – PLAYWRIGHT_DOWNLOAD_HOST is validI confirmed in yarn.lock that playwright, @playwright/browser-chromium (and related packages) are installed, so pointing to an npm mirror for Playwright binaries is justified. No changes needed here.
docs/en/functions/35_monitor.mdx (1)
12-12: LGTM: Improved section hierarchyPromoting "Performance Monitoring Panel" to H2 under the H1 title clarifies structure and ToC.
docs/en/intro.mdx (1)
20-20: LGTM: Consistent heading hierarchy for featuresH2 for the section and H3 for items improves readability and ToC consistency across docs.
If other pages link to these anchors, confirm that slug changes from heading edits didn’t break cross-links.
Also applies to: 22-49
cspell.config.mjs (1)
1-1: LGTM: clean re-exportThe default re-export is concise and matches doom’s cspell integration.
docs/en/functions/03_para.mdx (1)
37-68: Heading level normalization looks goodPromoting “Using Recommended Templates…”, “Updating Parameters”, “Procedure”, and “Useful Note” improves ToC scannability and consistency with adjacent docs.
docs/en/functions/18_scheduling.mdx (1)
51-59: LGTM: punctuation normalizationUsing straight quotes improves consistency across docs and avoids rendering issues in some Markdown engines.
docs/en/functions/20_user.mdx (1)
19-68: LGTM: heading levels aligned with site structurePromoting the Web Console subsections to H3 improves ToC and readability.
docs/en/functions/05_access.mdx (4)
15-17: LGTM: CLI in-cluster access command preserved and correctly fencedFormatting-only change; command remains correct and copy-pasteable.
21-31: LGTM: NodePort enable patch remains validThe kubectl patch content is intact; re-indentation won’t affect rendering.
46-55: LGTM: LoadBalancer enable patch preservedOnly indentation changed; instructions remain correct.
59-60: Consistent heading hierarchy across Web Console tabThe adjusted heading levels look consistent. No content change detected.
Also applies to: 69-71, 80-86
docs/en/functions/15_back_restore.mdx (2)
25-41: LGTM: Formatting-only changes; commands remain validIndented code fences and bullets render properly under Tabs; commands and YAML structures unchanged.
Also applies to: 54-66, 70-81, 85-99, 103-105
125-206: Web Console headings re-leveled; content intactPresentation updates only; no impact to procedures.
docs/en/trouble_shooting/pxc2mgr.mdx (3)
44-60: LGTM: Primary-key discovery queryQuery is correct and portable; indentation tweaks only.
303-305: LGTM: Retrieving MYSQL_ROOT_PASSWORD via env is fineFormatting-only change; command remains correct.
333-335: LGTM: Size checks preservedSimple du checks; no issues.
Also applies to: 441-443
docs/en/functions/01_create_instance.mdx (3)
20-28: LGTM: Secret creation blockRe-indented; flags and escaping look correct.
41-245: Expanded YAML example looks consistent and more explicitThe added fields (secretsName, runAsRoot, upgradeOption, version) and PVC resource blocks improve clarity. No semantic issues seen.
266-267: LGTM: Watch command remains validFormatting-only change; instruction is clear.
There was a problem hiding this comment.
Actionable comments posted: 4
🔭 Outside diff range comments (1)
docs/en/trouble_shooting/pxc2mgr.mdx (1)
470-472: Don’t INSERT directly into mysql.user on MySQL 8.0 — use CREATE USER/GRANT or mysqlpump --users.Direct DML on system tables is discouraged and fragile across versions/patches. Prefer exporting users/grants and replaying them.
Options:
- Source (PXC): export users/grants with mysqlpump
mysqlpump --users --include-users='^test_user_(1|2|3)$' > users.sqlThen apply users.sql on MGR.
- Or recreate explicitly:
CREATE USER 'test_user_1'@'%' IDENTIFIED WITH mysql_native_password BY '';
GRANT ... ON ... TO 'test_user_1'@'%';
FLUSH PRIVILEGES;- If you keep the INSERT approach for historical reasons, ensure the explicit column list matches target schema and values (including the 6 new fields) and validate on the exact MGR version first.
♻️ Duplicate comments (2)
docs/en/trouble_shooting/pxc2mgr.mdx (1)
458-460: Align these INSERT examples with the later 6-column MGR requirement and use explicit column list.These base INSERTs omit the 6 extra MGR fields but later you append them. Show a single, correct form with an explicit column list to avoid schema drift.
Sketch:
INSERT INTO `user` ( Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv, Trigger_priv, Create_tablespace_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions, max_updates, max_connections, max_user_connections, plugin, authentication_string, password_expired, password_last_changed, password_lifetime, account_locked, Create_role_priv, Drop_role_priv, Password_reuse_history, Password_reuse_time, Password_require_current, User_attributes ) VALUES (..., 'Y','Y', NULL, NULL, NULL, NULL), (...), (...);docs/en/functions/01_create_instance.mdx (1)
59-60: Quote the mysql prompt; use single quotes to keep backslashes literalThe unquoted value contains parentheses, backslashes, a colon, and a trailing “>”. Quote it to avoid YAML/plain-scalar pitfalls. Single quotes avoid YAML escape processing for \u, \h, \d.
- prompt: mysql(\u@\h:\d) > + prompt: 'mysql(\u@\h:\d) >'
🧹 Nitpick comments (6)
.cspell/compound.txt (1)
1-2: Consider adding singular forms and/or scoping to k8s dictionarySingular forms often appear in Kind fields (e.g., PerconaXtraDBClusterBackup/Restore). Preemptively allow-list them to avoid future lint noise; alternatively, move these to the k8s-specific dictionary to keep domain terms together.
Suggested additions:
perconaxtradbclusterbackups perconaxtradbclusterrestores +perconaxtradbclusterbackup +perconaxtradbclusterrestoredocs/en/trouble_shooting/pxc2mgr.mdx (3)
64-66: Typo fixed (BIGINT) — consider UNSIGNED for auto-increment PK.Good catch on BITINT → BIGINT. For typical surrogate keys, UNSIGNED avoids halving the positive range.
- ALTER TABLE table_name ADD COLUMN id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY; + ALTER TABLE table_name + ADD COLUMN id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY;Note: If a suitable unique key already exists, prefer adding a primary key constraint over introducing a new surrogate key.
90-95: Optional: prefer label selectors over grep.Using label selectors is less brittle than piping and grep.
Example:
- If labeled: kubectl -n demo-ds1 get pods -l app.kubernetes.io/name=proxysql -o wide
- Otherwise, current grep approach is fine.
441-441: Typo: “backcup” → “backup” (apply across file and resource names).Multiple occurrences (pods, PVC/PV names, paths). Consistency improves searchability and avoids copy/paste errors.
Examples to adjust:
- mgr-backcup-pv → mgr-backup-pv
- mgr-backcup-pvc → mgr-backup-pvc
- mgr-backcup-... → mgr-backup-...
- /var/lib/mysql/..._mysql.user.sql paths accordingly
docs/en/functions/01_create_instance.mdx (2)
41-52: Avoid confusing namespace duplicationYou set metadata.namespace in the manifest and also pass -n to kubectl. Both work, but it’s redundant and can confuse readers.
- Either keep metadata.namespace and drop -n from the apply command, or
- Remove metadata.namespace and rely on kubectl -n.
212-217: Resource quantity consistency (optional)Kubernetes accepts both quoted and unquoted resource quantities, but consistency improves readability and avoids YAML implicit typing surprises.
- Consider using quoted strings for all cpu/memory quantities (e.g., "500m", "512Mi", "2", "4Gi") or consistently unquoted forms across the snippet.
Also applies to: 227-233
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (20)
.cspell/compound.txt(1 hunks).cspell/k8s.txt(1 hunks).editorconfig(1 hunks).env.yarn(1 hunks)cspell.config.mjs(1 hunks)docs/en/functions/01_create_instance.mdx(4 hunks)docs/en/functions/03_para.mdx(3 hunks)docs/en/functions/05_access.mdx(3 hunks)docs/en/functions/07_delete_instance.mdx(1 hunks)docs/en/functions/10_stop.mdx(2 hunks)docs/en/functions/13_restart.mdx(2 hunks)docs/en/functions/15_back_restore.mdx(5 hunks)docs/en/functions/18_scheduling.mdx(2 hunks)docs/en/functions/20_user.mdx(3 hunks)docs/en/functions/25_log.mdx(1 hunks)docs/en/functions/35_monitor.mdx(1 hunks)docs/en/intro.mdx(1 hunks)docs/en/trouble_shooting/pxc2mgr.mdx(6 hunks)eslint.config.mjs(1 hunks)package.json(1 hunks)
✅ Files skipped from review due to trivial changes (7)
- docs/en/functions/35_monitor.mdx
- docs/en/functions/13_restart.mdx
- docs/en/functions/05_access.mdx
- docs/en/functions/25_log.mdx
- docs/en/functions/18_scheduling.mdx
- docs/en/functions/15_back_restore.mdx
- docs/en/intro.mdx
🚧 Files skipped from review as they are similar to previous changes (10)
- eslint.config.mjs
- .cspell/k8s.txt
- package.json
- cspell.config.mjs
- .editorconfig
- docs/en/functions/20_user.mdx
- docs/en/functions/10_stop.mdx
- .env.yarn
- docs/en/functions/03_para.mdx
- docs/en/functions/07_delete_instance.mdx
🔇 Additional comments (4)
.cspell/compound.txt (1)
1-2: CSpell: Adding PerconaXtraDBCluster CRD plural resource names looks goodThese entries are valid CRD resource names; this should silence false positives in docs/manifests.
docs/en/trouble_shooting/pxc2mgr.mdx (1)
333-333: No action needed.Change looks fine.
docs/en/functions/01_create_instance.mdx (2)
75-75: No change needed fordefault_time_zoneoffset format
MySQL 5.7 accepts+8:00(leading zero is optional) and will normalize it to+08:00internally. You can leave the example’sdefault_time_zone: "+8:00"as-is.
71-71: Confirm unusually high connect_timeout (8 hours)The snippet in docs/en/functions/01_create_instance.mdx (line 71) sets:
connect_timeout: "28800"• MySQL 5.7’s default connect_timeout is 10 seconds and applies only to the initial handshake.
• An 8 hour timeout can tie up server threads, mask genuine network/DNS issues, and increase DoS risk.
• If you intended to control idle/session timeouts, those are already managed by interactive_timeout and wait_timeout (both default 28800s).Please confirm whether you truly need such a long handshake timeout. Otherwise, consider reducing it to a modest value (e.g. 15–30 s) and relying on:
- wait_timeout/interactive_timeout for idle sessions
- client‐side timeouts or connection pooling for long queries
Suggested diff:
- connect_timeout: "28800" + connect_timeout: "30" # increase only as needed for high-latency links
Summary by CodeRabbit
Documentation
Chores