Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pull release/v1.77.0 into main #1466

Merged
merged 5 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.77.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.76.0...v1.77.0) (2024-06-14)


### Features

* added device-mode support for customer.io ([#1430](https://github.com/rudderlabs/rudder-config-schema/issues/1430)) ([1e7545a](https://github.com/rudderlabs/rudder-config-schema/commit/1e7545a86c85314997dda0c5852a0df08755a603))
* added GCM support for Amplitude ([#1455](https://github.com/rudderlabs/rudder-config-schema/issues/1455)) ([8bd8915](https://github.com/rudderlabs/rudder-config-schema/commit/8bd891512d59151c3a10b45252cc6dc93a2bf0b7))

## [1.76.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.75.2...v1.76.0) (2024-06-10)


Expand Down
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,43 @@ And then, setup the project dependencies by running below command:

`npm run setup`

Run below command to deploy integrations definitions config to database:
The below command deploys integration definitions to the specified control-plane database:

```
python3 ./scripts/deployToDB.py <config-be-url> <username> <password>
python3 ./scripts/deployToDB.py --help

Ex:
python3 ./scripts/deployToDB.py http://localhost:5050 myusername mypassword
usage: deployToDB.py [-h] [control_plane_url] [username] [password]

Script to deploy config files to DB.

positional arguments:
control_plane_url Control plane URL
username Control plane admin username
password Control plane admin password

options:
-h, --help show this help message and exit
```

#### Positional argument environment variable fallback table

| Positional Argument | Fallback Environment Variable | Description |
| ------------------- | ----------------------------- | --------------------- |
| ARG1 | CONTROL_PLANE_URL | The control plane URL |
| ARG2 | API_USER | The cp admin |
| ARG3 | API_PASSWORD | The cp admin password |

### Usage examples

```
# Just command line args
python3 ./scripts/deployToDB.py http://localhost:5050 foo bar

# Some command line some envs
API_USER=foo API_PASSWORD=bar python3 ./scripts/deployToDB.py http://localhost:5050

# Just envs
CONTROL_PLANE_URL=http://foo.bar API_USER=foo API_PASSWORD=bar python3 ./scripts/deployToDB.py
```

## Contribute
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder-config-schema",
"version": "1.76.0",
"version": "1.77.0",
"description": "",
"main": "src/index.ts",
"private": true,
Expand Down
55 changes: 37 additions & 18 deletions scripts/deployToDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,46 @@
import os
import sys
import jsondiff
import argparse
from constants import CONFIG_DIR

#########################
# ENV VARIABLES FOT TESTING
# CONTROL_PLANE_URL="https://api.rudderstack.com"
# print(CONTROL_PLANE_URL)
# USERNAME="cbadmin"
# print(USERNAME)
# PASSWORD="testpassword"
# print(PASSWORD)
#########################

#########################
# ENV VARIABLES
CONTROL_PLANE_URL = sys.argv[1]
print(CONTROL_PLANE_URL)
USERNAME = os.environ["API_USER"] # sys.argv[2]
print(USERNAME)
PASSWORD = os.environ["API_PASSWORD"] # sys.argv[3]
# print(PASSWORD)
#########################
def get_command_line_arguments():
parser = argparse.ArgumentParser(description="Script to deploy config files to DB.")
parser.add_argument("control_plane_url", nargs="?", help="Control plane URL")
parser.add_argument("username", nargs="?", help="Control plane admin username")
parser.add_argument("password", nargs="?", help="Control plane admin password")

args = parser.parse_args()

control_plane_url = args.control_plane_url or os.getenv("CONTROL_PLANE_URL")
username = args.username or os.getenv("API_USER")
password = args.password or os.getenv("API_PASSWORD")

missing_args = []

if control_plane_url is None:
missing_args.append(
"1st positional argument or CONTROL_PLANE_URL environment variable"
)
if username is None:
missing_args.append("2nd positional argument or API_USER environment variable")
if password is None:
missing_args.append(
"3rd positional argument or API_PASSWORD environment variable"
)

if missing_args:
print("Error: Missing the following arguments or environment variables:")
for arg in missing_args:
print(arg)
sys.exit(1)

return control_plane_url, username, password


CONTROL_PLANE_URL, USERNAME, PASSWORD = get_command_line_arguments()

# CONSTANTS
HEADER = {"Content-Type": "application/json"}
AUTH = (USERNAME, PASSWORD)
Expand Down
1 change: 1 addition & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ requests
jsonschema
jsondiff
black
argparse
30 changes: 18 additions & 12 deletions src/configurations/destinations/am/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"trackNewCampaigns",
"userProvidedScreenEventString",
"useUserDefinedScreenEventName",
"proxyServerUrl"
"proxyServerUrl",
"consentManagement"
],
"excludeKeys": [],
"supportedSourceTypes": [
Expand Down Expand Up @@ -114,7 +115,8 @@
"eventUploadThreshold",
"eventUploadPeriodMillis",
"trackNewCampaigns",
"proxyServerUrl"
"proxyServerUrl",
"consentManagement"
],
"android": [
"eventUploadPeriodMillis",
Expand All @@ -123,15 +125,17 @@
"connectionMode",
"enableLocationListening",
"trackSessionEvents",
"useAdvertisingIdForDeviceId"
"useAdvertisingIdForDeviceId",
"consentManagement"
],
"ios": [
"eventUploadPeriodMillis",
"eventUploadThreshold",
"useNativeSDK",
"connectionMode",
"trackSessionEvents",
"useIdfaAsDeviceId"
"useIdfaAsDeviceId",
"consentManagement"
],
"reactnative": [
"eventUploadPeriodMillis",
Expand All @@ -141,7 +145,8 @@
"enableLocationListening",
"trackSessionEvents",
"useAdvertisingIdForDeviceId",
"useIdfaAsDeviceId"
"useIdfaAsDeviceId",
"consentManagement"
],
"flutter": [
"eventUploadPeriodMillis",
Expand All @@ -151,14 +156,15 @@
"enableLocationListening",
"trackSessionEvents",
"useAdvertisingIdForDeviceId",
"useIdfaAsDeviceId"
"useIdfaAsDeviceId",
"consentManagement"
],
"unity": ["connectionMode"],
"amp": ["connectionMode"],
"cloud": ["connectionMode"],
"warehouse": ["connectionMode"],
"cordova": ["connectionMode"],
"shopify": ["connectionMode"]
"unity": ["connectionMode", "consentManagement"],
"amp": ["connectionMode", "consentManagement"],
"cloud": ["connectionMode", "consentManagement"],
"warehouse": ["connectionMode", "consentManagement"],
"cordova": ["connectionMode", "consentManagement"],
"shopify": ["connectionMode", "consentManagement"]
},
"secretKeys": ["apiKey", "apiSecret"]
}
Expand Down
Loading
Loading