RFR: 2222: Remove JbsVault

Erik Duveblad ehelin at openjdk.org
Wed Apr 3 19:50:06 UTC 2024


Hi all,

please review this patch that removes the class `JbsVault`. `JbsVault` is a duplicate of `JiraVault` and was once added because there was no way to create a backport issue outside of the `org.openjdk.skara.issuetracker` module (the interface `IssueProject` does not contain any functionality for creating a backport). So the `JIraVault` was copied to `JbsVault` (which was in the `org.openjdk.skara.bots.notify` module).

This patch instead tries to make it explicit that an `IssueTracker` can support "extensions" in the form of custom REST endpoints. Code outside of `org.openjdk.skara.issuetracker` can query an `IssueTracker` to check if it supports a particular endpoint. While the approach is nice (and much better than `JbsVault`) there is still some knowledge left in `JiraHost` about backports: this is because of the field `defaultSecurity`. The `security` property is a JBS extension to JIRA and shouldn't really be in `JiraHost`. I have a draft patch that adds support for custom properties to an issue tracker, but that patch is huge (and not finished) and I would like to get this one integrated first.

I added support for a "backport endpoint" to `TestHost` as well so now all the unit tests are using the same code path as the production code (which means we can remove the method `createBackportIssue` from `JbsBackport`). I also added an integration test for `JbsBackport` to ensure that the endpoint works.

Thanks,
Erik

### Testing
- [x] Added an integration test for REST endpoint used
- [x] Added unit test support and all unit tests pass

-------------

Commit messages:
 - skara-2222

Changes: https://git.openjdk.org/skara/pull/1628/files
  Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1628&range=00
  Issue: https://bugs.openjdk.org/browse/SKARA-2222
  Stats: 458 lines in 10 files changed: 288 ins; 140 del; 30 mod
  Patch: https://git.openjdk.org/skara/pull/1628.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1628/head:pull/1628

PR: https://git.openjdk.org/skara/pull/1628


More information about the skara-dev mailing list