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

feat: add filtering by tags and names #300

Merged
merged 5 commits into from Jun 8, 2021

Conversation

vigneshshanmugam
Copy link
Member

@vigneshshanmugam vigneshshanmugam commented Jun 5, 2021

  • fix Add tags, filtering #26
  • Added support for glob pattern matching for both journey name and tags.
  • Names and tags can be matched with multiple journeys that has the same name and tags spawned across multiple files.
elastic-synthetics examples/todos/* --match 'check*' 
// will match all the journey that has `check` in their name and tags. 

This aligns with RegExp or glob matching found in major libraries like jest, folio, mocha etc and we don't support variadiac options for name matching as majority of the cases can be solved with a mix of both.

  • Tags matching which is a variadic option meaning you can pass multiple options in the CLI to match a group of journeys.
// will run the journeys that are tagged with the respective teams in the kibana repo. 
elastic-synthetics <dir> --tags 'kibana:uptime*'  'kibana:apm*'

journey({ name: "elastic uptime app", tags: ["kibana:uptime", "kibana:apm" }, () => {})

Note: match pattern that matches both name and tags, tags pattern that matches only tags

@apmmachine
Copy link
Collaborator

apmmachine commented Jun 5, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #300 updated

  • Start Time: 2021-06-07T23:23:02.746+0000

  • Duration: 13 min 31 sec

  • Commit: 9f582f6

Test stats 🧪

Test Results
Failed 0
Passed 108
Skipped 0
Total 108

Trends 🧪

Image of Build Times

Image of Tests

@vigneshshanmugam
Copy link
Member Author

vigneshshanmugam commented Jun 7, 2021

@spalger Curios to hear if these options would work for Kibana apps?

src/dsl/journey.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Add tags, filtering
4 participants