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

Execution Context integration for Database write operations #7072

Merged
merged 34 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f0e67dc
add a missing TODO
radeusgd Jun 15, 2023
1a24fd0
note about read side effects
radeusgd Jun 15, 2023
447d5ae
part1:
radeusgd Jun 15, 2023
dcb409c
undo with_finalizer, as this was unnecessary and could fail if drop c…
radeusgd Jun 16, 2023
a79d33d
EC support:
radeusgd Jun 16, 2023
a831d1e
debugging crazy transaction issue
radeusgd Jun 19, 2023
ab0e71d
Revert "debugging crazy transaction issue"
radeusgd Jun 19, 2023
6f7f50f
fixes, API update
radeusgd Jun 19, 2023
b7a91b8
changelog
radeusgd Jun 20, 2023
aefa3f4
hidden tables part 1
radeusgd Jun 20, 2023
0d8a5d3
proper workaround for #7093
radeusgd Jun 20, 2023
bfd329d
CR - part 2
radeusgd Jun 21, 2023
ee6e1b7
make the test more stable
radeusgd Jun 21, 2023
11e9de7
synchronization - attempt 1
radeusgd Jun 21, 2023
7978166
Simplify synchronizer, make registry smarter
radeusgd Jun 23, 2023
904c979
Rewrite synchronizer and registry to drop tables at maintenance just …
radeusgd Jun 23, 2023
6be6417
fixes
radeusgd Jun 23, 2023
4bcdc16
workaround for #7117 bug
radeusgd Jun 23, 2023
2e5b7eb
fixes, formatting
radeusgd Jun 23, 2023
499b619
switch to `truffle-sdk` instead of `truffle-api` for helper libs
radeusgd Jun 26, 2023
f8a0da9
Revert "switch to `truffle-sdk` instead of `truffle-api` for helper l…
radeusgd Jun 26, 2023
0535aac
CR
radeusgd Jun 26, 2023
c569385
better error messages
radeusgd Jun 26, 2023
b021973
fix missing dep
radeusgd Jun 26, 2023
5d0830d
fixes
radeusgd Jun 26, 2023
85d2d8b
fixing legal review pt1
radeusgd Jun 26, 2023
6f13755
change `truffle-api` to
radeusgd Jun 26, 2023
9faa8bf
remove references to Truffle API from std-database; maintenance actio…
radeusgd Jun 26, 2023
326ae9e
Update LR report
radeusgd Jun 26, 2023
c4a501f
testing logger
radeusgd Jun 26, 2023
eee0da3
better error messages
radeusgd Jun 26, 2023
04557a9
javafmt
radeusgd Jun 26, 2023
dcb079d
fix the `is_trivial_query` check
radeusgd Jun 27, 2023
fdafcab
CR
radeusgd Jun 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
- [Implemented `Table.update_database_table`.][7035]
- [Added AWS credential support and initial S3 list buckets API.][6973]
- [Removed `module` argument from `enso_project` and other minor tweaks.][7052]
- [Integrated Database write operations with Execution Contexts.][7072]

[debug-shortcuts]:
https://github.com/enso-org/enso/blob/develop/app/gui/docs/product/shortcuts.md#debug
Expand Down Expand Up @@ -721,6 +722,7 @@
[6973]: https://github.com/enso-org/enso/pull/6973
[7035]: https://github.com/enso-org/enso/pull/7035
[7052]: https://github.com/enso-org/enso/pull/7052
[7072]: https://github.com/enso-org/enso/pull/7072

#### Enso Compiler

