CLARIN-DSpace v9/Port #1350 + #1347 + #1338 (DOI dedup, Shib special groups, tgz preview) to the v9 base - #1378
Conversation
…fal#1368) (#1350) (cherry picked from commit e9392ae on dtq-dev) v9 adaptations: - DOIIdentifierProviderTest: the two new tests' 'new Date().getTime()' rewritten to 'Instant.now().toEpochMilli()' — v9-base's Date->Instant migration removed the java.util.Date import, so the clean cherry-pick would not compile (known tripwire, sync plan card e9392ae). Fulfils CLARIN_V9_POST_SNAPSHOT_SYNC_ACCEPTANCE.md §5 / e9392ae (BE-1, Vlna 1).
…ted (on token refresh) (ufal#1378) (#1347) (cherry picked from commit 74f5862 on dtq-dev) v9 adaptations / additions: - ClarinShibbolethSpecialGroupsIT.java added verbatim from the zcu backport branch head b7d3c78 (origin/zcu-pub/backport-1347-shib-special-groups) — the regression IT exists only on the 7.6 customer backport branches, not on dtq-dev; fix sourced from 74f5862 (canonical), test from b7d3c78 per the sync plan card. - No code adaptations: the pick applied conflict-free (method bodies only, jakarta imports untouched); Context.getSpecialGroups null-guard included. Fulfils CLARIN_V9_POST_SNAPSHOT_SYNC_ACCEPTANCE.md §5 / 74f5862 (BE-1, Vlna 1).
(cherry picked from commit 15b296a on dtq-dev) v9 adaptations / conflict resolution: - FilePreviewIT.java: single conflict resolved toward the v9-base deletion of testPreviewWithSyncStorage + SyncBitstreamStorageServiceImpl import/SYNC_STORE_NUMBER (that class does not exist on v9-base); the commit's modernization hunk for that test dropped, everything else applied (testUnauthorizedPassword removed, -p args dropped, checkHandlerMessages helper + testPreviewWithForce added). Resulting file contains exactly 6 tests. - Intentional semantics change carried from the fork commit: the file-preview CLI no longer requires -p/--password; EPerson resolved from context or -e email, consistent with other DSpace CLI scripts. Admin-only operations stay guarded server-side. Fulfils CLARIN_V9_POST_SNAPSHOT_SYNC_ACCEPTANCE.md §5 / 15b296a (BE-1, Vlna 1).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Local test battery — ALL GREEN (on 59387eb, after
|
| Gate (AC) | Invocation | Result |
|---|---|---|
| e9392 AC4 | mvn test -pl dspace-api -Dtest=DOIIdentifierProviderTest -DskipUnitTests=false |
Tests run: 27, F:0, E:0 — incl. both new tests (verified in surefire XML) |
| e9392 AC5 | mvn verify -pl dspace-api -Dit.test=ItemMetadataQACheckerIT -DskipIntegrationTests=false |
Tests run: 17, F:0, E:0 — incl. testItemWithTwoDois |
| 15b2 AC5 | mvn verify -pl dspace-api -Dit.test=FilePreviewIT -DskipIntegrationTests=false |
Tests run: 6, F:0, E:0 — exactly the 6 expected tests |
| 15b2 AC6 | mvn verify -pl dspace-server-webapp -Dit.test=PreviewContentServiceImplIT -DskipIntegrationTests=false |
Tests run: 13, F:0, E:0 (N = pre-existing 12 + new tgz-with-gzip-mimetype) |
| 74f5 AC6 | mvn verify -pl dspace-server-webapp -Dit.test=ClarinShibbolethSpecialGroupsIT -DskipIntegrationTests=false |
Tests run: 2, F:0, E:0 |
| 74f5 AC8 | 4-class shib/auth no-regression suite | Tests run: 77, F:0, E:0, Skipped: 4 (48+1+3+25 per class) |
Adversarial gate (74f5 AC7 — IT without the fix must FAIL on a throwaway branch) running; result follows.
Adversarial gate 74f5862 AC7 — VALID PASS ✅Throwaway branch Tests run: 2, Failures: 2 — both tests fail with
This proves the IT actually guards the fix (no vacuous pass). With the fix (this PR), same invocation = 2/2 green. (Note: a first attempt with All local AC gates for this PR are now complete; CI Unit+Integration green. |
Tranža BE-1 (Vlna 1) — post-snapshot sync dtq-dev → dtq-dev-9-base
Per CLARIN_V9_POST_SNAPSHOT_SYNC_PLAN.md §4 Vlna 1 / BE-1. Source commits from
origin/dtq-dev, one commit per source commit.e9392ae191(fork PR #1350) — DOI dedup + QA-checker nonrepeatable — PORTClean cherry-pick. Mandatory fixup applied (silent-clean-merge trap from the plan card): the two new DOIIdentifierProviderTest tests carried
new Date().getTime()while v9-base's Date→Instant migration removed thejava.util.Dateimport — rewritten toInstant.now().toEpochMilli()(+ one 121-char line wrapped for checkstyle).java.util.DateNOT reintroduced.74f5862748(fork PR #1347) — Shib special groups on token refresh — PORTConflict-free pick (method bodies only; jakarta imports untouched; Context.getSpecialGroups null-guard included). Regression IT added:
ClarinShibbolethSpecialGroupsIT(2 tests) copied verbatim from zcu backport headb7d3c786ac(origin/zcu-pub/backport-1347-shib-special-groups) — fix from the canonical dtq-dev commit, test from the backport branch, per the plan card.15b296aa2a(fork PR #1338) — tgz preview detection + file-preview --force + password drop — PORTSingle conflict in FilePreviewIT resolved toward the v9-base deletion of⚠️ Intentional semantics change carried from the fork: the file-preview CLI no longer requires
testPreviewWithSyncStorage/SyncBitstreamStorageServiceImpl(class absent on v9-base); everything else applied. Resulting FilePreviewIT has exactly 6 tests.-p/--password— EPerson resolved from context (UI) or-eemail, consistent with other DSpace CLI scripts; admin-only operations stay guarded server-side (testWhenScriptCannotCreateFilePreview). Not a regression.Gates
mvn clean install -DskipTests(incl. checkstyle) — BUILD SUCCESS locally.shib.specialgroup/getSession(),request.setAttribute("shib.authenticated"), Context null-guard, tgz endsWith fix, zero password machinery, --force option.🤖 Generated with Claude Code