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.74.0 into main #1363

Merged
merged 31 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
71a66a9
feat: onboard new destination sftp
Gauravudia Apr 17, 2024
76721f0
feat: update schema
Gauravudia Apr 22, 2024
4d9bc7e
feat: add file format
Gauravudia Apr 25, 2024
f6cff9f
fix: schema
Gauravudia Apr 25, 2024
54dad38
refactor: remove redundant fields from dest config
Gauravudia Apr 28, 2024
f87aad7
chore: update singer mixpanel image to v8.2.14 (#1341)
am6010 Apr 30, 2024
55ad8d7
feat: improve schema generator (#1207)
saikumarrs Apr 30, 2024
e4e70dd
feat: update schema
Gauravudia May 2, 2024
4dea628
feat: onboard emersys destination (#1335)
shrouti1507 May 6, 2024
fa72fda
fix: adding group call to emarsys (#1349)
shrouti1507 May 6, 2024
63acdaa
Merge branch 'develop' into feat.sftp
Gauravudia May 7, 2024
346c3e5
Merge pull request #1321 from rudderlabs/feat.sftp
Gauravudia May 7, 2024
945ceee
Merge pull request #1346 from rudderlabs/main
ItsSudip May 8, 2024
958e7d3
feat(criteo): add support of sha256 hashing method for email field (#…
mihir-4116 May 13, 2024
05d14f0
fix: remove useNativeSdk from snowflake (#1359)
ItsSudip May 13, 2024
3b4b180
Merge remote-tracking branch 'origin/main' into develop
web-flow May 13, 2024
081150c
chore(release): 1.74.0
web-flow May 13, 2024
9f301a4
feat: app secret support for facebook custom audience (#1358)
shrouti1507 May 14, 2024
27f59e2
Merge pull request #1355 from rudderlabs/main
ItsSudip May 15, 2024
ad4c866
Merge branch 'develop' of github.com:rudderlabs/rudder-integrations-c…
ItsSudip May 15, 2024
8888fda
chore: remove beta flag for GA4 destination
sandeepdsvs May 15, 2024
d1d1b3c
chore: update changelog
ItsSudip May 15, 2024
9dd0fbf
Revert "feat: app secret support for facebook custom audience (#1358)"
ItsSudip May 15, 2024
19cf9ab
Merge pull request #1369 from rudderlabs/revert-1358-feat.appsecret_f…
ItsSudip May 15, 2024
bb56e74
chore: update changelog to remove the reverted changes
ItsSudip May 15, 2024
c112fd6
fix: add unity and web as supported source type on singular
ItsSudip May 15, 2024
9295a46
chore: update changelog
ItsSudip May 15, 2024
8f52452
Merge branch 'release/v1.74.0' into fix.singular
ItsSudip May 15, 2024
797ac97
Merge pull request #1370 from rudderlabs/fix.singular
ItsSudip May 15, 2024
194c7f5
chore: update image version for google ads and fb ads (#1371)
am6010 May 15, 2024
9279fc6
chore: add af_currency to eventValue root via config (#1368)
yashasvibajpai May 16, 2024
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
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

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.74.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.73.0...v1.74.0) (2024-05-13)


ItsSudip marked this conversation as resolved.
Show resolved Hide resolved
### Features

* add file format ([4d9bc7e](https://github.com/rudderlabs/rudder-config-schema/commit/4d9bc7e16980945aae6a9102789f77e87b07b88c))
* **criteo:** add support of sha256 hashing method for email field ([#1301](https://github.com/rudderlabs/rudder-config-schema/issues/1301)) ([958e7d3](https://github.com/rudderlabs/rudder-config-schema/commit/958e7d3e95e9aceafbdafc44a7d0e7b65eeadc9a))
* improve schema generator ([#1207](https://github.com/rudderlabs/rudder-config-schema/issues/1207)) ([55ad8d7](https://github.com/rudderlabs/rudder-config-schema/commit/55ad8d79e7ab2508feb8496e7f4d0674004e6611))
* onboard emersys destination ([#1335](https://github.com/rudderlabs/rudder-config-schema/issues/1335)) ([4dea628](https://github.com/rudderlabs/rudder-config-schema/commit/4dea628413dcf3a420d4512e8004c8c458428e37))
* onboard new destination sftp ([71a66a9](https://github.com/rudderlabs/rudder-config-schema/commit/71a66a9b53671fbac179296364013214aa975171))
* update schema ([e4e70dd](https://github.com/rudderlabs/rudder-config-schema/commit/e4e70dd1b91f6d8802d4f563a3866e82896eb011))
* update schema ([76721f0](https://github.com/rudderlabs/rudder-config-schema/commit/76721f0d4028c64b20d4ac2e1596283e9275a4b1))


### Bug Fixes

* adding group call to emarsys ([#1349](https://github.com/rudderlabs/rudder-config-schema/issues/1349)) ([fa72fda](https://github.com/rudderlabs/rudder-config-schema/commit/fa72fda6083c047c345c8f809fe8e7926cb11934))
* remove useNativeSdk from snowflake ([#1359](https://github.com/rudderlabs/rudder-config-schema/issues/1359)) ([05d14f0](https://github.com/rudderlabs/rudder-config-schema/commit/05d14f0b8a613520e1aba542a82c9aaf96ef0715))
* schema ([f6cff9f](https://github.com/rudderlabs/rudder-config-schema/commit/f6cff9f4a82df23ec4bcb3228bd672aec0aee515))

## [1.73.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.72.0...v1.73.0) (2024-05-08)


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.73.0",
"version": "1.74.0",
"description": "",
"main": "src/index.ts",
"private": true,
Expand Down
93 changes: 72 additions & 21 deletions scripts/schemaGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,26 @@ def is_dest_field_dependent_on_source(field, dbConfig, schema_field_name):
return False


def is_key_present_in_dest_config(dbConfig, key):
"""Checks if the given key is present in destConfig across all source types.

Args:
dbConfig (object): Destination configuration in db-config.json.
key (string): key to be searched in destConfig tree.

Returns:
boolean: True if the key is present in destConfig else, False.
"""
if not dbConfig:
return False

if "destConfig" in dbConfig:
for configSection in dbConfig["destConfig"]:
if key in dbConfig["destConfig"][configSection]:
return True
return False


def is_field_present_in_default_config(field, dbConfig, schema_field_name):
"""Checks if the given field is present in defaultConfig list present in dbConfig.

Expand Down Expand Up @@ -740,6 +760,7 @@ def generate_schema_for_allOf(uiConfig, dbConfig, schema_field_name):
- For each unique preRequisiteField, the properties are found by matching the current preRequisiteField.
- preRequisiteField becomes if block and corresponding properties become then block.


Args:
uiConfig (object): file content of ui-config.json.
dbConfig (object): Configurations of db-config.json.
Expand Down Expand Up @@ -971,17 +992,14 @@ def generate_connection_mode(dbConfig):
return connectionObj


def generate_schema_properties(
uiConfig, dbConfig, schemaObject, properties, name, selector
):
def generate_schema_properties(uiConfig, dbConfig, schemaObject, properties, selector):
"""Generates corresponding schema properties by iterating over each of the ui-config fields.

Args:
uiConfig (object): file content of ui-config.json.
dbConfig (object): Configurations of db-config.json.
schemaObject (object): schema being generated
properties (object): properties of schema
name (string): name of the source or destination.
selector (string): either 'source' or 'destination'
"""
if is_old_format(uiConfig):
Expand All @@ -992,9 +1010,16 @@ def generate_schema_properties(
continue
generateFunction = uiTypetoSchemaFn.get(field["type"], None)
if generateFunction:
properties[field["value"]] = generateFunction(
field, dbConfig, "value"
)
# Generate schema for the field if it is defined in the destination config
if is_key_present_in_dest_config(dbConfig, field["value"]):
properties[field["value"]] = generateFunction(
field, dbConfig, "value"
)
else:
warnings.warn(
f'The field {field["value"]} is defined in ui-config.json but not in db-config.json\n',
UserWarning,
)
if field.get(
"required", False
) == True and is_field_present_in_default_config(
Expand All @@ -1012,9 +1037,18 @@ def generate_schema_properties(
for field in group.get("fields", []):
generateFunction = uiTypetoSchemaFn.get(field["type"], None)
if generateFunction:
properties[field["configKey"]] = generateFunction(
field, dbConfig, "configKey"
)
# Generate schema for the field if it is defined in the destination config
if is_key_present_in_dest_config(
dbConfig, field["configKey"]
):
properties[field["configKey"]] = generateFunction(
field, dbConfig, "configKey"
)
else:
warnings.warn(
f'The field {field["configKey"]} is defined in ui-config.json but not in db-config.json\n',
UserWarning,
)
if (
template.get("title", "") == "Initial setup"
and is_field_present_in_default_config(
Expand All @@ -1027,9 +1061,17 @@ def generate_schema_properties(
for field in sdkTemplate.get("fields", []):
generateFunction = uiTypetoSchemaFn.get(field["type"], None)
if generateFunction:
properties[field["configKey"]] = generateFunction(
field, dbConfig, "configKey"
)
# Generate schema for the field if it is defined in the destination config
if is_key_present_in_dest_config(dbConfig, field["configKey"]):
properties[field["configKey"]] = generateFunction(
field, dbConfig, "configKey"
)
else:
warnings.warn(
f'The field {field["configKey"]} is defined in ui-config.json but not in db-config.json\n',
UserWarning,
)

if field.get(
"required", False
) == True and is_field_present_in_default_config(
Expand All @@ -1051,9 +1093,12 @@ def generate_schema_properties(
schemaObject["required"].append(field["configKey"])

# default properties in new ui-config based schemas.
schemaObject["properties"]["useNativeSDK"] = generate_schema_for_checkbox(
{"type": "checkbox", "value": "useNativeSDK"}, dbConfig, "value"
)
if is_key_present_in_dest_config(dbConfig, "useNativeSDK"):
schemaObject["properties"]["useNativeSDK"] = (
generate_schema_for_checkbox(
{"type": "checkbox", "value": "useNativeSDK"}, dbConfig, "value"
)
)
schemaObject["properties"]["connectionMode"] = generate_connection_mode(
dbConfig
)
Expand Down Expand Up @@ -1099,6 +1144,7 @@ def generate_schema(uiConfig, dbConfig, name, selector):
schemaObject["type"] = "object"
schemaObject["properties"] = {}
allOfSchemaObj = {}
print(f"Generating schema for {name} {selector}")
if is_old_format(uiConfig):
allOfSchemaObj = generate_schema_for_allOf(uiConfig, dbConfig, "value")
if allOfSchemaObj:
Expand All @@ -1110,8 +1156,9 @@ def generate_schema(uiConfig, dbConfig, name, selector):
schemaObject["anyOf"] = allOfSchemaObj
else:
schemaObject["allOf"] = allOfSchemaObj

generate_schema_properties(
uiConfig, dbConfig, schemaObject, schemaObject["properties"], name, selector
uiConfig, dbConfig, schemaObject, schemaObject["properties"], selector
)
newSchema["configSchema"] = schemaObject

Expand Down Expand Up @@ -1154,7 +1201,10 @@ def generate_warnings_for_each_type(uiConfig, dbConfig, schema, curUiType):
)
if (
curUiType == "textInput"
and field["value"] in schema["required"]
and (
schema.get("required", False) == True
and field["value"] in schema["required"]
)
and "regex" not in field
):
warnings.warn(
Expand Down Expand Up @@ -1204,7 +1254,10 @@ def generate_warnings_for_each_type(uiConfig, dbConfig, schema, curUiType):
)
if (
curUiType == "textInput"
and field["configKey"] in schema["required"]
and (
schema.get("required", False) == True
and field["configKey"] in schema["required"]
)
and "regex" not in field
):
warnings.warn(
Expand Down Expand Up @@ -1423,11 +1476,9 @@ def get_schema_diff(name, selector, shouldUpdateSchema=False):
selector (string): either 'source' or 'destination'.
shouldUpdateSchema (boolean): if it should update the existing schema with generated one
"""

file_selectors = ["db-config.json", "ui-config.json", "schema.json"]
directory = f"./{CONFIG_DIR}/{selector}s/{name}"
if not os.path.isdir(directory):
print(f"No {selector}s directory found for {name}")
return

if name not in EXCLUDED_DEST:
Expand Down
6 changes: 5 additions & 1 deletion src/configurations/destinations/criteo/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(.{0,100})$"
},
"hashMethod": { "type": "string", "enum": ["none", "md5"], "default": "none" },
"hashMethod": {
"type": "string",
"enum": ["none", "md5", "sha256"],
"default": "none"
},
"fieldMapping": {
"type": "array",
"items": {
Expand Down
4 changes: 4 additions & 0 deletions src/configurations/destinations/criteo/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
{
"name": "MD5",
"value": "md5"
},
{
"name": "SHA256",
"value": "sha256"
}
],
"defaultOption": {
Expand Down
66 changes: 66 additions & 0 deletions src/configurations/destinations/emarsys/db-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "EMARSYS",
"displayName": "Emarsys",
"config": {
"cdkV2Enabled": true,
"transformAtV1": "router",
"saveDestinationResponse": true,
"excludeKeys": [],
"supportedSourceTypes": [
"android",
"ios",
"unity",
"amp",
"reactnative",
"flutter",
"cordova",
"web",
"cloud",
"shopify",
"warehouse"
],
"supportedConnectionModes": {
"android": ["cloud"],
"ios": ["cloud"],
"web": ["cloud"],
"unity": ["cloud"],
"amp": ["cloud"],
"reactnative": ["cloud"],
"flutter": ["cloud"],
"cordova": ["cloud"],
"shopify": ["cloud"],
"cloud": ["cloud"],
"warehouse": ["cloud"]
},
"supportedMessageTypes": {
"cloud": ["identify", "track", "group"]
},
"destConfig": {
"defaultConfig": [
"emersysUsername",
"emersysUserSecret",
"eventsMapping",
"fieldMapping",
"emersysCustomIdentifier",
"defaultContactList",
"discardEmptyProperties",
"oneTrustCookieCategories"
],
"android": ["connectionMode"],
"ios": ["connectionMode"],
"unity": ["connectionMode"],
"amp": ["connectionMode"],
"reactnative": ["connectionMode"],
"flutter": ["connectionMode"],
"cordova": ["connectionMode"],
"web": ["connectionMode"],
"cloud": ["connectionMode"],
"shopify": ["connectionMode"],
"warehouse": ["connectionMode"]
},
"secretKeys": ["emersysUsername", "emersysUserSecret"]
},
"options": {
"isBeta": true
}
}
Loading
Loading