Skip to content

chore: v2 - validation error if component failed to load#2438

Merged
maxy-shpfy merged 1 commit into
masterfrom
06-18-chore_v2_-_validation_error_if_component_failed_to_load
Jun 19, 2026
Merged

chore: v2 - validation error if component failed to load#2438
maxy-shpfy merged 1 commit into
masterfrom
06-18-chore_v2_-_validation_error_if_component_failed_to_load

Conversation

@maxy-shpfy

@maxy-shpfy maxy-shpfy commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Description

When a pipeline is loaded in the editor, tasks that reference external components (via URL, digest, or inline text) were not having their component specs resolved. This meant the editor had no live component spec to work with, and validation could not surface a meaningful error when a component failed to load.

This PR introduces a hydration step that runs immediately after a pipeline spec is deserialized. It walks every task in the spec, calls hydrateComponentReference for any task that references a loadable component, and populates resolvedComponentSpec on success. Tasks that already have a subgraphSpec are recursed into rather than re-hydrated at the top level.

If hydration returns null (e.g. the URL is unreachable or the component text is invalid), the task is left untouched and a new COMPONENT_HYDRATION_FAILED validation issue is raised. The issue resolution card surfaces a human-readable message directing the user to check the component URL or their connection and reload the pipeline.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

V1 V2
image.png
image.png

Fix dialog:

image.png

Test Instructions

  1. Open a pipeline that contains a task referencing an external component by URL.
  2. Confirm the component loads correctly and no COMPONENT_HYDRATION_FAILED issue appears.
  3. Open a pipeline with a task pointing to an invalid or unreachable component URL.
  4. Confirm a COMPONENT_HYDRATION_FAILED validation error appears in the issues panel with the message prompting the user to check the URL or connection.
  5. Confirm pipelines with inline subgraph tasks still load and validate correctly.

Additional Comments

The deserializeSpecData helper was extracted from the inline query function in useLoadSpec to keep the hydration await clean and to make the deserialization logic independently testable.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-18-chore_v2_-_validation_error_if_component_failed_to_load/20497bb

maxy-shpfy commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

@maxy-shpfy maxy-shpfy force-pushed the 06-18-fix_v2_-_proper_hydration_of_loaded_spec branch from 7ab01b2 to c246e88 Compare June 19, 2026 01:03
@maxy-shpfy maxy-shpfy force-pushed the 06-18-chore_v2_-_validation_error_if_component_failed_to_load branch from 74bfa7e to 94a9ddc Compare June 19, 2026 01:03
@maxy-shpfy maxy-shpfy marked this pull request as ready for review June 19, 2026 01:07
@maxy-shpfy maxy-shpfy requested a review from a team as a code owner June 19, 2026 01:07

maxy-shpfy commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Jun 19, 4:40 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 19, 4:46 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 19, 4:50 AM UTC: @maxy-shpfy merged this pull request with Graphite.

@maxy-shpfy maxy-shpfy changed the base branch from 06-18-fix_v2_-_proper_hydration_of_loaded_spec to graphite-base/2438 June 19, 2026 04:40
@maxy-shpfy maxy-shpfy changed the base branch from graphite-base/2438 to master June 19, 2026 04:44
@maxy-shpfy maxy-shpfy force-pushed the 06-18-chore_v2_-_validation_error_if_component_failed_to_load branch from 94a9ddc to 20497bb Compare June 19, 2026 04:45
@maxy-shpfy maxy-shpfy merged commit ad79bcf into master Jun 19, 2026
15 of 17 checks passed
@maxy-shpfy maxy-shpfy deleted the 06-18-chore_v2_-_validation_error_if_component_failed_to_load branch June 19, 2026 04:50
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.

2 participants