This is an automated email from the ASF dual-hosted git repository. jamesbognar pushed a commit to branch release-manager in repository https://gitbox.apache.org/repos/asf/juneau.git
commit 65965e4075b13477b8f2957617bb58d9b0cf303c Author: James Bognar <[email protected]> AuthorDate: Tue Aug 18 13:39:49 2026 -0400 Adopt juneau's mount-duality fix and red-tag theme token in Release Manager's console chrome - ConsoleAssetsRest drops its HttpServletRequestWrapper-based getServletPath()-masking workaround: now that ConsoleChromeMixin resolves both the prefixed and unprefixed endpoint path itself, the standalone-mount servlet needs no path rewriting of its own. - ReleaseManagerTheme overrides the new --jc-tag-red-* triad with this app's pre-existing danger palette, so the FAILED tag/stage pill renders through the token system instead of a hardcoded rule. new-release.css drops that now-redundant hardcoded .tag.status.failed rule. Bundles two unrelated one-file adoptions because each is a few lines; they are kept together rather than split into two commits that would each carry the same cross-repo dependency note below. Cross-repo build/bisect hazard: this commit depends on two juneau master commits -- bd62c1e3a8 FINISHED-411/412/413: Resolve ConsoleChromeMixin's chrome.css/logo/page-bg endpoints under both mount styles f1c5b6340d TODO-408/414: Add a themeable red tag/stage triad; make Theme.getTokens() iteration order deterministic Release Manager resolves juneau through versioned Maven coordinates (juneau.version=10.0.0-SNAPSHOT in pom.xml), not a reactor or parent build -- there is no <parent> linking the two poms. This commit will not compile against a local ~/.m2 juneau install that predates those two commits. Anyone bisecting release-manager across this point needs juneau mvn install-ed at or past them, not merely release-manager checked out. --- .../apache/juneau/releng/ConsoleAssetsRest.java | 34 +++------------------- .../apache/juneau/releng/ReleaseManagerTheme.java | 19 ++++++++++-- src/main/resources/static/css/new-release.css | 14 +++++---- 3 files changed, 28 insertions(+), 39 deletions(-) diff --git a/src/main/java/org/apache/juneau/releng/ConsoleAssetsRest.java b/src/main/java/org/apache/juneau/releng/ConsoleAssetsRest.java index b8d1746553..5438123656 100644 --- a/src/main/java/org/apache/juneau/releng/ConsoleAssetsRest.java +++ b/src/main/java/org/apache/juneau/releng/ConsoleAssetsRest.java @@ -16,18 +16,11 @@ */ package org.apache.juneau.releng; -import java.io.IOException; - import org.apache.juneau.commons.inject.Bean; import org.apache.juneau.rest.server.Rest; import org.apache.juneau.rest.server.console.ConsoleChromeMixin; import org.apache.juneau.rest.server.servlet.BasicRestServlet; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletRequestWrapper; -import jakarta.servlet.http.HttpServletResponse; - /** * Serves the shared console-ui chrome stylesheet and its two themeable assets (logo, page-background image) at * the server root, independent of the app's own {@code /rest/*} mount, so the {@code <link>} reference in every @@ -38,23 +31,11 @@ import jakarta.servlet.http.HttpServletResponse; * {@code ServletRegistrationBean} in {@link AppConfiguration} at {@code /juneau-console/*} — see there for * why. * - * <h5 class='section'>Servlet-path double-consumption fix:</h5> * <p> - * {@code ConsoleChromeMixin}'s {@code @RestGet} paths are absolute-looking literals baked into the shipped jar - * ({@code ConsoleChromeMixin#CHROME_CSS_PATH} et al., e.g. {@code "/juneau-console/chrome.css"}). Juneau's - * request dispatch resolves an operation's path against {@code getContextPath() + getServletPath()} subtracted - * from the request URI — <b>not</b> against the servlet container's {@code getPathInfo()}. Mounting this - * servlet at the container url-pattern {@code "/juneau-console/*"} (mirroring the app's other - * {@code ServletRegistrationBean} mounts, e.g. {@code NexusMockRest} at {@code /mock/nexus/*}) makes the - * container report {@code servletPath="/juneau-console"}, leaving only {@code "/chrome.css"} once that prefix is - * subtracted — one copy of the {@code /juneau-console} segment short of what the mixin's hardcoded path - * expects, so the real endpoint would only resolve at the doubled - * {@code /juneau-console/juneau-console/chrome.css}. {@link #service} corrects this at the servlet boundary by - * wrapping every request so {@code getServletPath()} reports an empty string, which makes Juneau compute the - * same path it would if this servlet were mounted at the site root — without actually claiming the site - * root (and disrupting the app's other routes: Spring MVC static resources, {@code /rest/*}, - * {@code /mock/nexus/*}, {@code /events/*}), since the container's own {@code /juneau-console/*} url-pattern - * still gates which requests even reach this servlet. + * {@code ConsoleChromeMixin} supports this standalone-mount arrangement directly — each of its endpoints + * matches both its {@code /juneau-console}-prefixed path and the unprefixed remainder the container leaves + * behind once it has consumed {@code /juneau-console} as the servlet path — so no servlet-path + * rewriting is needed here. */ @Rest(mixins=ConsoleChromeMixin.class) public class ConsoleAssetsRest extends BasicRestServlet { @@ -68,11 +49,4 @@ public class ConsoleAssetsRest extends BasicRestServlet { .pageBackgroundImage("/static/img/topo-bg.png") .build(); } - - @Override /* Overridden from HttpServlet */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - super.service(new HttpServletRequestWrapper(req) { - @Override public String getServletPath() { return ""; } - }, res); - } } diff --git a/src/main/java/org/apache/juneau/releng/ReleaseManagerTheme.java b/src/main/java/org/apache/juneau/releng/ReleaseManagerTheme.java index 1bf98b19c7..27f3a1f640 100644 --- a/src/main/java/org/apache/juneau/releng/ReleaseManagerTheme.java +++ b/src/main/java/org/apache/juneau/releng/ReleaseManagerTheme.java @@ -22,9 +22,13 @@ import org.apache.juneau.rest.server.console.Theme; * The Release Manager app's console-ui theme. * * <p> - * Its token values currently just restate {@link Theme#OPEN}'s own values — the app's existing look already - * matches the shipped default. A dedicated class (rather than an inline builder call at the mixin-wiring site) - * gives the app one obvious, named place to diverge its palette later. The logo and page-background image are + * Most token values just restate {@link Theme#OPEN}'s own values — the app's existing look already matches + * the shipped default. The {@code --jc-tag-red-*} triad is the one deliberate divergence: it overrides + * {@link Theme#OPEN}'s Bootstrap-maroon default with this app's own pre-existing danger palette (the same colors + * {@code .rm-mode-banner.live}/{@code .tag.armed}/{@code .pill.invalid} already used), so the FAILED tag/stage + * pill now resolves through the token system without changing how it looks. A dedicated class (rather than an + * inline builder call at the mixin-wiring site) gives the app one obvious, named place to diverge its palette. The + * logo and page-background image are * deliberately <b>not</b> part of this theme — those are {@code ConsoleChromeMixin} builder inputs (see * {@link ConsoleAssetsRest}), kept out of the token model entirely. */ @@ -69,6 +73,15 @@ public final class ReleaseManagerTheme { .token("--jc-tag-neutral-bg", "#e2e3e5") .token("--jc-tag-neutral-text", "#383d41") .token("--jc-tag-neutral-border", "#c6c8ca") + // Overrides Theme.OPEN's Bootstrap-maroon red default with this app's existing danger palette, so the + // FAILED tag/stage pill (formerly a hardcoded rule in new-release.css) stays visually identical to + // .rm-mode-banner.live / .rm-mode-chip.live / .tag.armed / .pill.invalid, which all key off --jc-danger. + // --jc-tag-red-text is #c23934 rather than var(--jc-danger) because CssValueGrammar's allowlist grammar + // has no var() production - token values must be literals. Keep this literal in sync with --jc-danger + // above; a silent divergence between the two is exactly the bug this comment exists to prevent. + .token("--jc-tag-red-bg", "#fdeceb") + .token("--jc-tag-red-text", "#c23934") + .token("--jc-tag-red-border", "#f3c6c2") .build(); } } diff --git a/src/main/resources/static/css/new-release.css b/src/main/resources/static/css/new-release.css index 1bcf625c4a..53275ce2ea 100644 --- a/src/main/resources/static/css/new-release.css +++ b/src/main/resources/static/css/new-release.css @@ -24,11 +24,14 @@ 1. A shared run-header/meta bar + vote-gate banner (used by all 3 options). 2. A handful of NEW `.tag.status.*` values the 24-step pipeline needs that the Releases tab never used (running / succeeded / skipped / - failed / awaiting-vote) — each mapped onto the SAME color tokens as - chrome.css's existing tag domains, per the design note in §current - (succeeded→green, running→blue, skipped/awaiting-vote→neutral, - failed→red). `pending` is intentionally NOT redefined here — it - already exists in chrome.css's amber group and is reused as-is. + awaiting-vote) — each mapped onto the SAME color tokens as chrome.css's + existing tag domains, per the design note in §current (succeeded→green, + running→blue, skipped/awaiting-vote→neutral). `pending` and `failed` + are intentionally NOT redefined here: `pending` already exists in + chrome.css's amber group, and `failed` in its red group — the red + triad is overridden in ReleaseManagerTheme to this app's own danger + palette (matching .tag.armed/.pill.invalid) rather than the framework's + Bootstrap-maroon default, so both are reused as-is. 3. Per-step console styling (shared by all 3 options). 4. Layout-specific rules for option A (rail), B (stepper), C (datatable), clearly namespaced/commented per section. @@ -43,7 +46,6 @@ .tag.status.skipped, .tag.status.awaiting-vote, .tag.status.neutral { background: var(--jc-tag-neutral-bg); color: var(--jc-tag-neutral-text); border-color: var(--jc-tag-neutral-border); } -.tag.status.failed { background: #fdeceb; color: var(--jc-danger); border-color: #f3c6c2; } .tag.status.running::before { content: '\25CF'; margin-right: 4px; font-size: 8px; position: relative; top: -1px; animation: rm-pulse 1.4s ease-in-out infinite; } .tag.status.awaiting-vote::before { content: '\23F8'; margin-right: 3px; font-size: 9px; position: relative; top: 0; }
