Closed Drarig29 closed 4 months ago
Branch report: corentin.girard/SYNTH-14523/only-auto-discover-with-default-glob-when-nothing-given
Commit report: f6632f4
Test service: datadog-ci-tests
:white_check_mark: 0 Failed, 1572 Passed, 0 Skipped, 1m 51.4s Total duration (1m 36.28s time saved)
What and why?
This PR fixes a regression introduced by #1214:
--files
argument, thus defaulting to{,!(node_modules)/**/}*.synthetics.json
--public-id A
to "focus" on test A and only run that test.Before #1214
Passing a
--public-id
would disable the auto-discover → the specific overrides would not be loaded → the test wouldn't behave as expected ❌After #1214
Passing a
--public-id
now keeps the auto-discover → config files containing the specific overrides are discovered → test A is run and configured properly ✅The problem
Sadly, this came with a big performance impact when running
datadog-ci
from the user's home directory with just a--public-id
parameter, because the CLI is traversing the whole disk (from the home directory).How?
Go back to the previous behavior, unless
--files
is set explicitly:publicIds
, norfiles
, nortestSearchQuery
(norsuites
array if using the library)publicIds
only, we shouldn't auto-discover for performance reasons. (old behavior)publicIds
andfiles
, then only the givenpublicIds
are run and the test config files are applied on them. (keeping the intended fix from #1214)Review checklist