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

*(both): replace set -e to set -ru and disable some unstable test #4160

Merged
merged 10 commits into from
Dec 31, 2021

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Dec 30, 2021

What problem does this PR solve?

Issue Number: ref #4159

close #4158

What is changed and how it works?

replace ^set -e\n to ^set -eu\n to reduce the chance accidentally format the whole disk.

Meaning of set options can be found in https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html. When we execute some internal shell scripts, both variables in WORK_DIR=$OUT_DIR/$TEST_NAME is not set thus empty strings, so a following rm -rf $WORK_DIR will become rm -rf /. set -u can found unbound variables and stop execution.

I added an echo to show what's going to execute

before:

$ bash tests/integration_tests/batch_add_table/run.sh 
rm -rf / && mkdir -p /

after

$ bash tests/integration_tests/batch_add_table/run.sh
tests/integration_tests/batch_add_table/run.sh: line 7: OUT_DIR: unbound variable

Check List

Tests

  • No code

Release note

 `None`.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 30, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Ehco1996
  • lonng

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 ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Dec 30, 2021
@lance6716
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 30, 2021
@lance6716
Copy link
Contributor Author

/cc @wjhuang2016

@codecov-commenter
Copy link

codecov-commenter commented Dec 30, 2021

Codecov Report

Merging #4160 (143d5a9) into master (08da001) will increase coverage by 0.2471%.
The diff coverage is 65.7318%.

Flag Coverage Δ
cdc 58.9996% <67.6148%> (+0.3548%) ⬆️
dm 52.3548% <58.1497%> (+0.1002%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             master      #4160        +/-   ##
================================================
+ Coverage   55.1722%   55.4193%   +0.2470%     
================================================
  Files           485        489         +4     
  Lines         59829      60607       +778     
================================================
+ Hits          33009      33588       +579     
- Misses        23484      23623       +139     
- Partials       3336       3396        +60     

@lance6716
Copy link
Contributor Author

/run-dm-integration-test
/run-integration-test
/run-kafka-integration-test

@lonng
Copy link
Contributor

lonng commented Dec 30, 2021

Prefer to add the link https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html to the PR description as the reference of why we add -u parameter.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 30, 2021
@lance6716
Copy link
Contributor Author

/run-all-tests

@lance6716
Copy link
Contributor Author

/run-all-tests

@lance6716

This comment has been minimized.

@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 Dec 30, 2021
@lance6716

This comment has been minimized.

@lance6716
Copy link
Contributor Author

/unhold
/run-all-tests

@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 Dec 30, 2021
Copy link
Contributor

@Ehco1996 Ehco1996 left a comment

Choose a reason for hiding this comment

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

LGTM thank for this work

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Dec 31, 2021
@lance6716
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 4fee668

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 31, 2021
@lance6716
Copy link
Contributor Author

/merge

@lance6716
Copy link
Contributor Author

/run-kafka-integration-test

@lance6716
Copy link
Contributor Author

/run-dm-integration-test
/run-verify

@lance6716
Copy link
Contributor Author

/run-dm-integration-test

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Dec 31, 2021
@lance6716
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 51da496

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 31, 2021
@lance6716 lance6716 changed the title *(both): replace set -e to set -ru *(both): replace set -e to set -ru and disable some unstable test Dec 31, 2021
@lance6716
Copy link
Contributor Author

/run-dm-integration-test
/run-kafka-integration-test

@lance6716
Copy link
Contributor Author

/run-dm-integration-test

@lance6716
Copy link
Contributor Author

/run-kafka-integration-test

@lance6716
Copy link
Contributor Author

seems downstream_diff_index always fails …

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Dec 31, 2021
@lance6716
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: f2c509d

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 31, 2021
@lance6716
Copy link
Contributor Author

temporary removed tests will be enabled in #4172

@ti-chi-bot
Copy link
Member

@lance6716: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@lance6716
Copy link
Contributor Author

/run-leak-test

@lance6716
Copy link
Contributor Author

/run-verify

@lance6716
Copy link
Contributor Author

/run-kafka-integration-test

@lance6716
Copy link
Contributor Author

/run-verify

1 similar comment
@lance6716
Copy link
Contributor Author

/run-verify

@ti-chi-bot ti-chi-bot merged commit 95ddc8a into pingcap:master Dec 31, 2021
@lance6716 lance6716 deleted the set-u branch October 13, 2022 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 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.

dm-syncer IT is not stable
5 participants