-
Notifications
You must be signed in to change notification settings - Fork 968
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
[IOTDB-1197] add iotdb-client-go as a git submodule of IoTDB repo #2792
Merged
Conversation
This file contains 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
jixuan1989
changed the title
add iotdb-client-go as a git submodule of IoTDB repo
[IOTDB-1197] add iotdb-client-go as a git submodule of IoTDB repo
Mar 10, 2021
Kudos, SonarCloud Quality Gate passed! |
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.
From this PR on, the IoTDB-client-go will be as a git submodule of IoTDB repo.
( apache/iotdb-client-go#17 is sychned with this pr.)
How to get source codes of the submodule
when you git clone or git pull the repo, the git command does not clone/pull codes in the submodules automatically;
(1) for the first time, you need to run: cd client-go && git submodule update --init
(2) for the 2nd time or the future usage, just run git submodule update to get latest codes of the submodule.
Notice: when you pull the codes, the submodule is on an anonymous branch. you need to use
git checkout <existing branch>
orgit checkout -b <new branch>
in the client-go folder.How to modify codes of the submodule
git add
,git commit
andgit push
command;git status
at this time, you will find it showsclient-go
is modified, so just rungit add client-go
to let the parent repo knows the submodule's repo is updated.Notice,
git checkout
to a new/existing branch on client-go folder will be considered as a modification operation. And, if you want IoTDB repo knows you want to link a new branch of client-go to iotdb's repo, you can rungit checkout
command in client-go folder.Example
Scenario:
I want to modify the Thrift definition in IoTDB, and need to maintain the go client.
Step 1: modify the thrift file and modify codes in IoTDB.
Step 2: cd client-go, checkout to a new branch, modify codes..
(Especially, the client-go has to copy generated thrift codes to client-go/rpc/, there are two choices to do that:
a. run
mvn generate-sources
in iotdb's folder (not supported now in this PR. will do it later)b. cd client-go, run
make generate
)
Step 3: in client-go, git add, git commit and git push
Step 4: int IoTDB's root folder, git add, git commit and git push
Step 5: submit a PR to IoTDB, and wait for the success of CI in IoTDB's repo;
Step 6: If success, then submit a PR to iotdb-client-go repo, and paste the PR address in IoTDB. (The github action in iotdb-client-go will fail because it just clone codes of iotdb's master branch. However, our modifications of IoTDB are in another branch. So, we need the github action result in IoTDB to show the correction of the modifications in IoTDB-client-go).
Step 7: After all reviewers approve the PRs in both IoTDB and IoTDB-client-go,
Step 7.1. Merge PR in iotdb-client-go first, and
Step 7.2. cd client-go folder, checkout back to the main branch (the iotdb-client-go repo uses
main
ratherthanmaster
). Then git add, git commit and git pushStep 7.3 After that, send notification on your PR and let others merge the PR in IoTDB