Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type fragment inputs (for dict editor) despite errors #5983

Open
wants to merge 6 commits into
base: staging
Choose a base branch
from

Conversation

wrzontek
Copy link
Contributor

@wrzontek wrzontek commented Apr 26, 2024

Describe your changes

This allows the fragment to be typed (e.g. for the purpose of DictParameterEditor / substitotor), if:

  1. fragment is invalid due to having no output block
  2. a process uses a fragment that does have an output but doesnt use that output (doesnt redirect the 'arrow')

Checklist before merge

  • Related issue ID is placed at the beginning of PR title in [brackets] (can be GH issue or Nu Jira issue)
  • Code is cleaned from temporary changes and commented out lines
  • Parts of the code that are not easy to understand are documented in the code
  • Changes are covered by automated tests
  • Showcase in dev-application.conf added to demonstrate the feature
  • Documentation added or updated
  • Added entry in Changelog.md describing the change from the perspective of a public distribution user
  • Added MigrationGuide.md entry in the appropriate subcategory if introducing a breaking change
  • Verify that PR will be squashed during merge

Copy link
Contributor

created: #5985
⚠️ Be careful! Snapshot changes are not necessarily the cause of the error. Check the logs.

@wrzontek
Copy link
Contributor Author

wrzontek commented May 8, 2024

(nondeterministic cypress error)

@wrzontek
Copy link
Contributor Author

wrzontek commented May 8, 2024

if possible, this could also go into release/1.15

@wrzontek wrzontek requested a review from arkadius May 8, 2024 13:38
@wrzontek wrzontek marked this pull request as ready for review May 8, 2024 13:38
@wrzontek wrzontek marked this pull request as draft May 8, 2024 13:39
@wrzontek wrzontek marked this pull request as ready for review May 15, 2024 12:20
)

val globalErrorProcess = extractGlobalValidationResult(process)
globalErrorProcess.map(_.error.typ) shouldBe List("InvalidTailOfBranch")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error type looks hacky in this context. I'd rather expect sth like output of fragment is not used or sth similar. Is it easy to change? Can it be node error instead of global error?

|}""".stripMargin

val globalErrorFrag = extractGlobalValidationResult(fragmentName, fragmentJson)
globalErrorFrag.map(_.error.typ) shouldBe List("InvalidTailOfBranch")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error type looks hacky in this context. I'd rather expect sth like usage of/reference to invalid fragment . Is it easy to change? Can it be node error instead of global error?

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.

None yet

2 participants