Skip to content

refactor(blueprints): move orchestration blueprint fetching to utility - #5886

Open
sumittiwari1302 wants to merge 6 commits into
kestra-io:mainfrom
sumittiwari1302:fix/5734-orchestration-blueprint-fetching-v2
Open

sumittiwari1302 wants to merge 6 commits into
kestra-io:mainfrom
sumittiwari1302:fix/5734-orchestration-blueprint-fetching-v2

Conversation

@sumittiwari1302

Copy link
Copy Markdown

Description

What does this PR do?

Moves orchestration blueprint fetching out of `src/pages/orchestration/[slug].astro` into a dedicated, tested utility.

Changes

  • Added `src/utils/blueprints/orchestrationBlueprints.ts`
    • Added `resolveBlueprintRenders()` for fetching blueprint flows and graphs.
    • Added `fetchToolBlueprintCount()` for fetching the blueprint count.
    • Uses `$fetchApiCachedOptional` so decorative blueprint data failures do not break the page.
  • Added `src/utils/blueprints/orchestrationBlueprints.test.ts`
    • Covers successful fetches.
    • Covers flow and graph fetch failures.
    • Covers missing `blueprintId`.
    • Covers empty inputs.
    • Covers blueprint count success and failure.
  • Updated `src/pages/orchestration/[slug].astro`
    • Replaced inline blueprint fetching with the new utility functions.
    • Removed the unused `Fortune500Logo` import and `fortune500` logo mapping.
    • Kept `$fetchApiCached` for `getStaticPaths`.

Verification

  • Unit tests pass (538 tests).
  • Lint passes.
  • Blueprint request URLs remain unchanged.
  • Existing orchestration page behavior is preserved.

Closes #5734

@kestrabot kestrabot Bot added this to Pull Requests Oct 5, 2026
@kestrabot

kestrabot Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Welcome to Kestra 👋

Hey @sumittiwari1302, thanks for opening your first pull request in this repository - we really appreciate it! ❤️

Questions along the way? Ask us on Slack.

Thanks for all the efforts so far! 🍀

@sumittiwari1302

Copy link
Copy Markdown
Author

Hi @aj-emerich , @iitzIrFan , @Coding-with-Adam, could you please take a look at this PR and merge it if everything looks good? Thank you!

@Coding-with-Adam Coding-with-Adam added kind/website Website-related change kind/external Pull requests raised by community contributors labels Oct 9, 2026
The blueprint version API returns { flow }, but the extracted utility read
flow.source, so rendered snippets lost their source. Type the return as the
input item plus an optional render so it stays assignable to OrchPattern's
BlueprintItem[].

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/external Pull requests raised by community contributors kind/website Website-related change

Projects

Status: To review

Development

Successfully merging this pull request may close these issues.

Move blueprint fetching out of orchestration/[slug].astro into a tested util

2 participants