-
Notifications
You must be signed in to change notification settings - Fork 312
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
Fix: github workflow upload logs dir error #917
Fix: github workflow upload logs dir error #917
Conversation
Codecov Report
@@ Coverage Diff @@
## master #917 +/- ##
==========================================
- Coverage 55.22% 51.44% -3.79%
==========================================
Files 261 261
Lines 19253 19253
==========================================
- Hits 10632 9904 -728
- Misses 6917 7738 +821
+ Partials 1704 1611 -93
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
6cd5a66
to
bc012cb
Compare
@@ -66,6 +66,23 @@ jobs: | |||
# ref: https://stackoverflow.com/questions/43099116/error-the-input-device-is-not-a-tty | |||
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-dm/run.sh ${{matrix.cases}} | |||
|
|||
- name: Collect component log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why upload log? I think just replacing cat ./tests/*.log
with a correct log path will be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As cluster
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, How about add cat /path/to/*.log
too? By this way we can check what happened without downloading the logs when some error occurs in test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a good idea, as the debug file may be very large and may not be human-readable on the terminal, BTW, I'll give it a try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to adjust my strategy to look like this:if the test passed, no log were uploaded and print out; else upload and print it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's cool
5b48c1b
to
5c09a7c
Compare
run: | | ||
docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs | ||
ls ${{ env.working-directory }} | ||
cat /tiup-cluster/logs/*.log || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to move this line to the Output cluster debug log
step because its' name is Output cluster debug log
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your advice
5c09a7c
to
f4e1a4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
What problem does this PR solve?
As #908 set the default log dir to
$TIUP_HOME/logs
, we need to change the control's log path. And one more thing, the SSHD process was not activated in hosttiup-cluster-control
, and the scp always failed, such as:Replace the
scp
with local cp for control's node.What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release notes: