exclude_files in a suite yml file is not properly evaluated against "roots"

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • DevProd Correctness
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This yml file:

      test_kind: js_test
      selector:
        roots:
          - jstests/core/**/*.js
        exclude_files:
          - jstests/**/*plan_cache*.js
      

      results in this error:

      (python3-venv) ubuntu@ip-10-0-70-6:~/mongo-good$ buildscripts/resmoke.py test-discovery --suite exclude_fail
      Traceback (most recent call last):
        File "/home/ubuntu/mongo-good/buildscripts/resmoke.py", line 20, in <module>
          entrypoint()
        File "/home/ubuntu/mongo-good/buildscripts/resmoke.py", line 16, in entrypoint
          cli.main(sys.argv)
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/cli.py", line 35, in main
          subcommand.execute()
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/discovery/__init__.py", line 46, in execute
          test_list = self.gather_tests(suite)
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/discovery/__init__.py", line 59, in gather_tests
          for tests in suite.tests:
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/testing/suite.py", line 112, in tests
          self._tests, self._excluded = self._get_tests_for_kind(self.test_kind)
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/testing/suite.py", line 138, in _get_tests_for_kind
          tests, excluded = _selector.filter_tests(test_kind, selector_config)
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/selector.py", line 929, in filter_tests
          return selector.select(selector_config)
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/selector.py", line 638, in select
          return _Selector.select(self, selector_config)
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/selector.py", line 564, in select
          test_list.exclude_files(selector_config.exclude_files)
        File "/home/ubuntu/mongo-good/buildscripts/resmokelib/selector.py", line 286, in exclude_files
          raise errors.SuiteSelectorConfigurationError(
      buildscripts.resmokelib.errors.SuiteSelectorConfigurationError: Pattern(s) and/or filename(s) in `exclude_files` do not match any test files from `roots`: ['jstests/aggregation/plan_cache/sbe_plan_cache_key_encode_partial_index.js', 'jstests/auth/sbe_plan_cache_user_roles.js', 'jstests/concurrency/fsm_workloads/query/plan_cache_drop_database.js', 'jstests/concurrency/fsm_workloads/query/multi_plan_storm_drop_plan_cache.js', 'jstests/libs/query/plan_cache_utils.js', 'jstests/noPassthrough/timeseries/query/timeseries_in_sbe_uses_plan_cache.js', 'jstests/noPassthrough/query/command_diagnostics_plan_cache.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_memory_debug_info.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_metrics.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_replan_group_lookup.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_replan_sort.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_replan_unwind.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_replan_where.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_size_setparam.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_stats_agg_source.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_stats_all_hosts_sharded.js', 'jstests/noPassthrough/query/plan_cache/sbe_plan_cache_api_version.js', 'jstests/noPassthrough/query/plan_cache/sbe_plan_cache_clear_on_param_change.js', 'jstests/noPassthrough/query/plan_cache/sbe_plan_cache_key_reporting.js', 'jstests/noPassthrough/query/plan_cache/sbe_plan_cache_memory_debug_info.js', 'jstests/noPassthrough/query/plan_cache/sbe_plan_cache_size_metric.js', 'jstests/noPassthrough/query/plan_cache/sbe_plan_cache_with_const_let_var.js', 'jstests/noPassthrough/query/plan_cache/sbe_uses_correct_plan_cache.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_counters.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_eviction_metric.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_group_lookup.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_index_create.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_invalidation.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_list_failed_plans.js', 'jstests/noPassthrough/query/plan_cache/plan_cache_replan_decisionReads_is_zero.js', 'jstests/noPassthrough/query/queryStats/query_stats_disk_usage_plan_cache.js', 'jstests/noPassthroughWithMongod/query/plan_cache_replanning.js', 'jstests/noPassthroughWithMongod/query/plan_cache_not_in_regex.js', 'jstests/noPassthroughWithMongod/query/plan_cache_replanned_plan_is_cached_plan.js', 'jstests/replsets/plan_cache_secondaryok.js', 'jstests/sharding/invalidate_plan_cache_entries_when_collection_generation_changes.js', 'jstests/sharding/query/group_plan_cache_sharded.js', 'jstests/sharding/query/sbe_plan_cache_does_not_block_range_deletion.js', 'jstests/sharding/query/sbe_plan_cache_refined_shard_key.js', 'jstests/query_golden/distinct_plan_cache_md.js', 'jstests/query_golden_sharding/shard_filtering_plan_cache.js']
      

      The file names in the error message indicate that jstests/**/plan_cache.js is being evaluated using the entire directory tree, rather than just using jstests/core/*/.js

            Assignee:
            Unassigned
            Reporter:
            Philip Stoev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: