Commit Graph
8 Commits
Author SHA1 Message Date
Prathyush PVandGitHub bb0dc055c6 Remove pinned dependency for modernc.org/sqlite (#8489)
## What changed?
Remove pinned dependency on modernc.org/sqlite.

## Why?
We added this version override when we experienced some table not found
errors. This happens when sqlite db connections are closed when
transactions fail.
We have TestSQLiteTransactionContextCancellation which passes
consistently for this new version. So we believe this issue should not
happen again.

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
2025-10-16 02:51:22 +00:00
Alex ShtinandGitHub 8e8f1b0f7c Remove license header from every file (#7689)
## What changed?
<!-- Describe what has changed in this PR -->
Remove license header from every file. Because it is really hard to
follow in this PR here is the summary:
1. License header is removed from all `.go` and `.proto` files
:fireworks::fireworks:🎆.
2. `LICENSE` file in the root directory has only Temporal and Uber
copyrights.
3. 5 other `LICENSE` files added to the packages which have copyrights
different from Temporal and Uber: Datadog, Xargin, "Mat Ryer, Tyler
Bunnell and contributors".
4. `license_file` flag is removed from all code generation tools.
5. `copyright_file` flag is removed from `go:generate mockgen`
directive.
6. All copyright related targets are removed from `Makefile`.
7. Updated Temporal copyright year to 2025 everywhere.

## Why?
<!-- Tell your future self why have you made these changes -->
I double checked with legal department that it is not needed to have
license header in every file. One file per repo is enough. I put all
copyrights to the root `LICENSE` file and removed header from all other
files. Also updated tools and `Makefile`.
2025-05-01 18:50:21 -07:00
Prathyush PVandGitHub ec86ef3875 Use latest modernc.org/sqlite and remove temporary fix (#6836)
## What changed?
Use the latest release of modernc.org/sqlite library which has our fix
for the connection cancellation issue:
https://gitlab.com/cznic/sqlite/-/merge_requests/74.
We had a temporary fix merged in #6815. Reverting that as well.

## Why?
Sqlite library did not implement functions ResetSession() and IsValid()
in the database connection. sql library was discarding a database
connection when a context was canceled during a transaction. The new
version of modernc.org/sqlite has these two methods implemented.

## How did you test it?
Existing unit test to verify the connection is not lost.

## Potential risks
None

## Documentation

## Is hotfix candidate?
No
2024-11-18 10:50:12 -08:00
Prathyush PVandGitHub 4dd80da229 Fix sqlite connection closed issue (#6815)
## What changed?
Use an sqlite connection that has ResetSession() and IsValid()
implemented.

## Why?
If these methods are not implemented, sql library will close the
connection when the context is cancelled during a transaction. We will
lose the database if this happens.
IsValid() will always return true in this case. We should always have a
valid database connection, otherwise we would have already lost the
database. Similarly ResetSession() does nothing.

## How did you test it?
Tried to reproduce the issue by cancelling a transaction context.

## Potential risks
None

## Documentation

## Is hotfix candidate?
No
2024-11-14 21:31:03 +00:00
3f359ab721 add support for multiple pragma statements and driver syntax (#3031)
* add support for multiple pragma statements and driver syntax

* Update common/persistence/sql/sqlplugin/sqlite/driver.go

Co-authored-by: Alex Shtin <[email protected]>

* Update common/persistence/sql/sqlplugin/sqlite/plugin.go

Co-authored-by: Alex Shtin <[email protected]>

Co-authored-by: Alex Shtin <[email protected]>
2022-06-30 12:56:31 -07:00
Jeremy BreidingandGitHub d3b480cab9 replace sqlite3 with modernc (#2704)
* replace sqlite3 with modernc

* file mode tests

* Expand tests to include file persistence for sqlite
2022-04-13 15:29:38 -07:00
Alex ShtinandGitHub 87c5e9873a Enable cgo by default and disable it explicitly for docker image build (#2396) 2022-01-20 17:06:23 -08:00
Jacob LeGroneandGitHub c6eee98792 Add SQLite storage driver (#1968)
* Import SQLite driver from Temporalite: these files originated from https://github.com/DataDog/temporalite
* Add SQLite driver layer & UT
* Use mattn SQLite driver

NOTE: SQLite support is still in development stage
2021-09-29 14:20:40 -07:00