Skip to content

Commit

Permalink
refactor: test deployment name
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanBergenov committed Sep 13, 2023
1 parent b4321a3 commit 0456a11
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Python package
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
DEPLOYMENT_NAME: "ga-flattener-deployment"
DEPLOYMENT_NAME: "ga4-flattener-deployment"

on:
push:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
# remove GCS config file
# if we cannot delete, continue with the script
# https://stackoverflow.com/questions/22009364/is-there-a-try-catch-command-in-bash
gsutil rm gs://ga-flattener-deployment-464892960897-adswerve-ga-flat-config/config_datasets.json || echo "ERROR: cannot delete GCS config file"
gsutil rm gs://ga4-flattener-deployment-464892960897-adswerve-ga-flat-config/config_datasets.json || echo "ERROR: cannot delete GCS config file"
gcloud deployment-manager deployments list
gcloud deployment-manager deployments delete "$DEPLOYMENT_NAME" -q || echo "ERROR: cannot delete deployment"
Expand All @@ -66,7 +66,7 @@ jobs:
gcloud deployment-manager deployments create "$DEPLOYMENT_NAME" --config ga_flattener.yaml
# check for the config file
gsutil stat gs://ga-flattener-deployment-464892960897-adswerve-ga-flat-config/config_datasets.json || echo "ERROR: GCS config file not found"
gsutil stat gs://ga4-flattener-deployment-464892960897-adswerve-ga-flat-config/config_datasets.json || echo "ERROR: GCS config file not found"
- name: Test with pytest
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ The GCP resources for the solutions are installed via Deployment Manager.
* An example of a valid
name is in this command:
```gcloud deployment-manager deployments create ga-flattener-deployment --config ga_flattener.yaml```
```gcloud deployment-manager deployments create ga4-flattener-deployment --config ga_flattener.yaml```
* Please refer to the [documentation](https://cloud.google.com/deployment-manager/docs/deployments) for more examples of valid deployment names.
Expand Down Expand Up @@ -539,7 +539,7 @@ python -m tools.pubsub_message_publish
# authorize the request in GCP UI if required

# the backfill script will print something like this:
# INFO: Publishing backfill message to topic ga-flattener-deployment-topic for {project_id}.analytics_{ga4_property_id}.events_{date_shard}
# INFO: Publishing backfill message to topic ga4-flattener-deployment-topic for {project_id}.analytics_{ga4_property_id}.events_{date_shard}

```
Expand Down
4 changes: 2 additions & 2 deletions tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self):
# TODO: I put dataset, table_type and date under context env var, but probably they don't really belong here(?)
if sys.platform.startswith('linux'): # if we're on a GitHub CI/CD VM
self.env = {
"deployment": "ga-flattener-deployment"
"deployment": "ga4-flattener-deployment"
, "project": "as-dev-ga4-flattener-320623"
, "current_time": 1626736965
, "project_number": "464892960897"
Expand All @@ -32,7 +32,7 @@ def __init__(self):
}
else: # if we are testing locally
self.env = {
"deployment": "ga-flattener-deployment"
"deployment": "ga4-flattener-deployment"
, "project": "as-dev-ga4-flattener-320623"
, "current_time": 1626736965
, "project_number": "464892960897"
Expand Down
2 changes: 1 addition & 1 deletion tools/pubsub_message_publish_intraday.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'''*****************************'''
''' Configuration Section Start '''
'''*****************************'''
topic_id = "ga-flattener-deployment-topic-intraday" # pubsub topic your cloud function is subscribed to Example: [Deployment Name]-topic
topic_id = "ga4-flattener-deployment-topic-intraday" # pubsub topic your cloud function is subscribed to Example: [Deployment Name]-topic
project_id = "as-dev-ga4-flattener-320623" # GCP project ID, example: [PROJECT_ID]
project_number = "464892960897"
dataset_id = "analytics_222460912"
Expand Down

0 comments on commit 0456a11

Please sign in to comment.