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

Warn isn't working with regex analyzer #1652

Closed
theJaxon opened this issue Oct 17, 2024 · 0 comments · Fixed by #1687
Closed

Warn isn't working with regex analyzer #1652

theJaxon opened this issue Oct 17, 2024 · 0 comments · Fixed by #1687

Comments

@theJaxon
Copy link

Bug Description

I'm trying to use Warn as an outcome for regex analyzer but it doesn't work, it shows fail instead

Expected Behavior

Just like the examples here https://troubleshoot.sh/docs/analyze/ , i expected that warn is supported as an option.

Steps To Reproduce

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: test
spec:
  collectors:
    - clusterResources:
        exclude: true
    - clusterInfo:
        exclude: true
  hostCollectors:
    - run:
        collectorName: test
        command: "sh"
        args:
          - -c
          - |
            #!/bin/bash
            echo "testing"

  analyzers:
    - textAnalyze:
        checkName:  "test"
        fileName: host-collectors/run-host/test.txt
        regex: 'Check passed'
        outcomes:
          - pass:
              when: "true"
              message: "Check passed."
          - warn:
              when: "false"
              message: "There seems to be an issue with the test."

Additional Context

Include the following information.

  • Replicated Troubleshoot 0.85.0
  • MacOS
  • Sequoia 15.0.1
@xavpaice xavpaice linked a pull request Nov 12, 2024 that will close this issue
6 tasks
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 a pull request may close this issue.

1 participant