Repository navigation
Quiet test logs, deprecation warning per module #5355
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
Changes from all commits
4ba9f68
f0bb850
556b7ad
f368558
2c71a6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,9 +189,12 @@ grant { | |
| permission java.net.NetPermission "requestPasswordAuthentication"; | ||
|
|
||
| // for java.net.http.HttpClient. See HttpJdkSolrClientTest | ||
| permission "java.net.URLPermission" "http://127.0.0.1:*/solr/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "https://127.0.0.1:*/solr/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "socket://127.0.0.1:*", "CONNECT:*"; | ||
| // JDK-8305346: a URLPermission with a numeric IPv4 host cannot be parsed while the policy is | ||
| // bootstrapping, so such a grant is dropped with a warning; the SocketPermissions above are what | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shorten, but yeah. |
||
| // actually confine these to loopback, so the host is a wildcard here. | ||
| permission "java.net.URLPermission" "http://*:*/solr/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "https://*:*/solr/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "socket://*:*", "CONNECT:*"; | ||
|
|
||
| permission "java.net.URLPermission" "http://localhost:*/solr/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "https://localhost:*/solr/-", "HEAD,GET,PUT,POST:*"; | ||
|
|
@@ -202,8 +205,8 @@ grant { | |
| permission "java.net.URLPermission" "socket://[::1]:*", "CONNECT:*"; | ||
|
|
||
| // for java.net.http.HttpClient. See ConcurrentUpdateJdkSolrClientTest | ||
| permission "java.net.URLPermission" "http://127.0.0.1:*/noOneThere/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "https://127.0.0.1:*/noOneThere/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "http://*:*/noOneThere/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "https://*:*/noOneThere/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "http://localhost:*/noOneThere/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "https://localhost:*/noOneThere/-", "HEAD,GET,PUT,POST:*"; | ||
| permission "java.net.URLPermission" "http://[::1]:*/noOneThere/-", "HEAD,GET,PUT,POST:*"; | ||
|
|
@@ -292,4 +295,8 @@ grant { | |
|
|
||
| grant { | ||
| permission jdk.jfr.FlightRecorderPermission "accessFlightRecorder"; | ||
| // OtelRuntimeJvmMetrics opens a JFR recording stream for the JVM metrics | ||
| permission jdk.jfr.FlightRecorderPermission "registerEvent"; | ||
| permission java.lang.RuntimePermission "accessClassInPackage.jdk.jfr.internal.event"; | ||
| permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.event"; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,13 +24,15 @@ | |
| public class AddPackageVersionRequestBody { | ||
|
|
||
| @JsonProperty("version") | ||
| @Schema(description = "The version string for this package version.", required = true) | ||
| @Schema( | ||
| description = "The version string for this package version.", | ||
| requiredMode = Schema.RequiredMode.REQUIRED) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep, saw this recently too! |
||
| public String version; | ||
|
|
||
| @JsonProperty("files") | ||
| @Schema( | ||
| description = "File paths from the file store to include in this version.", | ||
| required = true) | ||
| requiredMode = Schema.RequiredMode.REQUIRED) | ||
| public List<String> files; | ||
|
|
||
| @JsonProperty("manifest") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -389,7 +389,8 @@ public void testShardReplicationFactors() throws Exception { | |
| CollectionAdminRequest.createCollection(collection, "conf", 2, 1).process(client); | ||
| cluster.waitForActiveCollection(collection, 2, 2); | ||
|
|
||
| DocCollection col = client.getClusterState().getCollection(collection); | ||
| DocCollection col = | ||
| client.getClusterStateProvider().getClusterState().getCollection(collection); | ||
| String shard1Url = col.getSlice("shard1").getLeader().getCoreUrl(); | ||
| String shard2Url = col.getSlice("shard2").getLeader().getCoreUrl(); | ||
| NamedList<NamedList<?>> routeResponses = new NamedList<>(); | ||
|
|
@@ -482,7 +483,7 @@ public void testRouting() throws Exception { | |
| // Test that queries with _route_ params are routed by the client | ||
|
|
||
| // Track request counts on each node before query calls | ||
| ClusterState clusterState = cluster.getSolrClient().getClusterState(); | ||
| ClusterState clusterState = cluster.getSolrClient().getClusterStateProvider().getClusterState(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this deserves a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was one, but you deprecated it :) |
||
| DocCollection col = clusterState.getCollection("routing_collection"); | ||
| Map<String, Double> requestCountsMap = new HashMap<>(); | ||
| for (Slice slice : col.getSlices()) { | ||
|
|
@@ -853,7 +854,12 @@ public void stateVersionParamTest() throws Exception { | |
| .process(cluster.getSolrClient()); | ||
| cluster.waitForActiveCollection(COLLECTION, 2, 2); | ||
|
|
||
| DocCollection coll = cluster.getSolrClient().getClusterState().getCollection(COLLECTION); | ||
| DocCollection coll = | ||
| cluster | ||
| .getSolrClient() | ||
| .getClusterStateProvider() | ||
| .getClusterState() | ||
| .getCollection(COLLECTION); | ||
| Replica r = coll.getSlices().iterator().next().getReplicas().iterator().next(); | ||
|
|
||
| SolrQuery q = new SolrQuery().setQuery("*:*"); | ||
|
|
@@ -896,7 +902,8 @@ public void stateVersionParamTest() throws Exception { | |
| } | ||
| } | ||
| String theNode = null; | ||
| Set<String> liveNodes = cluster.getSolrClient().getClusterState().getLiveNodes(); | ||
| Set<String> liveNodes = | ||
| cluster.getSolrClient().getClusterStateProvider().getClusterState().getLiveNodes(); | ||
| for (String s : liveNodes) { | ||
| String n = cluster.getZkStateReader().getBaseUrlForNodeName(s); | ||
| if (!allNodesOfColl.contains(n)) { | ||
|
|
@@ -1069,7 +1076,12 @@ public void testRetryUpdatesWhenClusterStateIsStale() throws Exception { | |
|
|
||
| // determine the coreNodeName of only current replica | ||
| Collection<Slice> slices = | ||
| cluster.getSolrClient().getClusterState().getCollection(COL).getSlices(); | ||
| cluster | ||
| .getSolrClient() | ||
| .getClusterStateProvider() | ||
| .getClusterState() | ||
| .getCollection(COL) | ||
| .getSlices(); | ||
| assertEquals(1, slices.size()); // sanity check | ||
| Slice slice = slices.iterator().next(); | ||
| assertEquals(1, slice.getReplicas().size()); // sanity check | ||
|
|
@@ -1125,7 +1137,12 @@ public void testRetryUpdatesWhenClusterStateIsStale() throws Exception { | |
|
|
||
| /** Asserts that each doc is on the leader of the shard it routes to, querying that core alone. */ | ||
| private static void assertDocsOnShardLeaders(String collection, String... ids) throws Exception { | ||
| DocCollection col = cluster.getSolrClient().getClusterState().getCollection(collection); | ||
| DocCollection col = | ||
| cluster | ||
| .getSolrClient() | ||
| .getClusterStateProvider() | ||
| .getClusterState() | ||
| .getCollection(collection); | ||
| for (String id : ids) { | ||
| String coreUrl = | ||
| col.getRouter().getTargetSlice(id, null, null, null, col).getLeader().getCoreUrl(); | ||
|
|
@@ -1144,7 +1161,11 @@ private static void checkSingleServer(NamedList<Object> response) { | |
| NamedList<?> rfByRoute = (NamedList<?>) header.get(CloudSolrClient.REPFACT_BY_ROUTE); | ||
| assertNotNull("no per-route rf in " + header, rfByRoute); | ||
| DocCollection col = | ||
| cluster.getSolrClient().getClusterState().getCollection("routing_collection"); | ||
| cluster | ||
| .getSolrClient() | ||
| .getClusterStateProvider() | ||
| .getClusterState() | ||
| .getCollection("routing_collection"); | ||
| Set<String> leaderUrls = new HashSet<>(); | ||
| for (Slice slice : col.getSlices()) { | ||
| leaderUrls.add(slice.getLeader().getCoreUrl()); | ||
|
|
@@ -1263,6 +1284,7 @@ private void queryWithPreferReplicaTypes( | |
| } | ||
|
|
||
| @Test | ||
| @SuppressWarnings("deprecation") // covers the deprecated ping() | ||
| public void testPing() throws Exception { | ||
| final String testCollection = "ping_test"; | ||
| CollectionAdminRequest.createCollection(testCollection, "conf", 2, 1) | ||
|
|
@@ -1275,6 +1297,7 @@ public void testPing() throws Exception { | |
| assertEquals("This should be OK", 0, response.getStatus()); | ||
| } | ||
|
|
||
| @SuppressWarnings("deprecation") // covers the deprecated ping() | ||
| public void testPerReplicaStateCollection() throws Exception { | ||
| String collection = getSaferTestName(); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -615,6 +615,7 @@ public void testCookieHandlerSettingHonored() throws Exception { | |
| } | ||
|
|
||
| @Test | ||
| @SuppressWarnings("deprecation") // covers the deprecated ping() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, when we deprecate something we need to be better about removing it from |
||
| public void testPing() throws Exception { | ||
| try (HttpJdkSolrClient client = builder(solrTestRule.getBaseUrl()).build()) { | ||
| SolrPingResponse spr = client.ping("collection1"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I;'ve been mulling over creating a JIRA with subtasks per deprecation in hopes that folks would move on them... it's been annoying!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and with this
deprecationLintProjectssomeone can embrace a module, getting it deprecation free and add it to that list...