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

printer: print commit hash version for extensions #43095

Merged
merged 9 commits into from
Apr 20, 2023

Conversation

CbcWestwolf
Copy link
Member

@CbcWestwolf CbcWestwolf commented Apr 17, 2023

What problem does this PR solve?

Issue Number: close #43096

Problem Summary:

What is changed and how it works?

Add a new item for the printer to print the potential commit hash value of the enterprise extension.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code
shell> make server

tidb > select tidb_version() \G
...
Store: unistore
...

shell> make enterprise-server
...-X "github.com/pingcap/tidb/util/versioninfo.TiDBEnterpriseExtensionVersion=216228961c416197dbd92e12ba5cedf5d64cf5eb"...

tidb> select tidb_version() \G
...
Store: unistore
Enterprise Extension Commit Hash: 216228961c416197dbd92e12ba5cedf5d64cf5eb
...

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.

Add a new item in tidb info to show the version of the enterprise extension.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 17, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lcwangchao
  • xhebox

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot
Copy link
Member

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Apr 17, 2023
@CbcWestwolf CbcWestwolf changed the title printer: add hash version for audit log extension printer: add hash version for extensions Apr 17, 2023
@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Apr 17, 2023
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 17, 2023
@CbcWestwolf CbcWestwolf changed the title printer: add hash version for extensions printer: print commit hash version for extensions Apr 17, 2023
@CbcWestwolf CbcWestwolf marked this pull request as ready for review April 17, 2023 12:50
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 17, 2023
Makefile.common Outdated
@@ -41,6 +41,12 @@ ifneq "$(TIDB_EDITION)" "Enterprise"
endif
endif

ENTERPRISE_EXTENSION_VERSION :=
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it is ENTERPRISE_EXTENSION_GIT_HASH in fact ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, ENTERPRISE_EXTENSION_GIT_HASH is more exact. Let me correct it.

@CbcWestwolf
Copy link
Member Author

/test unit-test

1 similar comment
@CbcWestwolf
Copy link
Member Author

/test unit-test

util/printer/printer.go Show resolved Hide resolved
Makefile.common Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT2 Indicates that a PR has LGTM 2. label Apr 19, 2023
@CbcWestwolf
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 6a5fc14

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 19, 2023
@CbcWestwolf
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 19, 2023
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Apr 19, 2023
@hawkingrei
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 47ed960

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 19, 2023
@hawkingrei
Copy link
Member

/retest

@hawkingrei
Copy link
Member

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 19, 2023
@CbcWestwolf
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 19, 2023
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Apr 20, 2023
@CbcWestwolf
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 20, 2023
@CbcWestwolf
Copy link
Member Author

CbcWestwolf commented Apr 20, 2023

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 5f758c4

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 20, 2023
@CbcWestwolf
Copy link
Member Author

/test unit-test

@ti-chi-bot ti-chi-bot merged commit b2853fd into pingcap:master Apr 20, 2023
@CbcWestwolf CbcWestwolf deleted the audit-log-version branch April 20, 2023 06:30
CbcWestwolf added a commit to CbcWestwolf/tidb that referenced this pull request May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show version info for the audit log in tidb_version
5 participants