-
Notifications
You must be signed in to change notification settings - Fork 95
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
1.18 ports5 #7209
Merged
Merged
1.18 ports5 #7209
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d798a6d
Fragment input fields: better error message for situation when requir…
arkadius 469c3fb
Allow to convert Map toList in the same way as we convert List toMap …
arkadius 74022e2
Assign user friendly editor fix (#7166)
philemone 628a6a8
[Nu-1882] change parameter parameter list item labels (#7171)
Dzuming 3aa124d
[NU-1836] Add casting and conversions docs (#7124)
lukasz-bigorajski de6af00
[NU-1891] remove autocompletion from markdown editors (#7178)
Dzuming 5661058
Fix scenario tests with fragment input validation (#7159)
Elmacioro 2a4713b
[Nu-1889] provide an unique validation message to the scenario labels…
Dzuming 59f3ac4
[NU-1877] Fix "Failed to get node validation" when using literal list…
arkadius 7aa80a8
[Nu-1892] add missing tooltips (#7193)
Dzuming 5066b16
bump actions github artifact plugins (#7146)
mslabek 6ff45eb
[NU-1846] Fix "Failed to get node validation" when opening node detai…
arkadius b89a0f3
[Nu-1890] hide categories from a scenarios list and more scenario det…
Dzuming 17b806a
[NU-1893] Fix "Failed to get node validation" when opening fragment n…
arkadius e440a86
Merge branch 'release/1.18' into staging
arkadius e122eff
Merge remote-tracking branch 'origin/staging' into 1.18-ports5
arkadius File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
25 changes: 25 additions & 0 deletions
25
components-api/src/main/scala/pl/touk/nussknacker/engine/api/json/FromJsonDecoder.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package pl.touk.nussknacker.engine.api.json | ||
|
||
import io.circe.Json | ||
import pl.touk.nussknacker.engine.util.Implicits._ | ||
|
||
import scala.jdk.CollectionConverters._ | ||
|
||
object FromJsonDecoder { | ||
|
||
def jsonToAny(json: Json): Any = json.fold( | ||
jsonNull = null, | ||
jsonBoolean = identity[Boolean], | ||
jsonNumber = jsonNumber => | ||
// we pick the narrowest type as possible to reduce the amount of memory and computations overheads | ||
jsonNumber.toInt orElse | ||
jsonNumber.toLong orElse | ||
// We prefer java big decimal over float/double | ||
jsonNumber.toBigDecimal.map(_.bigDecimal) | ||
getOrElse (throw new IllegalArgumentException(s"Not supported json number: $jsonNumber")), | ||
jsonString = identity[String], | ||
jsonArray = _.map(jsonToAny).asJava, | ||
jsonObject = _.toMap.mapValuesNow(jsonToAny).asJava | ||
) | ||
|
||
} |
This file contains 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
21 changes: 21 additions & 0 deletions
21
components-api/src/test/scala/pl/touk/nussknacker/engine/api/json/FromJsonDecoderTest.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package pl.touk.nussknacker.engine.api.json | ||
|
||
import io.circe.Json | ||
import org.scalatest.OptionValues | ||
import org.scalatest.funsuite.AnyFunSuiteLike | ||
import org.scalatest.matchers.should.Matchers | ||
|
||
class FromJsonDecoderTest extends AnyFunSuiteLike with Matchers with OptionValues { | ||
|
||
test("json number decoding pick the narrowest type") { | ||
FromJsonDecoder.jsonToAny(Json.fromInt(1)) shouldBe 1 | ||
FromJsonDecoder.jsonToAny(Json.fromInt(Integer.MAX_VALUE)) shouldBe Integer.MAX_VALUE | ||
FromJsonDecoder.jsonToAny(Json.fromLong(Long.MaxValue)) shouldBe Long.MaxValue | ||
FromJsonDecoder.jsonToAny( | ||
Json.fromBigDecimal(java.math.BigDecimal.valueOf(Double.MaxValue)) | ||
) shouldBe java.math.BigDecimal.valueOf(Double.MaxValue) | ||
val moreThanLongMaxValue = BigDecimal(Long.MaxValue) * 10 | ||
FromJsonDecoder.jsonToAny(Json.fromBigDecimal(moreThanLongMaxValue)) shouldBe moreThanLongMaxValue.bigDecimal | ||
} | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
Binary file modified
BIN
+84 Bytes
(100%)
...nux/Expression suggester should display colorfull and sorted completions #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.17 KB
(130%)
...nux/Expression suggester should display colorfull and sorted completions #1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-304 Bytes
(99%)
...d allow adding input parameters and display used fragment graph in modal #7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Update similar test cases to use
#ace-editor
selectorBased on the search results, there are several test cases using generic input selectors that should be updated for consistency with the new Ace editor implementation:
designer/client/cypress/e2e/process.cy.ts
: Multiple instances using genericfind("input")
for value inputsdesigner/client/cypress/e2e/fragment.cy.ts
: Already uses#ace-editor
in some places but has inconsistent usagedesigner/client/cypress/e2e/compareVersions.cy.ts
: Uses#ace-editor
consistentlydesigner/client/cypress/e2e/sqlEditor.cy.ts
: Uses#ace-editor
consistentlyThe change in the review is part of a larger pattern where value inputs are being migrated to use Ace editor. The codebase shows mixed usage, suggesting an ongoing migration.
🔗 Analysis chain
LGTM! Consider reviewing similar test cases.
The change to use the specific
#ace-editor
selector instead of a generic input selector makes the test more robust and less prone to flakiness.Let's verify if similar test cases need to be updated for consistency:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 16671