Skip to content

RANGER-5647: Fix remaining ISO EXPIRES_ON dates in hive tag tests#1021

Merged
ramackri merged 1 commit into
apache:masterfrom
ramackri:RANGER-5647-tag-test-iso-dates
Jun 16, 2026
Merged

RANGER-5647: Fix remaining ISO EXPIRES_ON dates in hive tag tests#1021
ramackri merged 1 commit into
apache:masterfrom
ramackri:RANGER-5647-tag-test-iso-dates

Conversation

@ramackri

Copy link
Copy Markdown
Contributor

Summary

Completes RANGER-5647 / #1018 for ISO-format tag expiry dates in policy-engine tests.

PR #1018 changed slash-format fixture dates (2026/06/152099/12/31) in shared tag JSON files and RangerPathResourceMatcher thread safety. Two inline ISO EXPIRES_ON values in test_policyengine_tag_hive.json were left unchanged.

After 2026-06-15, CI build-17 fails:

TestPolicyEngine.testPolicyEngine_hiveForTag
ALLOW 'select ssn from employee.personal;' for user1 using EXPIRES_ON tag
==> expected: <true> but was: <false>

Tag policy uses ctx.isAccessedAfter('expiry_date'); once the clock passes the fixture expiry, access is denied.

Changes

File Change
agents-common/src/test/resources/policyengine/test_policyengine_tag_hive.json 2026-06-15T15:05:15.000Z2099-12-31T15:05:15.000Z for EXPIRES_ON DESCENDANT and SELF test cases

No policy-engine logic changes — test fixture dates only.

Related

Test plan

  • mvn test -pl agents-common -Dtest=TestPolicyEngine#testPolicyEngine_hiveForTag,TestPolicyEngine#testPolicyEngine_hiveForTag_filebased -Drat.skip=true -Dcheckstyle.skip=true -Dpmd.skip=true -Dspotbugs.skip=true

PR apache#1018 updated slash-format tag fixture dates to 2099/12/31 but left
2026-06-15 ISO expiry_date values in test_policyengine_tag_hive.json.
After 2026-06-15, TestPolicyEngine.testPolicyEngine_hiveForTag fails CI
with isAllowed expected true but was false for EXPIRES_ON SELF match.

Co-authored-by: Cursor <cursoragent@cursor.com>

@vikaskr22 vikaskr22 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ramackri ramackri merged commit bfaec45 into apache:master Jun 16, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants