Support specifying an initialize sql file on TiDB' s first bootstrap#4862
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4862 +/- ##
==========================================
+ Coverage 59.43% 67.79% +8.36%
==========================================
Files 226 230 +4
Lines 25697 28793 +3096
==========================================
+ Hits 15273 19521 +4248
+ Misses 8969 7800 -1169
- Partials 1455 1472 +17
|
| return allErrs | ||
| } | ||
|
|
||
| func disallowMutateBootstrapSQLConfigMapName(old, new *v1alpha1.TiDBSpec, p *field.Path) field.ErrorList { |
There was a problem hiding this comment.
it seems there are no need to restrict this
There was a problem hiding this comment.
Because it only take effect at the first bootstrap, so updating the field makes no sense but make tidb restart.
| } | ||
|
|
||
| // disallowMutateBootstrapSQLConfigMapName checks if user mutate the bootstrapSQLConfigMapName field. | ||
| // Only allow to update bootstrapSQLConfigMapName from non-nil to nil. |
There was a problem hiding this comment.
why do we need to support updates from non-nil to nil?
There was a problem hiding this comment.
If the user deletes the bootstrap sql configmap and also wants to remove it from tidb pods.
This comment was marked as outdated.
This comment was marked as outdated.
|
/run-all-tests |
|
/test pull-e2e-kind-across-kubernetes |
1 similar comment
|
/test pull-e2e-kind-across-kubernetes |
|
/test pull-e2e-kind-serial |
|
Any ideas about the error in E2E? tidb-operator/tests/e2e/tidbcluster/across-kubernetes.go Lines 991 to 993 in 0ff338f Do we need to turn up the timeout? |
|
/test pull-e2e-kind-across-kubernetes |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 7702ee7 |
|
@fgksgf: Your PR was out of date, I have automatically updated it for you. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
/run-all-tests |
|
/test pull-e2e-kind-serial |
4 similar comments
|
/test pull-e2e-kind-serial |
|
/test pull-e2e-kind-serial |
|
/test pull-e2e-kind-serial |
|
/test pull-e2e-kind-serial |
What problem does this PR solve?
Support specifying an initialize sql file on TiDB' s first bootstrap.
Related PR: pingcap/tidb#35625
What is changed and how does it work?
BootstrapSQLConfigMapNamefield to tidb spec--initialize-sql-fileto tidb start scriptCode changes
Tests
BootstrapSQLConfigMapNamefield and set tidb config to enable SEMtest_adminand:show config where type='tidb' and name='security.enable-sem';select * from INFORMATION_SCHEMA.USER_PRIVILEGES;Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.