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

e2e: More useful logs #1686

Open
Tracked by #1717
nirs opened this issue Dec 1, 2024 · 0 comments
Open
Tracked by #1717

e2e: More useful logs #1686

nirs opened this issue Dec 1, 2024 · 0 comments
Assignees
Labels
test Testing related issue

Comments

@nirs
Copy link
Member

nirs commented Dec 1, 2024

e2e logs are too noisy and does not provide enough info.

Guidelines:

  • Use INFO log for important events, explaining what the test is doing
    • starting or ending an operation (starting deploy, waiting for event, ...)
    • detecting state change (drpc phase or progress change)
  • Provide useful info in INFO logs
    • when deploying/undeploying - which cluster
    • failover, relocate: current cluster, target cluster
    • other info that may help to understand the operation
  • Anything else should be DEBUG log
  • Provide useful info in DEBUG logs
    • when creating or deleting a resource, the cluster, namespace, and resource name
    • when changing a resource, the changes in the resource, or the entire updated resource
    • when getting resource, important details from the resource, or the entire resource
    • any detail that can help debug failing tests or help to understand what the code is doing
  • Log levels:
    • log file: DEBUG level to make it easier to debug failed test, specially in the CI
    • console: INFO level to make running the tests nicer

Example INFO messages for a subscription based test:

INFO  subscr-deploy-rbd-busybox   Deploying workload on cluster "dr1"
INFO  subscr-deploy-rbd-busybox   Protecting workload
INFO  subscr-deploy-rbd-busybox   Waiting for first replication
INFO  subscr-deploy-rbd-busybox   Failing over workload from clsuter "dr1" to cluster "dr2"
INFO  subscr-deploy-rbd-busybox   Waiting until workload is failedover
INFO  subscr-deploy-rbd-busybox   Waiting for first replication
INFO  subscr-deploy-rbd-busybox   Relocating workload from clsuter "dr2" to cluster "dr1"
INFO  subscr-deploy-rbd-busybox   Waiting until workload is relocated
INFO  subscr-deploy-rbd-busybox   Waiting for first replication
INFO  subscr-deploy-rbd-busybox   Unprotecting workload
INFO  subscr-deploy-rbd-busybox   Undeploying workload on cluster "dr1"

Notes:

  • Maybe include drpc action, phase and progression names (see basic-test logs)
  • Maybe include timing for each step (deploy, protect, ...). We have timing in the test summary but it is useful to have info in the logs. This means adding a completion log for every operation:
    Deploying workload on cluster "dr1"
    Workload deployed in xxx seconds
    
@nirs nirs added the test Testing related issue label Dec 1, 2024
@nirs nirs self-assigned this Dec 1, 2024
@nirs nirs changed the title More useful e2e logs e2e: More useful logs Dec 2, 2024
@nirs nirs mentioned this issue Dec 11, 2024
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Testing related issue
Projects
None yet
Development

No branches or pull requests

1 participant