Expand Down
15 changes: 8 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ lazy val runtime = (project in file("engine/runtime"))
"org.typelevel" %% "cats-core" % catsVersion,
"junit" % "junit" % junitVersion % Test,
"com.novocode" % "junit-interface" % junitIfVersion % Test exclude ("junit", "junit-dep"),
"com.lihaoyi" %% "fansi" % fansiVersion % "provided"
"com.lihaoyi" %% "fansi" % fansiVersion
),
Compile / compile / compileInputs := (Compile / compile / compileInputs)
.dependsOn(CopyTruffleJAR.preCompileTask)
Expand Down Expand Up @@ -1917,8 +1917,8 @@ lazy val `std-base` = project
Compile / packageBin / artifactPath :=
`base-polyglot-root` / "std-base.jar",
libraryDependencies ++= Seq(
"org.graalvm.truffle" % "truffle-api" % graalVersion % "provided",
"org.netbeans.api" % "org-openide-util-lookup" % netbeansApiVersion % "provided"
"org.graalvm.sdk" % "graal-sdk" % graalVersion % "provided",
"org.netbeans.api" % "org-openide-util-lookup" % netbeansApiVersion % "provided"
),
Compile / packageBin := Def.task {
val result = (Compile / packageBin).value
Expand All @@ -1944,8 +1944,8 @@ lazy val `common-polyglot-core-utils` = project
Compile / packageBin / artifactPath :=
`base-polyglot-root` / "common-polyglot-core-utils.jar",
libraryDependencies ++= Seq(
"com.ibm.icu" % "icu4j" % icuVersion,
"org.graalvm.truffle" % "truffle-api" % graalVersion % "provided"
"com.ibm.icu" % "icu4j" % icuVersion,
"org.graalvm.sdk" % "graal-sdk" % graalVersion % "provided"
Copy link
Member

Choose a reason for hiding this comment

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

graal-sdk is the API to use in Java parts of standard libraries. It's javadoc is available here: https://www.graalvm.org/sdk/javadoc/

Btw. the Truffle javadoc also contains the org.graalvm classes, but that's because of transitive dependency.

)
)

Expand All @@ -1957,7 +1957,7 @@ lazy val `enso-test-java-helpers` = project
Compile / packageBin / artifactPath :=
file("test/Tests/polyglot/java/helpers.jar"),
libraryDependencies ++= Seq(
"org.graalvm.truffle" % "truffle-api" % graalVersion % "provided"
"org.graalvm.sdk" % "graal-sdk" % graalVersion % "provided"
),
Compile / packageBin := Def.task {
val result = (Compile / packageBin).value
Expand Down Expand Up @@ -1990,7 +1990,7 @@ lazy val `std-table` = project
(Antlr4 / sourceManaged).value / "main" / "antlr4"
},
libraryDependencies ++= Seq(
"org.graalvm.truffle" % "truffle-api" % graalVersion % "provided",
"org.graalvm.sdk" % "graal-sdk" % graalVersion % "provided",
"org.netbeans.api" % "org-openide-util-lookup" % netbeansApiVersion % "provided",
"com.univocity" % "univocity-parsers" % univocityParsersVersion,
"org.apache.poi" % "poi-ooxml" % poiOoxmlVersion,
Expand Down Expand Up @@ -2068,6 +2068,7 @@ lazy val `std-database` = project
Compile / packageBin / artifactPath :=
`database-polyglot-root` / "std-database.jar",
libraryDependencies ++= Seq(
"org.graalvm.sdk" % "graal-sdk" % graalVersion % "provided",
"org.netbeans.api" % "org-openide-util-lookup" % netbeansApiVersion % "provided",
"org.xerial" % "sqlite-jdbc" % sqliteVersion,
"org.postgresql" % "postgresql" % "42.4.0"
Expand Down
10 changes: 10 additions & 0 deletions distribution/engine/THIRD-PARTY/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.ibm.icu.icu4j-73.1`.


'fansi_2.13', licensed under the MIT, is distributed with the engine.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.lihaoyi.fansi_2.13-0.4.0`.


'sourcecode_2.13', licensed under the MIT, is distributed with the engine.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.lihaoyi.sourcecode_2.13-0.3.0`.


'decline_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.monovore.decline_2.13-2.4.1`.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
License
=======


The MIT License (MIT)

Copyright (c) 2016 Li Haoyi (haoyi.sg@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
License
=======


The MIT License (MIT)

Copyright (c) 2014 Li Haoyi (haoyi.sg@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Redshift_Details
java_props.setProperty pair.first pair.second

jdbc_connection = JDBC_Connection.create self.jdbc_url properties
Connection.Value jdbc_connection Redshift_Dialect.redshift
Connection.new jdbc_connection Redshift_Dialect.redshift

## PRIVATE
Provides the jdbc url for the connection.
Expand Down
2 changes: 1 addition & 1 deletion distribution/lib/Standard/Base/0.0.0-dev/src/Panic.enso
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ type Panic
Print the `Cleaning...` message regardless of if the action succeeds.
do_cleanup =
IO.println "Cleaning..."
Panic.with_finally do_cleanup <|
Panic.with_finalizer do_cleanup <|
Panic.throw (Illegal_State.Error "Foo")
with_finalizer : Any -> Any -> Any
with_finalizer ~finalizer ~action =
Expand Down
Loading
Loading