RFR: 1269: Handle Jira host with path element in URL

Erik Joelsson erikj at openjdk.java.net
Fri Dec 3 22:07:09 UTC 2021


The IssueTracker/JiraHost classes in Skara make the assumption that the base URL for Jira is just a hostname with no path elements. In order to use Skara with a Jira instance with a URL that has a path element, this needs to be fixed.

Instead of always basing REST call URLs on the configured base path and appending to it, there are many cases where the URIBuilder::setPath is used, which overwrites any existing path element. This is especially troublesome when combined with using IssueProject::webUrl as the base for these URLs.

I would like to fix this by adding a supported way of getting the base URI from an IssueTracker (IssueTracker::uri), replace all uses of ::webUrl for constructing other URLs with this new call, and replacing all ::setPath with ::appendPath (in IssueTracker/Jira related code).

This change will require all configurations to be careful not to add a trailing slash to the URL for the Jira instance.

I intend to run this for a while in the staging environment to make sure it works.

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

Commit messages:
 - SKARA-1269

Changes: https://git.openjdk.java.net/skara/pull/1251/files
 Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1251&range=00
  Issue: https://bugs.openjdk.java.net/browse/SKARA-1269
  Stats: 25 lines in 9 files changed: 14 ins; 0 del; 11 mod
  Patch: https://git.openjdk.java.net/skara/pull/1251.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1251/head:pull/1251

PR: https://git.openjdk.java.net/skara/pull/1251


More information about the skara-dev mailing list