Commit Graph
13 Commits
Author SHA1 Message Date
Rodrigo ZhouandGitHub 5dc8f51d25 Refactor Visibility SQL parsing search attributes for DB write (#8341)
## What changed?
Move converting `time.Time` values for `Datetime` type search attributes
to the DB plugin code.

## Why?
This gives more flexibility for the plugin implementation to deal with
it as needed.

## 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)

## Potential risks
2025-09-17 17:58:08 -05:00
Kent GruberandGitHub eadf754dc8 Use better string splitting techniques where possible (#8226)
## What changed?

This PR aims to avoid usage of
[`strings.Split`](https://pkg.go.dev/strings#Split) where possible in
favor of better string splitting techniques, speficially:
[`strings.SplitN`](https://pkg.go.dev/strings#SplitN) and
[`strings.SplitSeq`](https://pkg.go.dev/strings#SplitSeq) where
appropriate.

There was also a [`strings.Fields`](https://pkg.go.dev/strings#Fields)
change I made to use
[`strings.FieldsSeq`](https://pkg.go.dev/strings#FieldsSeq) instead, and
another for S3 to use the [`path`](https://pkg.go.dev/path) package
instead of [`strings.Split`](https://pkg.go.dev/strings#Split).

## Why?

[`strings.SplitN`](https://pkg.go.dev/strings#SplitN) and
[`strings.SplitSeq`](https://pkg.go.dev/strings#SplitSeq) are often
better options in many cases, and can be _partially_ detected using
[`modernize`](https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize):
> `stringsseq`: replace Split in "for range strings.Split(...)" by
go1.24's more efficient `SplitSeq`, or `Fields` with `FieldSeq`.

## How did you test it?
- [X] built
- [X] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks

There are lots of potentially subtle behaviors from the `strings.Split`
(and `strings.Fields`) usage that should be accounted for. If our
existing tests don't cover those subtleties, there's risk for
introducing an unintended bug. More intricate handling/parsing
previously using the `strings` package should get extra attention from
reviewers. I've attempted to break up my changes into logical commit
chunks to aid in review / help spot potentially concerning changes.
2025-08-26 13:23:40 -04: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
25897e200b Add version column to SQLlite, MySQL, and Postgress VisibilityStores (#7350)
## What changed?
Add version column to SQLlite, MySQL, and Postgress VisibilityStores

## Why?
There is no built in support for versioning in SQLlite, MySQL, and
Postgress, which leaves open the possibility for out-of-order updates.
We need to explicitly have a column for version to prevent this.

## How did you test it?
Manually tested that Server can run normally (still some bugs). There
will be more tests with nightly pipelines and mid pipeline version
changes to test backwards compatibility.

## Potential risks
High. A failure during table alteration or in compatibility guarantees
would entirely halt all visibility updates.

## Documentation
Not that I am aware of. We will have to close several github issues
though!

## Is hotfix candidate?
Not for cloud. Aiming for upcoming OSS release.

---------

Co-authored-by: rodrigozhou <[email protected]>
2025-02-15 22:31:28 -07:00
Rodrigo ZhouandGitHub f144062d7f Support count group by in visibility with SQL (#4666) 2023-07-27 16:03:09 -05:00
Rodrigo ZhouandGitHub b2a733823e Support CountWorkflowExecutions for SQL DB (#3955) 2023-02-14 16:59:12 -08:00
Rodrigo ZhouandGitHub 49ababab77 Advanced visibility for SQLite (#3895) 2023-02-03 00:46:58 -08:00
Rodrigo ZhouandGitHub f5c2446dc3 Fix GetWorkflowExecution in PostgreSQL (#3816) 2023-01-24 12:20:45 -08:00
Rodrigo ZhouandGitHub 4213f95d0f Create visibility GetWorkflowExecution API (#3488) 2022-10-17 19:26:16 -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
Jeremy BreidingandGitHub a5ddc3ca73 Sql task queue visibility (#2537)
* Adding task_queue to read/write paths
for postgresql executions_visibility

* Adding task_queue for mysql and sqlite
2022-02-24 18:22:46 -08: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