## 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`.
## What changed?
Send raw history events from history to matching service similar to the
change in https://github.com/temporalio/temporal/pull/7179.
Instead of deserializing history blobs to history events, history
service will send the raw bytes to matching service. History service
uses a different proto message to do that. Matching client response
proto has History message in the same field. GRPC's proto
deserialization will automatically deserialize raw history batch bytes
to History message. Matching to frontend response still have
deserialized History message in the response. And there is not much CPU
usage to save by changing this.
## Why?
We have seen incidents of high history CPU usage when large amount of
history events are pulled. With this change we can reduce the CPU burden
on history service during this time.
## How did you test it?
Unit tests
## Potential risks
## Documentation
## Is hotfix candidate?
No
## What changed?
Change to send raw history blobs from history service to frontend
service. History service returns a new proto message that has a repeated
bytes history field.
This response is wire compatible with the original response which has
temporal.api.history.v1.History type for this field. This allows history
service to not deserialize events from this data blob. This considerably
reduces CPU usage.
History service still needs event_id and version decoded from history
events. For this we use a new proto message StrippedHistoryEvent which
has these two fields only. It takes considerably less CPU to decode
events to this struct.
## Why?
We have seen incidents of high history CPU usage when large number of
GetWorkflowExecutionHistory calls are made to workflows which has large
history. With this change we can reduce the CPU burden on history
service during this API call.
## How did you test it?
Existing unit and functional tests.
## Potential risks
## Documentation
## Is hotfix candidate?
- **Revert "Fix history batch validations (#7281)"**
- **Revert "Send raw history blobs from history service to frontend
(#7179)"**
## What changed?
Revert the changes for returning raw history event from history to
frontend.
## Why?
Some logic is moved from history to frontend handler. This might cause
issues during upgrade.
I will push a change to first copy these operations to frontend. Once
that change is released, I will reapply this change.
## How did you test it?
## Potential risks
## Documentation
## Is hotfix candidate?
## What changed?
Change to send raw history blobs from history service to frontend
service. History service returns a new proto message that has a repeated
bytes history field.
This response is wire compatible with the original response which has
temporal.api.history.v1.History type for this field. This allows history
service to not deserialize events from this data blob. This considerably
reduces CPU usage.
History service still needs event_id and version decoded from history
events. For this we use a new proto message StrippedHistoryEvent which
has these two fields only. It takes considerably less CPU to decode
events to this struct.
## Why?
We have seen incidents of high history CPU usage when large number of
GetWorkflowExecutionHistory calls are made to workflows which has large
history. With this change we can reduce the CPU burden on history
service during this API call.
## How did you test it?
Existing unit tests and manual test to run workflows.
## Potential risks
## Documentation
## Is hotfix candidate?
No
## What changed?
- Add (back) make target buf-breaking to run buf's breaking proto
changes check against the parent commit and the main branch.
- Add buf-breaking to ci-build-misc so it runs in CI.
- Fix goimports target to use shell variables instead of git variables
to make make faster, and also fix the binary name (was just broken).
- GitHub Actions: run tests on PR head, not merge.
## Why?
Detecting breaking proto changes early avoids bugs.
## How did you test it?
Manual testing with deliberate breaking changes.
## What changed?
- Rearrange make targets and scripts so that generated proto files (in
`api`) are fully generated before replacing existing files.
- Put all steps for generating proto files in a single script.
## Why?
- Previously, if any part of proto generation failed (including
installing dependencies), the repo would be left in a broken state with
either missing files, or incorrectly-generated files, depending on where
the failure was. This runs all the generation steps in a designated
order before touching any existing files, then moves them over in one
step. On failure, the new files are left in `api.new`.
- Relying on make ordering is icky.
## How did you test it?
manual testing