RANGER-5729: Unable to import exported GDS policies via Service Manag… - #1125
Merged
Merged
Conversation
dhavaljrajpara
requested review from
dineshkumar-yadav,
mneethiraj and
pradeepagrawal8184
August 4, 2026 11:38
mneethiraj
reviewed
Aug 4, 2026
| } | ||
|
|
||
| private boolean isGdsPolicy(RangerPolicy policy) { | ||
| return EMBEDDED_SERVICEDEF_GDS_NAME.equals(policy.getServiceType()) || ServiceDBStore.GDS_SERVICE_NAME.equals(policy.getService()); |
Contributor
There was a problem hiding this comment.
Must this condition look for service name match - ServiceDBStore.GDS_SERVICE_NAME.equals(policy.getService())? Why not only look for serviceType match?
Contributor
Author
There was a problem hiding this comment.
It was added as an additional check, in case serviceType is not present. I have udpated the condition to only check for serviceType match.
…er due to 403 Error
Sanket-Shelar
force-pushed
the
RANGER-5729
branch
from
August 5, 2026 07:18
45bcec2 to
d4c25ad
Compare
mneethiraj
approved these changes
Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…er due to 403 Error
What changes were proposed in this pull request?
Governed Data Sharing (GDS) policies are designed to be managed exclusively through GDS APIs. However, they were inadvertently being included when exporting policies from the Report page. When users attempted to import these files back through the Service Manager, it resulted in a 403 error.
This patch resolves the issue by aligning the export and import behaviors:
Export Updates: GDS policies are now automatically excluded when exporting policies (JSON, CSV, or Excel).
Import Updates: If a user imports a legacy file that still contains GDS policies, the system will now safely skip the GDS policies (logging a helpful warning) rather than failing the entire import. This ensures that non-GDS policies, like Hive, continue to import successfully.
How was this patch tested?
Created both GDS objects (datashares, datasets, policies) and non-GDS policies (Hive).
Exported policies from the Report page and verified that GDS policies are no longer included in the file.
Imported the newly exported file via Service Manager and confirmed it succeeds without a 403 error.
Imported a legacy export file containing GDS policies to verify that non-GDS policies import correctly while GDS policies are cleanly skipped and logged.