Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infoschema: Don't truncate versions #45222

Merged
merged 2 commits into from Jul 10, 2023

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Jul 6, 2023

What problem does this PR solve?

Issue Number: ref #16302

Problem Summary:

Before (7.3.0-alpha):

mysql> TABLE information_schema.CLUSTER_INFO;
+------+-----------------+-----------------+-------------+------------------------------------------+---------------------+---------------+-----------+
| TYPE | INSTANCE        | STATUS_ADDRESS  | VERSION     | GIT_HASH                                 | START_TIME          | UPTIME        | SERVER_ID |
+------+-----------------+-----------------+-------------+------------------------------------------+---------------------+---------------+-----------+
| tidb | 127.0.0.1:4000  | 127.0.0.1:10080 | 7.3.0-alpha | 8c71149116f9439713604d3bf737156a2735b963 | 2023-07-06 15:14:07 | 12.962112656s |   1561139 |
| pd   | 127.0.0.1:2379  | 127.0.0.1:2379  | 7.2.0       | 0934e641129d8bac3c5975372b2ce492b81fd9db | 2023-07-06 15:13:54 | 25.962125837s |         0 |
| tikv | 127.0.0.1:20160 | 127.0.0.1:20180 | 7.2.0       | 12ce5540f9e8f781f14d3b3a58fb9442f03b6b29 | 2023-07-06 15:13:57 | 22.962131038s |         0 |
+------+-----------------+-----------------+-------------+------------------------------------------+---------------------+---------------+-----------+
3 rows in set (0.00 sec)

After (7.3.0-alpha-128-g967699a509-dirty):

mysql> TABLE information_schema.CLUSTER_INFO;
+------+-------------------+--------------------+-----------------------------------+------------------------------------------+---------------------------+--------------+-----------+
| TYPE | INSTANCE          | STATUS_ADDRESS     | VERSION                           | GIT_HASH                                 | START_TIME                | UPTIME       | SERVER_ID |
+------+-------------------+--------------------+-----------------------------------+------------------------------------------+---------------------------+--------------+-----------+
| tidb | 192.168.1.54:4000 | 192.168.1.54:10080 | 7.3.0-alpha-128-g967699a509-dirty | 967699a50938848bcd3504a43856d5487af2d0b3 | 2023-07-06T15:24:54+02:00 | 552.343537ms |         1 |
| tikv | store1            |                    |                                   |                                          |                           |              |         0 |
+------+-------------------+--------------------+-----------------------------------+------------------------------------------+---------------------------+--------------+-----------+
2 rows in set (0.00 sec)

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

The versions in `information_schema.cluster_info` are no longer truncated on the first `-`.

@ti-chi-bot ti-chi-bot bot added release-note size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 6, 2023
@dveeden dveeden requested a review from crazycs520 July 6, 2023 13:33
@tiprow
Copy link

tiprow bot commented Jul 6, 2023

Hi @dveeden. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions 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 kubernetes/test-infra repository.

@dveeden
Copy link
Contributor Author

dveeden commented Jul 6, 2023

/ok-to-test

@@ -782,7 +782,7 @@ func TestFormatVersion(t *testing.T) {
"5.7.25-TiDB-v4.0.0-beta-446-g5268094af",
"5.7.25-TiDB-",
"5.7.25-TiDB-v4.0.0-TiDB-446"}
defaultRes := []string{"None", "8.0.18", "8.0.18-beta.1", "4.0.0-beta", "", "4.0.0-TiDB"}
defaultRes := []string{"None", "8.0.18", "8.0.18-beta.1", "4.0.0-beta-446-g5268094af", "", "4.0.0-TiDB-446"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding two more versions than modifying existed cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't modify the existing test cases, I only modified the results.

Input Previous output New output
"5.7.25-TiDB-v4.0.0-beta-446-g5268094af" "4.0.0-beta"" "4.0.0-beta-446-g5268094af"
"5.7.25-TiDB-v4.0.0-TiDB-446" "4.0.0-TiDB" "4.0.0-TiDB-446"

I've pushed a88e55e to refactor the test and make this a bit more obvious.

@Deardrops Deardrops removed their request for review July 10, 2023 06:38
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 10, 2023
@dveeden dveeden requested a review from xhebox July 10, 2023 09:49
@dveeden
Copy link
Contributor Author

dveeden commented Jul 10, 2023

/test tiprow_fast_test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

@dveeden: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test canary-scan-security
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-e2e-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test unit-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test

In response to this:

/test tiprow_fast_test

Instructions 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 kubernetes/test-infra repository.

@dveeden
Copy link
Contributor Author

dveeden commented Jul 10, 2023

/retest

1 similar comment
@hawkingrei
Copy link
Member

/retest

@tiprow
Copy link

tiprow bot commented Jul 10, 2023

@dveeden: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tiprow_fast_test a88e55e link true /test tiprow_fast_test

Full PR test history. Your PR dashboard.

Instructions 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 kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xhebox, zimulala

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-07-10 09:58:18.622690487 +0000 UTC m=+325990.393029194: ☑️ agreed by xhebox.
  • 2023-07-10 11:26:32.201266821 +0000 UTC m=+331283.971605533: ☑️ agreed by zimulala.

@ti-chi-bot ti-chi-bot bot merged commit 09dfc64 into pingcap:master Jul 10, 2023
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants