Repository navigation
Broken diagram link - #2766
Open
AbbyGavin wants to merge 11 commits into
Open
Broken diagram link#2766AbbyGavin wants to merge 11 commits into
AbbyGavin wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Failed CWL rendering triggers extraction twice in the same request, repeating costly external commands instead of reusing the original generation outcome.
1 open issue
What changed in this PR
This PR addresses #470 by showing a warning instead of a broken image when a workflow diagram is unavailable, with a specific message for CWL generation errors.
Changes:
- Adds diagram-error reporting through the workflow model and extractors.
- Displays fallback warnings on the workflow page.
- Adds rendering tests and a malformed CWL fixture.
| File | Description |
|---|---|
test/functional/workflows_controller_test.rb |
Tests SVG, non-SVG, and failed-generation displays. |
test/fixtures/files/workflows/rp2/workflows/broken_cwl.cwl |
Adds malformed CWL input. |
test/factories/workflows.rb |
Adds a workflow factory for diagram failures. |
test/factories/content_blobs.rb |
Adds a content-blob factory using malformed CWL. |
lib/seek/workflow_extractors/rolike.rb |
Delegates error checks to the applicable extractor. |
lib/seek/workflow_extractors/rocrate.rb |
Wraps error checks in crate access. |
lib/seek/workflow_extractors/cwl.rb |
Separates diagram extraction and adds error detection. |
lib/seek/workflow_extractors/base.rb |
Defines the default diagram-error predicate. |
app/views/workflows/show.html.erb |
Shows warnings when no diagram is available. |
app/models/concerns/workflow_extraction.rb |
Exposes the extractor’s error check to the view. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #470
Displays a more useful message than a broken image link if the image doesn't actually exist. The only way I could get it to appear is if the CWL diagram wasn't parsable. I've added a message for that, but other cases could easily have a message added.