Core: resolveAll() must be called before reading resolution results#3064
Core: resolveAll() must be called before reading resolution results#3064flyrain merged 3 commits intoapache:mainfrom
Conversation
| // Set when resolveAll is called | ||
| private ResolverStatus primaryResolverStatus = null; | ||
|
|
||
| private ResolverStatus requirePrimaryResolverStatus() { |
There was a problem hiding this comment.
minor : require gives an impression that its just doing assertion, but its additionally returning status how about this
| private ResolverStatus requirePrimaryResolverStatus() { | |
| private ResolverStatus safeGetPrimaryResolverStatus() { |
There was a problem hiding this comment.
Refactored a bit. Thanks for the suggestion.
There was a problem hiding this comment.
Thx! The new code is much nicer 🙂
|
|
||
| public PolarisResolvedPathWrapper getResolvedReferenceCatalogEntity( | ||
| boolean prependRootContainer) { | ||
| requirePrimaryResolverStatus(); |
There was a problem hiding this comment.
[doubt] is just checking status not null sufficient ? or should we bake the assertion that that status != null and status = SUCCESS ?
There was a problem hiding this comment.
That's a good point. Removed this line to avoid any behavior change.
dimas-b
left a comment
There was a problem hiding this comment.
@flyrain : could you explain why "resolveAll() must be called before reading resolution results"? The PR description provides information about enforcing it, but the rationale for doing that is not very clear... at least to me 😅 Thx!
The result will be invalid, or null if it's not invoked. The concurrent code actually already enforce that. You can find the following code in each place reading the result, but NPE will be threw in case of |
singhpk234
left a comment
There was a problem hiding this comment.
LGTM thanks @flyrain !
* Docs: update Helm Chart page to show usage without cloning Polaris github repo (apache#2939) * Docs: update Helm Chart page to show usage without cloning Polaris github repo * Apply suggestions from code review * Add separate flows in Helm Chart doc for installing released chart and images vs building from source --------- Co-authored-by: Alexandre Dutra <adutra@apache.org> * docs: improve getting started and README documentation (apache#2267) * The outdated config snippets and health-checks are removed from the index * The binary guide stays focused and concise * Update changelog with missing 1.3.0 features (apache#3087) * Update registry.access.redhat.com/ubi9/openjdk-21-runtime Docker tag to v1.23-6.1763034977 (apache#3092) * Update docker.io/jaegertracing/all-in-one Docker tag to v1.75.0 (apache#3093) * feat: Make generate_clients.py windows compatible (apache#3084) * Make generate_clients.py windows compatible * Updated CHANGELOG.md * PRs: Remove markdown-links-check from required checks (apache#3102) The "Check Markdown links" workflow is known to produce false failures, leading to apache#3097. This change is intended to unblock PRs due to these false failures. * Update dependency com.diffplug.spotless:spotless-plugin-gradle to v8.1.0 (apache#3083) * Update dependency com.diffplug.spotless:spotless-plugin-gradle to v8.1.0 * spotlessApply --------- Co-authored-by: Robert Stupp <snazy@snazy.de> * chore(deps): update gradle to v9.2.1 (apache#3069) * chore(deps): update gradle to v9.2.1 * Fix Grale wrapper SHA --------- Co-authored-by: Robert Stupp <snazy@snazy.de> * chore(deps): update mongo docker tag to v8.2.2 (apache#3100) * chore(deps): update docker.io/mongo docker tag to v8.2.2 (apache#3099) * Source-tarball - eliminate git-gzip risk (apache#3075) Details in the `git archive` chapter in https://reproducible-builds.org/docs/archives/ * NoSQL: Allow `null` IndexKey (de)serialization (apache#3076) This change adopts the implementation to the API specification. * PRs: Re-add markdown-links-check step (apache#3103) The step was disabled in apache#3102 to pass CI and enable merging. * NoSQL: Add maintenance implementation (apache#3077) * Inject DefaultFileIOFactory in tests (apache#3043) * Inject DefaultFileIOFactory in tests also simplify `TaskFileIOSupplier` usage in tests, which allows removal of `TestFileIOFactory`. * Update Quarkus Platform and Group to v3.29.4 (apache#3094) * Site: Replace feather logo (apache#3101) The ASF has a new logo, a leaf. There is sadly no free icon that matches the new logo, so replacing the feather-ASF with "The ASF" in the top-bar navigation. * Update actions/checkout action to v6 (apache#3106) * Core: resolveAll() must be called before reading resolution results (apache#3064) * Site: Added GCS related Bucket Properties for vending credentials. (apache#3066) * Publish/pom: don't include test-fixtures dependencies as runtime (apache#3085) The list of dependencies in pom's includes the api/runtime elements of the test-fixtures, which is not what should be published, as it "pulls up" deps like junit, mockito and assertj as Maven runtime scope dependencies. This change fixes this. * Increase javadoc visibility in `persistence/nosql/persistence/cdi/weld` (apache#3110) This is to fix javadoc error: `No public or protected classes found to document` * Disable cloud storage tests that would use @tempdir (apache#3095) Disable tests from ViewCatalogTests for cloud storage integration tests (S3, ADLS, GCS) that would otherwise use @tempdir. Since @tempdir internally uses Paths.get, it cannot point to cloud storage paths. These tests remain enabled for file-based integration tests. * Remove 'beta' label for Generic Table (apache#3096) * remove beta label * address comments for change log --------- Co-authored-by: Pierre Laporte <pierre@pingtimeout.fr> * Update dependency jupyterlab to v4.5.0 (apache#3074) * chore: Fix md link check in GH action (apache#3128) * Fix md link check in GH action * Fix md link check in GH action * Update dependency pre-commit to v4.5.0 (apache#3123) * Update dependency software.amazon.awssdk:bom to v2.39.2 (apache#3127) * NoSQL: authZ API, SPI, impl and store (apache#3078) NoSQL base functionality for ACLs * NoSQL: Quarkus distributed cache invalidation (apache#3105) Adds support for distributed NoSQL cache invalidation leveraging Quarkus. * NoSQL: adjustments / merge fixes * Last merged commit e124348 --------- Co-authored-by: Oleg Soloviov <40199597+olsoloviov@users.noreply.github.com> Co-authored-by: Alexandre Dutra <adutra@apache.org> Co-authored-by: Subham <subham.sangwan@adypu.edu.in> Co-authored-by: Pierre Laporte <pierre@pingtimeout.fr> Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Yong Zheng <yongzheng0809@gmail.com> Co-authored-by: Christopher Lambert <xn137@gmx.de> Co-authored-by: Yufei Gu <yufei@apache.org> Co-authored-by: Saksham Ratra <sakshamratra.0106@gmail.com> Co-authored-by: Dmitri Bourlatchkov <dmitri.bourlatchkov@gmail.com> Co-authored-by: Tamas Mate <50709850+tmater@users.noreply.github.com> Co-authored-by: Yun Zou <yunzou.colostate@gmail.com>
To fail fast and explicitly when resolveAll() isn't called before reading the results
Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)