go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/testdata/tricium/analyzers_watch_different_repos.star (about) 1 luci.project( 2 name = "foo", 3 tricium = "tricium-prod.appspot.com", 4 ) 5 6 luci.cq_group( 7 name = "main", 8 watch = [ 9 cq.refset("https://example.googlesource.com/repo1"), 10 cq.refset("https://example.googlesource.com/repo2"), 11 ], 12 acls = [ 13 acl.entry(acl.CQ_COMMITTER, groups = ["committer"]), 14 ], 15 verifiers = [ 16 luci.cq_tryjob_verifier( 17 builder = "infra:analyzer/go-linter", 18 owner_whitelist = ["project-contributor"], 19 location_filters = [ 20 cq.location_filter( 21 gerrit_host_regexp = "example-review.googlesource.com", 22 gerrit_project_regexp = "repo1", 23 path_regexp = ".+\\.go", 24 ), 25 ], 26 mode_allowlist = [cq.MODE_ANALYZER_RUN], 27 ), 28 luci.cq_tryjob_verifier( 29 builder = "infra:analyzer/spell-checker", 30 owner_whitelist = ["project-contributor"], 31 location_filters = [ 32 cq.location_filter( 33 gerrit_host_regexp = "example-review.googlesource.com", 34 gerrit_project_regexp = "repo1", 35 path_regexp = ".+\\.go", 36 ), 37 cq.location_filter( 38 gerrit_host_regexp = "example-review.googlesource.com", 39 gerrit_project_regexp = "repo2", 40 path_regexp = ".+\\.go", 41 ), 42 ], 43 mode_allowlist = [cq.MODE_ANALYZER_RUN], 44 ), 45 ], 46 ) 47 48 # Expect errors like: 49 # 50 # Traceback (most recent call last): 51 # //testdata/tricium/analyzers_watch_different_repos.star: in <toplevel> 52 # ... 53 # Error: The location_filters of analyzer luci.cq_tryjob_verifier("spell-checker") specifies a different set of Gerrit repos from the other analyzer; got: ["example-review.googlesource.com/repo1", "example-review.googlesource.com/repo2"] other: ["example-review.googlesource.com/repo1"]