sourcegraph/dev
William Bezuidenhout 8a3e4c3bcc
fix(sg): cloud ephemeral - do no trigger builds on main-dry-run (#64190)
Triggering cloud ephemeral builds on main-dry-run leads to unexpected
results which is due to how the eventual pipeline is generated.

Closes DINF-165

### Generated pipeline?
The pipeline gets generated based on _what matches first_. We detect
cloud ephemeral builds if there is an environment variable
`CLOUD_EPHEMERAL=true`. We detect main-dry-runs if the branch prefix is
`main-dry-run`...

Now due to the `main-dry-run` match happening before the cloud ephemeral
match a Cloud Ephemeral build on a main dry run gets detected as _just_
a `main-dry-run` build.

#### Alternatives
Sure we can just move the Cloud Ephemeral match earlier, but it's
difficult to say what else might break. We could also just add the we
force the runtype to always be `CloudEphemeral` if we're on the Cloud
Ephemeral pipeline, but I don't want to make the pipline a special
snowflake and detect the current pipeline just for Cloud Ephemeral.

#### Why deny it the deployment?
Ultimately, `main-dry-run` builds are meant for ... `main` not cloud
ephemeral. People can just switch to their original branch and run `sg
cloud eph deploy` and the branch will be deployed with no issue

## Test plan
Executed locally
```
./sg-test cloud eph build
⚠️ Running sg with a dev build, following flags have different default value unless explictly set: skip-auto-update, disable-analytics
⚠️ Triggering Cloud Ephemeral builds from "main-dry-run" branches are not supported. Try renaming the branch to not have the "main-dry-run" prefix as it complicates the eventual pipeline that gets generated

  To rename a branch and launch a cloud ephemeral deployment do:

  1.  git branch -m "main-dry-run/lol" <my-new-name>
  2.  git push --set-upstream origin <my-new-name>
  3. trigger the build by running  sg cloud ephemeral build
  FAQ https://www.notion.so/sourcegraph/How-to-deploy-my-branch-on-an-ephemeral-Cloud-instance-dac45846ca2a4e018c802aba37cf6465?pvs=4#20cb92ae27464891a9d03650b4d67cee


 failed to trigger epehemeral build for branch: main-dry-run branch is not supported
```

## Changelog
* sg: deny deployment of `main-dry-run` branches on Cloud Ephemeral.
2024-07-31 16:16:29 +02:00
..
auth-provider remove more ENTERPRISE=1 remnants (#57232) 2023-10-02 10:43:11 -07:00
authtest chore: Remove client construction from SignUp/In funcs (#62789) 2024-05-21 15:18:58 +02:00
backcompat chore(ci): bump backcompat target to 5.4.0 (#62623) 2024-05-13 11:37:11 +02:00
bkstats fix(build-tracker): Failed back-compat doesn't count towards branch-locking quota (#63911) 2024-07-25 06:45:09 -05:00
build-tracker fix(build-tracker): Failed back-compat doesn't count towards branch-locking quota (#63911) 2024-07-25 06:45:09 -05:00
buildchecker fix(build-tracker): Failed back-compat doesn't count towards branch-locking quota (#63911) 2024-07-25 06:45:09 -05:00
check Update the outdated link to #dev-experience to #discuss-dev-infra (#64018) 2024-07-25 06:58:22 -05:00
ci chore(bazel): emit json profile for image push jobs (properly) (#64189) 2024-07-31 13:46:15 +01:00
clustering Dev tool: python script for text clustering based on local embeddings (#58691) 2023-12-04 09:27:14 -05:00
codehost_testing bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
codeintel-qa chore: Remove client construction from SignUp/In funcs (#62789) 2024-05-21 15:18:58 +02:00
db scripts: dont run subshell in for loop (#60611) 2024-02-19 14:48:33 +00:00
depgraph depgraph: Fix spurious error when no subcommand name is passed (#61871) 2024-04-15 16:10:44 +02:00
deployment-lag-notifier bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
deployment-notifier fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
gitserverintegration gitserver: Framework to support integration testing against gitserver (#62801) 2024-06-07 17:01:12 +02:00
go-mockgen-gazelle bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
go-mockgen-transformer bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
gqltest authz: Compute providers on the fly (#64012) 2024-07-31 02:59:41 +02:00
grafana chore: remove unused dev/sg/internal/loki (#61923) 2024-04-16 12:19:32 +00:00
insight-data-gen bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
internal/cmd bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
linearhooks chore/linearhooks: use MSP rollouts (#63556) 2024-07-01 18:24:40 +01:00
linters feat: Add support for precise usagesForSymbol (#64126) 2024-07-31 13:55:07 +08:00
managedservicesplatform sg/msp: enable alerting by default for production projects (#63912) 2024-07-18 20:57:38 +01:00
nix fix(nix/p4-fusion): update p4-fusion helix-api hashes (#63805) 2024-07-15 10:20:33 +02:00
perforce bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
phabricator add shellcheck & shfmt to pre-commit's pre-push hook (#59485) 2024-01-11 14:16:22 +00:00
pr-auditor Removed pr-auditor and left redirect notice (#59497) 2024-01-10 15:15:24 -08:00
prometheus telemetry-gateway: migrate to MSP runtime (#58814) 2023-12-08 12:14:34 -08:00
scaletesting bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
sg fix(sg): cloud ephemeral - do no trigger builds on main-dry-run (#64190) 2024-07-31 16:16:29 +02:00
src-expose chore: Change errors.HasType to respect multi-errors (#63024) 2024-06-06 13:02:14 +00:00
team bazel: native go-mockgen in Bazel (#60386) 2024-02-16 13:26:48 +00:00
tilt
tools chore(ci): instrument push_all.sh commands in honeycomb (#63350) 2024-06-19 18:16:21 +01:00
update-embeddings-list reapply "switch from jest to vitest for faster, simpler tests (#57886)" (#58145) 2023-11-07 12:00:18 +02:00
zoekt gomod: update zoekt to fix several CVEs in dependencies (#60093) 2024-02-02 15:36:04 +00:00
.gitignore
add_https_domain_to_hosts.sh
bazel_buildkite_stamp_vars.sh bazel: test volatile variables with Percy (#51693) 2023-05-11 09:20:42 +00:00
bazel_stamp_vars.sh Reapply "bazel: migrate dind dockerfile to rules_oci" (#61790) (#61824) 2024-04-12 15:52:44 +00:00
BUILD.bazel chore: Move authn into cmd/frontend (#63648) 2024-07-31 03:26:25 +02:00
caddy.sh fix(sg): start Caddy admin server before caddy trust (#58928) 2023-12-20 10:03:45 +02:00
Caddyfile Add an option for disabling HTTP/2 when communicating with Cody Gateway (#59668) 2024-01-17 15:36:40 +01:00
check-test-ownership.sh feat(ci): add GHA to report when Bazel test ownership drops below 70% threshold (#62985) 2024-05-31 14:46:01 +01:00
check-tokens.sh chore(local): add FORBIDCOMMIT pragma to prevent accidental commits (#63581) 2024-07-01 18:27:26 +00:00
CLA.txt
codeinsights-db.sh
comby-install-or-upgrade.sh add shellcheck & shfmt to pre-commit's pre-push hook (#59485) 2024-01-11 14:16:22 +00:00
defs.bzl Removed unused bazel macro arg (#60996) 2024-03-11 06:36:15 -07:00
dev-sourcegraph-server.sh
docsite.sh [docsite]: bump version (#56013) 2023-08-18 12:40:44 -06:00
drop-entire-local-database-and-redis.sh
esbuild.bzl chore(bazel): enable rules_esbuild sandbox with object-inspect workaround (#61969) 2024-06-05 15:34:29 +01:00
eslint-report-test.sh Revert "revert "bazel: improve ESLint rule" (#52853)" (#52878) 2023-06-04 19:06:39 -07:00
eslint.bzl chore(bazel): fixup custom eslint test rule after bump to rules_js 2 (#63143) 2024-06-06 23:32:34 +01:00
forbidcommit.sh chore(local): add FORBIDCOMMIT pragma to prevent accidental commits (#63581) 2024-07-01 18:27:26 +00:00
foreach-non-web-client-project.sh release: drop legacy release tooling (#61220) 2024-04-09 14:29:35 -05:00
git-stats
global-settings.json Chore: remove search console (#63322) 2024-06-19 11:05:03 -06:00
go_defs.bzl build: add buildifier check to Aspect Workflows (#58566) 2023-11-27 14:58:01 +02:00
go_mockgen_rule.bzl bump to Go 1.22.1 (#60902) 2024-03-06 17:38:43 -07:00
go_mockgen.bzl bazel: native go-mockgen in Bazel (#60386) 2024-02-16 13:26:48 +00:00
go_stringer.bzl build: upgrade to Bazel 7 pre-release (#57970) 2023-10-31 15:29:14 +02:00
go-mod-update.sh
licenses.sh fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
migrations.bzl bazel: add utility macro for wrapping single-file tools (#62930) 2024-05-27 16:53:51 +00:00
mocha.bzl chore(ci): remove Percy visual tests (#63515) 2024-06-27 16:20:06 +02:00
msp_delivery.bzl msp_delivery: infer pipeline id from service_id and region (#61395) 2024-03-26 15:30:27 +00:00
oci_defs.bzl feat(bazel): read binary version info from accompanying files in OCI images instead of stamping //internal/version (#63977) 2024-07-30 20:52:01 +00:00
oci_deps.bzl chore(security): Updated dind image to 27-0-3 (#63725) 2024-07-09 12:59:18 -04:00
p4-fusion-dev bazel: provide p4-fusion via bazel (#58893) 2023-12-11 16:06:06 +00:00
proto.bzl fix: gazelle and proto generation (continuation of #49547) (#49713) 2023-04-11 11:36:45 +02:00
prune-pick.sh
redis-postgres.yml fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
redis.conf
remote_cache_local_env.sh chore(sg): sg bazel uses remote cache by default (unless in CI) (#62245) 2024-04-29 18:56:18 +02:00
run-server-image.sh Remove HTTP for inter-service RPC (#59093) 2024-01-11 19:46:32 +01:00
sass.bzl Buildifier fixes (#48691) 2023-03-07 10:15:26 +01:00
schema_migrations.bzl chore(rel): bump minor for stitch graph + add support invalidating migrations repo rule (#62511) 2024-05-07 22:04:59 +00:00
scip-ctags-dev local: fix scip-ctags install script (#57252) 2023-10-02 14:58:14 +00:00
scip-ctags-install.sh syntax-highlighter: initial ctags work (w/ musl scip-ctags) (#52643) 2023-05-30 17:19:39 -04:00
scip-syntax-dev highlighter: Rename scip-treesitter-cli -> scip-syntax (#60077) 2024-02-05 13:15:09 +01:00
scip-syntax-install.sh Syntactic indexing: add database schema and dbworker (#60055) 2024-02-08 18:00:21 +00:00
site-config.json Remove broken federation feature (#55161) 2023-07-20 17:30:32 +00:00
src-prof-services.json Add embeddings to server behind env var (#50288) 2023-04-04 16:45:50 +02:00
src-search-meta.sh
tool_deps.bzl chore(security) : upgrade src-cli version to address CVE (#63750) 2024-07-10 09:57:16 -04:00
tools.go dev/linearhooks: add POC (#62367) 2024-05-07 00:14:05 -07:00
universal-ctags-dev bzl: do not show full commmand line for ctags in dev (#58261) 2023-11-10 10:05:25 -05:00
write_generated_to_source_files.bzl bazel: native go-mockgen in Bazel (#60386) 2024-02-16 13:26:48 +00:00