-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/restore-critical-exp
- Loading branch information
Showing
187 changed files
with
32,530 additions
and
1,483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,23 +54,21 @@ The [user feedback widget](https://docs.sentry.io/platforms/javascript/user-feed | |
|
||
# Local Setup / Development | ||
|
||
> [!WARNING] | ||
> Don't simply use `npm run` etc directly, please use the build system (`deploy.sh`) that's documented in detail below. It's not meant to be run directly. | ||
## Setup | ||
|
||
1. Permit your IP address in CloudSQL: | ||
1. Go to https://console.cloud.google.com/sql/instances | ||
2. You will see 1 instance, under Actions column click "..." -> Edit | ||
3. Expand "Connections", under Authorized Networks click "ADD NETWORK" | ||
4. Google "my IP address", add it. | ||
2. Copy `local.env` from [empower-config](https://github.com/sentry-demos/empower-config) into `env-config` directory of your local repo, or, if you don't have access to it, follow `env-config/example.env`. | ||
3. The `REACT_APP_FLASK_BACKEND` in `env-config/local.env` points to the backend instance deployed to AppEngine, the same one used by the cloud-hosted React web app. Flask is the default backend. If you expect to run other backend types, add values for those in `env-config` in your `local.env` file as well (i.e. `REACT_APP_EXPRESS_BACKEND`). | ||
4. Confirm [Homebrew](https://brew.sh/) is installed with `brew -v`. If not, install using `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`. | ||
5. Confirm PostgreSQL is installed with `Postgres -V`. If not, install using `brew install postgresql`. | ||
6. As the application is compatible with specific versions of `node` and `npm`, install the following to be able to set the specific versions required (below describes how to achieve it using `n` package, but alternatively you can use `nvm`): | ||
1. Copy `local.env` from [empower-config](https://github.com/sentry-demos/empower-config) into `env-config` directory of your local repo, or, if you don't have access to it, follow `env-config/example.env`. | ||
2. The `REACT_APP_FLASK_BACKEND` in `env-config/local.env` points to the backend instance deployed to AppEngine, the same one used by the cloud-hosted React web app. Flask is the default backend. If you expect to run other backend types, add values for those in `env-config` in your `local.env` file as well (i.e. `REACT_APP_EXPRESS_BACKEND`). | ||
3. Confirm [Homebrew](https://brew.sh/) is installed with `brew -v`. If not, install using `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`. | ||
4. Confirm PostgreSQL is installed with `Postgres -V`. If not, install using `brew install postgresql`. | ||
5. As the application is compatible with specific versions of `node` and `npm`, install the following to be able to set the specific versions required (below describes how to achieve it using `n` package, but you can use `nvm`): | ||
1. Install compatible `npm` version with `npm install -g [email protected]`. NOTE: may need to use `sudo` with command. | ||
2. Install `n` to update `node` version with `npm install -g n`. | ||
3. Set the specific `node` version with `n XX.XX.XX`. NOTE: may need to use `sudo` with command. | ||
7. Configure the `CLI` using [this](https://docs.sentry.io/product/cli/configuration/) document. | ||
8. Install [gcloud](https://cloud.google.com/sdk/docs/install) in the root of your project to be able to deploy to staging. Initialize the gcloud CLI by running `gcloud init`. When prompted, choose the project `sales-engineering-sf`. | ||
6. Configure the `CLI` using [this](https://docs.sentry.io/product/cli/configuration/) document. | ||
7. Install [gcloud](https://cloud.google.com/sdk/docs/install) in the root of your project to be able to deploy to staging. Initialize the gcloud CLI by running `gcloud init`. When prompted, choose the project `sales-engineering-sf`. | ||
|
||
Following sub-projects might not work with `deploy.sh` at this moment. Consult their README's for how to run and deploy them (and feel free to submit a PR that fixes it): | ||
|
||
|
@@ -180,3 +178,11 @@ gcloud config list, to display current account | |
``` | ||
|
||
`gcloud app deploy` does not support `--update-env-vars RELEASE=$RELEASE` like `gcloud run deploy` does with Cloud Run | ||
|
||
## Local Run with AI Suggestions | ||
|
||
1. Add your OPENAI_API_KEY= to local.env | ||
2. Run next and flask (./deploy.sh --env=local next flask) | ||
3. Get suggestion button should show automatically | ||
|
||
On main page load, next will check with flask if it has the OPEN_API_KEY and conditionally show the get suggestion input. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
sentry-sdk==1.23.0 | ||
python-dotenv==1.0.0 | ||
sentry-sdk==2.4.0 | ||
python-dotenv==1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
service: <SERVICE> | ||
service: <SERVICE> | ||
runtime: python312 | ||
entrypoint: gunicorn -b :$PORT -w 2 src.main:app | ||
entrypoint: gunicorn -b :$PORT -w 2 --timeout 60 src.main:app | ||
|
||
env_variables: | ||
REDISHOST: 10.251.35.179 | ||
REDISPORT: 6379 | ||
|
||
vpc_access_connector: | ||
name: projects/sales-engineering-sf/locations/us-central1/connectors/empower-plant-connector | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.