sourcegraph/cmd/migrator
Jean-Hadrien Chabran fa7fce585c
chore(ci): conditionally stamp genrules (#63204)
See https://github.com/bazelbuild/bazel/releases/tag/7.1.0 which
introduces a new value for the stamp attribute for `genrule`: `stamp =
-1` which makes the stamping conditional.

Previously, any genrule that had `stamp = 1` would be stamping all the
time due to how it was implemented prior 7.1. An as we stamp builds with
a computed version that is date dependent, we would never get cache hits
on those, leading to `//cmd/migrator:image_test` being executed all the
time. It wasn't that big of an issue as it's rather quick, but still.

Now the `genrule` supports that there's no reason to fix that one. 


## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles
-->

CI 

## Changelog

- Avoid invalidating cache in stamped genrules on dev builds.
2024-06-12 15:04:43 +02:00
..
airgappedgen chore(ci): conditionally stamp genrules (#63204) 2024-06-12 15:04:43 +02:00
shared bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
BUILD.bazel chore(ci): conditionally stamp genrules (#63204) 2024-06-12 15:04:43 +02:00
image_test.yaml rfc795: new release process foundations (#60962) 2024-03-12 17:12:22 +01:00
main.go logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
README.md migrator: Run migrations (#28150) 2021-12-08 16:44:55 -06:00

Migrator

The migrator service is deployed ahead of a Sourcegraph version upgrade to synchronously run database migrations required by the next version. Successful exit of the migrator denotes that the new version can be deployed. Database migrations are written to be backwards-compatible so that running the migrator for the next upgrade does not cause issues with a working instance.