Skip to content

improvement: ignoreOutput honours filters#376

Open
haihongren wants to merge 6 commits into
masterfrom
ignore_output_and_filters
Open

improvement: ignoreOutput honours filters#376
haihongren wants to merge 6 commits into
masterfrom
ignore_output_and_filters

Conversation

@haihongren

Copy link
Copy Markdown
Contributor

Currently ignoreOuptut function ignores filter functions - sampleFilter, sample_include_filter and sample_exclude_filter.

With this update, ignoreOuptut function will honour those filters.

@haihongren haihongren requested a review from Kav91 August 29, 2022 00:21
@davidgit davidgit requested a review from a team September 13, 2022 14:16
@davidgit davidgit requested review from rubenruizdegauna and removed request for a team November 18, 2022 14:45
@rubenruizdegauna

Copy link
Copy Markdown
Contributor

Can you add more context about what this fixes? (an example would help)
I have tried it with this conf:


name: example
apis:

  - name: status
    url: https://mocki.io/v1/e8d30c60-57a0-4226-99d1-0e5ca05e3345
    ignore_output: true
    sample_filter:
      - name: Leanne Graham

  - name: name
    cache: https://mocki.io/v1/e8d30c60-57a0-4226-99d1-0e5ca05e3345
    jq: .[]

but when I run it Leanne Graham still appears, so most probably I don't understand what this is fixing.

Thanks!

@haihongren

Copy link
Copy Markdown
Contributor Author

@rubenruizdegauna I just realised I had not responded to your comment.
If your example is updated as follows (referencing the statusSample using ${lookup.statusSample:name} in the 2nd API), the filter will work.

name: example
apis:
  - name: status
    url: https://mocki.io/v1/e8d30c60-57a0-4226-99d1-0e5ca05e3345
    ignore_output: true
    sample_filter:
      - name: Leanne Graham

  - name: name
    commands:
        - run: > 
            echo "name: ${lookup.statusSample:name}"
          split_by: ":"

@abhishuraina abhishuraina removed the request for review from rubenruizdegauna September 12, 2025 15:21
@muruganishekar muruganishekar reopened this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants