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

Avoid using incompatible juju debug-log options in test helper #598

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

shayancanonical
Copy link
Contributor

Issue

$ juju debug-log --model=test-upgrade-rollback-incompat-pz5a --level=WARNING --lines=100 --no-tail
ERROR setting --no-tail and --lines not valid

Solution

Avoid using juju debug-log --lines --no-tail. Replace --lines with --limit

Copy link
Contributor

@paulomach paulomach left a comment

Choose a reason for hiding this comment

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

Safer to test juju version (we still test 2.9)

@shayancanonical
Copy link
Contributor Author

@paulomach i think the --limit option exists in juju 2.9 as well:

shayanp@brisbane:~$ juju switch test
uk8s-2-9-51:admin/test (no change)
shayanp@brisbane:~$ juju2.9 version 
2.9.52-ubuntu-amd64
shayanp@brisbane:~$ juju2.9 debug-log --model=test --level=WARNING --lines=100 --no-tail
shayanp@brisbane:~$ juju2.9 debug-log --model=test --level=WARNING --limit=100 --no-tail
shayanp@brisbane:~$ juju2.9 debug-log --model=test --level=INFO --limit=100 --no-tail
controller-0: 19:09:49 INFO juju.worker.apicaller [6706bc] "controller-0" successfully connected to "localhost:17070"
controller-0: 19:09:49 INFO juju.worker.logforwarder config change - log forwarding not enabled
controller-0: 19:09:49 INFO juju.worker.logger logger worker started
controller-0: 19:09:49 INFO juju.worker.pruner.action status history config: max age: 336h0m0s, max collection size 5120M for test (6706bccb-ed60-4b48-8e56-14bd716b9e13)
controller-0: 19:09:49 INFO juju.worker.pruner.statushistory status history config: max age: 336h0m0s, max collection size 5120M for test (6706bccb-ed60-4b48-8e56-14bd716b9e13)
model-6706bccb-ed60-4b48-8e56-14bd716b9e13: 19:09:51 INFO juju.worker.caasupgrader abort check blocked until version event received
model-6706bccb-ed60-4b48-8e56-14bd716b9e13: 19:09:51 INFO juju.worker.caasupgrader unblocking abort check
model-6706bccb-ed60-4b48-8e56-14bd716b9e13: 19:09:52 INFO juju.worker.muxhttpserver starting http server on 0.0.0.0:17071
model-6706bccb-ed60-4b48-8e56-14bd716b9e13: 19:09:52 INFO juju.worker.caasadmission ensuring model k8s webhook configurations
shayanp@brisbane:~$ juju2.9 debug-log --model=test --level=INFO --lines=100 --no-tail
controller-0: 19:09:49 INFO juju.worker.apicaller [6706bc] "controller-0" successfully connected to "localhost:17070"
controller-0: 19:09:49 INFO juju.worker.logforwarder config change - log forwarding not enabled
controller-0: 19:09:49 INFO juju.worker.logger logger worker started
controller-0: 19:09:49 INFO juju.worker.pruner.action status history config: max age: 336h0m0s, max collection size 5120M for test (6706bccb-ed60-4b48-8e56-14bd716b9e13)
controller-0: 19:09:49 INFO juju.worker.pruner.statushistory status history config: max age: 336h0m0s, max collection size 5120M for test (6706bccb-ed60-4b48-8e56-14bd716b9e13)
model-6706bccb-ed60-4b48-8e56-14bd716b9e13: 19:09:51 INFO juju.worker.caasupgrader abort check blocked until version event received
model-6706bccb-ed60-4b48-8e56-14bd716b9e13: 19:09:51 INFO juju.worker.caasupgrader unblocking abort check
model-6706bccb-ed60-4b48-8e56-14bd716b9e13: 19:09:52 INFO juju.worker.muxhttpserver starting http server on 0.0.0.0:17071
model-6706bccb-ed60-4b48-8e56-14bd716b9e13: 19:09:52 INFO juju.worker.caasadmission ensuring model k8s webhook configurations

Copy link
Contributor

@sinclert-canonical sinclert-canonical left a comment

Choose a reason for hiding this comment

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

Same concerns as in this comment.

@shayancanonical shayancanonical merged commit f1de7ef into main Feb 28, 2025
99 of 100 checks passed
@shayancanonical shayancanonical deleted the fix/rollback_incompat_test branch February 28, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Libraries: Out of sync not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants