Skip to content

fix: snap log num_lines can be 'all' as well as an int#250

Merged
james-garner-canonical merged 3 commits intocanonical:mainfrom
james-garner-canonical:25-11+fix+include-literal-all-in-snap-logs-signature
Nov 4, 2025
Merged

fix: snap log num_lines can be 'all' as well as an int#250
james-garner-canonical merged 3 commits intocanonical:mainfrom
james-garner-canonical:25-11+fix+include-literal-all-in-snap-logs-signature

Conversation

@james-garner-canonical
Copy link
Collaborator

This PR ports the type annotation fix proposed in canonical/operator-libs-linux#166.


Original description:

the snap logs command supports an all parameter for the -n flag.

# from the command's own --help:
[logs command options]
          --abs-time   Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD.
      -n=              Show only the given number of lines, or 'all'. (default: 10)
      -f               Wait for new lines and print them as they come in.

This PR adds support for that (in the form of a type hint correction, the implementation is unchanged).

@james-garner-canonical james-garner-canonical marked this pull request as ready for review November 4, 2025 11:08
@james-garner-canonical james-garner-canonical requested a review from a team as a code owner November 4, 2025 11:08
@james-garner-canonical james-garner-canonical merged commit d126230 into canonical:main Nov 4, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants