ci: enable tmate when in debug mode
we don't want to wait for extra 10min once the ci passed,
so we'll add a check if `debug-ci` label is added or debug runner
is triggered from UI then only start tmate. Also, updaing the
development doc and rook test doc.
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit a223b6777b)
This commit is contained in:
1 parent
71c151cca4
commit
ddcb9efa9a
3 files changed
+14
-7
No files matched your search
@@ -9,6 +9,7 @@ runs:
|
||||
steps:
|
||||
- name: consider debugging
|
||||
shell: bash --noprofile --norc -eo pipefail -x {0}
|
||||
if: runner.debug || contains(github.event.pull_request.labels.*.name, 'debug-ci')
|
||||
run: |
|
||||
# Enable tmate only in the Rook fork, where the USE_TMATE secret is set in the repo, or if the action is re-run
|
||||
if [ "$GITHUB_REPOSITORY_OWNER" = "rook" ] || [ -n "${{ inputs.use-tmate }}" ] || [ "$GITHUB_RUN_ATTEMPT" -gt 1 ]; then
|
||||
|
||||
@@ -195,8 +195,8 @@ to the [upstream Rook repository](https://github.com/rook/rook).
|
||||
|
||||
Before opening the PR:
|
||||
|
||||
- If there are code changes, add unit tests and verify that all unit tests are passing. See [Unit Tests](#unit-tests) below on running unit tests.
|
||||
- Rebase on the latest upstream changes
|
||||
* If there are code changes, add unit tests and verify that all unit tests are passing. See [Unit Tests](#unit-tests) below on running unit tests.
|
||||
* Rebase on the latest upstream changes
|
||||
|
||||
### Regression Testing
|
||||
|
||||
@@ -245,7 +245,14 @@ Common cases that may need tests:
|
||||
Rook's upstream continuous integration (CI) tests will run integration tests against your changes
|
||||
automatically.
|
||||
|
||||
Integration tests will be run in Github actions. If an integration test fails, a tmate session will be available for troubleshooting for a short time. See the action details for an ssh connection to the Github runner.
|
||||
## Tmate Session
|
||||
|
||||
Integration tests will be run in Github actions. If an integration test fails, enable a tmate session to troubleshoot the issue by one of the following steps:
|
||||
|
||||
* Restart the CI action and click the "Enable debug logging" checkbox from the github UI, or
|
||||
* Add the label `debug-ci` to the PR and push your changes again.
|
||||
|
||||
See the action details for an ssh connection to the Github runner.
|
||||
|
||||
## Commit structure
|
||||
|
||||
@@ -287,7 +294,7 @@ To squash multiple commits or make other changes to the commit history, use `git
|
||||
git rebase -i HEAD~5
|
||||
```
|
||||
|
||||
Once your commit history is clean, ensure the branch is rebased on the [latest upstream](#Updating-your-fork) before opening the PR.
|
||||
Once your commit history is clean, ensure the branch is rebased on the [latest upstream](#updating-your-fork) before opening the PR.
|
||||
|
||||
## Submitting
|
||||
|
||||
@@ -331,6 +338,7 @@ kubectl exec -n rook-ceph --stdin --tty $(kubectl get pod -n rook-ceph -l ceph_d
|
||||
1. Restart the modified manager module to test the modifications:
|
||||
|
||||
Example for restarting the rook manager module with the [krew plugin](https://github.com/rook/kubectl-rook-ceph):
|
||||
|
||||
```console
|
||||
kubectl rook-ceph ceph mgr module disable rook
|
||||
kubectl rook-ceph ceph mgr module enable rook
|
||||
|
||||
+1
-3
@@ -5,9 +5,7 @@ The framework includes scripts for starting Kubernetes so users can
|
||||
quickly spin up a Kubernetes cluster. The tests are generally designed to install Rook, run tests, and uninstall Rook.
|
||||
|
||||
The CI runs the integration tests with each PR and each master or release branch build.
|
||||
If the tests fail in a PR, a tmate session is started which will allow you to connect via ssh and troubleshoot the failure.
|
||||
The CI is the most efficient way to troubleshoot the tests since the environment is started automatically
|
||||
and you will only need to connect to investigate.
|
||||
If the tests fail in a PR, [access](development-flow.md#tmate-session) the tmate for debugging.
|
||||
|
||||
This document will outline the steps to run the integration tests locally in a minikube environment, should the CI
|
||||
not be sufficient to troubleshoot.
|
||||
|
||||
Reference in new issue
Block a user