Skip to content

Tags: kbumsik/sourcegraph

Tags

app-v2023.7.4+1332.fc76a9c675

Toggle app-v2023.7.4+1332.fc76a9c675's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
app: resolve port :9000 conflicts (change to :49000) (sourcegraph#54466)

Apparently VS Code's Python support uses port 9000, so as long as we use
it most VS Code Python devs can't run the app due to the port conflict
with our services.

This PR switches the app's blobstore to listen on `:49000` instead of
`:9000`. My thinking for now is that we can centralize all "default
endpoint" and "what host/port should I listen on?" into the `deploy`
package, and for now just change ports to have a `4` in front of them to
reduce the change of conflicts.

Later, once we have them centralized in the `deploy` package we can
easily modify that code to pick an unavailable port.

This also binds blobstore to `127.0.0.1` (more secure), previously it
was bound to `localhost`.

## Test plan

To test this I did the following:

1. [x] Methodically searched our codebase for `9000` and vetted each
instance, to ensure I didn't miss anything.
2. [x] Tested with `sg start app` and confirmed `sudo lsof -i -P | grep
LISTEN | grep :9000` reported nothing while `sudo lsof -i -P | grep
LISTEN | grep :49000` did.
3. [x] Created an app build with `./enterprise/dev/app/build.sh` and
tested it:
* [x] Confirmed embeddings generation (which get stored in blobstore)
still works through the setup wizard
4. [x] Confirmed `sg start enterprise-codeintel` starts and runs

Signed-off-by: Stephen Gutekanst <[email protected]>

app-v2023.6.28+1331.1867679b11

Toggle app-v2023.6.28+1331.1867679b11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
dotcom/productsubscription: allow SA to do license key lookup (source…

…graph#54399)

This is required for upcoming Cloud automation:
sourcegraph/controller#805

Currently we can't do the lookup:

```
ERROR mi2.instance.check.enforce.Enforce.cody mi2/instance.go:511 error encountered {"TraceId": "03e4d62c01a89c6a62e5d2e8f1cb6df6", "SpanId": "98bf6654fdf74de6", "environment": "prod", "instance": "src-96ed006bb45d673944e4", "error": "GetEmbeddingsIndexerToken: getSubscription: GetProductSubscriptionByLicense: input: dotcom.productLicenses must be site admin"}
```

## Test plan

unit tests on the `serviceAccountOrSiteAdmin` helper