Skip to content

fix(ui-react): wire the Results step Fetch results button (#110) - #122

Merged
mosoriob merged 1 commit into
developfrom
fix/110-results-publish
Aug 11, 2026
Merged

fix(ui-react): wire the Results step Fetch results button (#110)#122
mosoriob merged 1 commit into
developfrom
fix/110-results-publish

Conversation

@mosoriob

Copy link
Copy Markdown
Contributor

Closes the client half of #110.

What was wrong

MintThread.tsx rendered MintResults without onPublishResults, and
MintResults.handlePublish returns on its first line when that prop is absent.
So Fetch results made no network request at all — the click did nothing,
silently.

What changed

  • publishResults in src/lib/ensemble-manager.ts, alongside the two calls
    Ensemble Manager calls send no Authorization header — localStorage key mismatch #85 moved there, so the Authorization header is still built in one place.
  • MintThread passes onPublishResults. The route publishes every execution
    under the subtask, so its path needs the problem statement and task ids —
    thread_info carried task_id alone, and now selects
    task { problem_statement_id }. Confirmed readable at TACC under
    anonymous, so the user role sees it too.
  • Each id is encodeURIComponent-ed as one path segment. TACC's ids are opaque
    and unaffected, but the legacy mint://…/… form carries slashes that would
    otherwise split into extra segments and miss the route.
  • A failure is shown instead of dropped. handlePublish had no catch, so
    a rejection went nowhere. Registration reaches Tapis and CKAN, so it fails for
    reasons a user cannot guess at.
  • .env is now git-ignored — it holds a live data-catalog credential and was
    only one git add away from a public repo.

What this does not fix

Results still will not appear at TACC. The deployment's CKAN API token no longer
authenticates: package_show on the target dataset answers
Access denied: User not authorized — an empty username, so the token is
not resolving to any user. That is why registerOutputs returns 403 and the
route reports it as a 500. Operational fix, tracked on #110.

Measured while diagnosing: the token in .env was issued 2026-05-03T22:52:02,
90 seconds before TACC's first successful output registration at 22:53:57 — so it
is the token that worked, and it has since been invalidated. A freshly minted
token reads the same dataset fine, which rules out nginx stripping the header.

Tests

928 pass (was 921). The MintThread guard asserts the outgoing request, not
the prop, and was checked to fail against the old code — a MintResults-level
test cannot catch this, since it passes the prop itself.

MintThread rendered MintResults without onPublishResults, and MintResults
returns on the first line of handlePublish when that prop is absent, so the
button made no network request at all.

The route publishes every execution under the subtask, which needs the
problem statement and task ids in its path; thread_info carried task_id
alone, so it now selects task { problem_statement_id } too. Each id is
encoded as one path segment, because the legacy mint:// form carries
slashes.

A failure is now shown rather than dropped. Registration reaches Tapis and
CKAN, so it fails for reasons a user cannot guess at, and handlePublish had
no catch — the rejection went nowhere.

Also ignore .env, which holds a live data-catalog credential and was only
one git add away from a public repo.

This does not by itself make results appear at TACC: the deployment's CKAN
API token no longer authenticates, so registration returns 403. That is a
separate, operational fix.
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
monorepo Ready Ready Preview Aug 11, 2026 2:11am

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.

1 participant