-
Notifications
You must be signed in to change notification settings - Fork 364
Fix deprecation warnings in GcpCredentialsStorageIntegrationTest #2544
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
Conversation
Refactor the code and suppress the warning about readTree(URL). The rationale for its deprecation does not apply to java resources. Cf. FasterXML/jackson-core#803
| private JsonNode readResource(ObjectMapper mapper, String name) throws IOException { | ||
| // readTree from a test resource is not affected by the issues that prompted its deprecation | ||
| //noinspection deprecation | ||
| return mapper.readTree(GcpCredentialsStorageIntegrationTest.class.getResource(name)); |
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.
[Non-blocker] For my learning purpose, is there any reason that we want to suppress it instead of fixing it by explicitly opening a stream and read the stream?
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 thought it might be simpler to suppress for test code... but it's a good point. I'll update.
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.
updated... it came down to the same number of lines :)
* Fix deprecation warnings in GcpCredentialsStorageIntegrationTest (apache#2544) * Fix deprecation warnings in GcpCredentialsStorageIntegrationTest Refactor the code to use an explicit InputStream Cf. FasterXML/jackson-core#803 * Add subtype-check to PolarisEntity subclass ctors (apache#2492) this is a follow-up to ac31963 * Inject PolarisAdminService into PolarisServiceImpl (apache#2533) `PolarisServiceImpl` already is a request-scoped bean. if we apply the same to `PolarisAdminService` we can simply inject it into `PolarisServiceImpl`. * Reduce getOrCreateMetaStoreManager callers (apache#2532) we can inject `PolarisMetaStoreManager` directly into request-scoped beans or build it only once in tests that operate in a single realm. * Update dependency mypy to >=1.18, <=1.18.1 (apache#2547) * Update dependency pyiceberg to v0.10.0 (apache#2549) Co-authored-by: Yong Zheng <[email protected]> * Minor fix for README.md (apache#2558) * Testing: Let runtime-service tests use Quarkus via `enforcedPlatform()` (apache#2545) This change ensures that the tests in runtime-service use the same Quarkus platform dependency versions as Polaris server does. * Update quay.io/keycloak/keycloak Docker tag to v26.3.4 (apache#2553) * Update dependency software.amazon.awssdk:bom to v2.33.9 (apache#2561) * NoSQL: remove unused type * Last merged commit a2f29cb * disable flaky test apache#2563 --------- Co-authored-by: Dmitri Bourlatchkov <[email protected]> Co-authored-by: Christopher Lambert <[email protected]> Co-authored-by: Mend Renovate <[email protected]> Co-authored-by: Yong Zheng <[email protected]>
Refactor the code and suppress the warning about readTree(URL). The rationale for its deprecation does not apply to java resources.
Cf. FasterXML/jackson-core#803