ramackri opened a new pull request, #1018:
URL: https://github.com/apache/ranger/pull/1018

   Fixes [RANGER-5647](https://issues.apache.org/jira/browse/RANGER-5647): 
`TestPolicyEngine.testPolicyEngine_hiveForTag_filebased` fails on/after 
**2026-06-15** due to date-bound tag attributes in test fixtures.
   
   ### Problem
   
   Tag policy tests use `RESTRICTED-FINAL` with a deny exception conditioned on:
   
   ```java
   ctx.isAccessedBefore('activation_date')
   ```
   
   Fixture tag data set `activation_date` (and related expiry fields) to 
**`2026/06/15`**. Once the system date reaches that day, the `{OWNER}` deny 
exception no longer applies and CI fails:
   
   ```
   ALLOW 'select address from employee.personal;' for user2, the {OWNER}, using 
RESTRICTED-FINAL tag
   expected: true but was: false
   ```
   
   This is unrelated to product code; only test JSON dates need updating.
   
   ### Solution
   
   Change **`2026/06/15` → `2099/12/31`** in tag policy engine test fixtures so 
`isAccessedBefore()` remains true for the foreseeable future.
   
   ### Changes
   
   | File | Change |
   |------|--------|
   | `agents-common/src/test/resources/policyengine/resourceTags.json` | Future 
dates for tag attributes |
   | `agents-common/src/test/resources/policyengine/ACLResourceTags.json` | 
Same |
   | `agents-common/src/test/resources/policyengine/plugin/resourceTags.json` | 
Same |
   | `agents-common/src/test/resources/policyengine/descendant_tags.json` | 
Same |
   | 
`agents-common/src/test/resources/policyengine/test_policyengine_tag_hive.json` 
| Same (inline TAGS context) |
   
   ### Test plan
   
   - [x] `mvn test -pl agents-common 
-Dtest=TestPolicyEngine#testPolicyEngine_hiveForTag_filebased`
   - [ ] CI `build-17` green on `agents-common`
   
   ### Related
   
   - Split from [#1017](https://github.com/apache/ranger/pull/1017) 
(RANGER-5645) per review: tag fixture date updates belong in a separate Jira/PR.
   
   Made with [Cursor](https://cursor.com)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to