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

Make flux logs more lenient #3945

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Make flux logs more lenient #3945

merged 1 commit into from
Jun 5, 2023

Commits on Jun 5, 2023

  1. Make flux logs more lenient

    UX changes:
    
    - Only print an error when a pod doesn't have a matching container
      instead of exiting early.
    - Return a non-zero status code when no pod is found at all.
    
    Details:
    
    In certain situations there might be 3rd-party pods running in the
    Flux namespace that cause the command to fail streaming logs, e.g.
    when they have multiple containers but none of them is called
    `manager` (which all Flux-maintained pods do). An example of such a
    situation is when Flux is installed with the 3rd-party Flux extension
    on AKS.
    
    The `logs` command is now more forgiving and merely logs an error in
    these situations instead of completely bailing out. It still returns a
    non-zero exit code.
    
    For the parallel log streaming with `-f` the code is now a little more
    complex so that errors are now written to stderr in parallel with all
    other logs written to stdout. That's what `asyncCopy` is for.
    
    refs #3944
    
    Signed-off-by: Max Jonas Werner <mail@makk.es>
    Max Jonas Werner committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    cbdd71e View commit details
    Browse the repository at this point in the history