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

[AB#43614] release: iteration 94 #281

Merged
merged 20 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a61e69b
[AB#42874] GraphQL subscription events are now strongly typed (#235)
AxTrusov Feb 5, 2024
b85697a
feat: transactional inbox for the Catalog Service
Zehelein Mar 1, 2024
7a01ec0
chore: PR adjustments
Zehelein Mar 4, 2024
f9142e3
fix: swtich to hotfixed tx-inbox-outbox lib
yasithA Mar 14, 2024
52d707c
refactor: :recycle: use the new metrics interface with the logger pas…
EmperorRXF Mar 14, 2024
ac8124b
feat: close template1 connections on test:reset:dbs
Zehelein Mar 13, 2024
7a50284
[AB#41699] Localizations integration (#164)
AxTrusov Mar 14, 2024
2e8f05f
feat: number of default seed genres reduced to 10 per type (#264)
AxTrusov Mar 14, 2024
4fb3183
feat: Update isLocalizationEnabled if Localization Service is disabled
Zehelein Mar 19, 2024
138bde7
feat: refactoring and enabling localization for hosting
Zehelein Mar 19, 2024
1353cf6
test: test fixes and improvements
Zehelein Mar 19, 2024
3cec613
fix: explorer titles to be similar to managed workflows
axisuru Mar 20, 2024
e3f35e7
fix: refetch queries after mutations are completed
axisuru Mar 21, 2024
d9e1aa6
chore: Updated library versions
Mar 26, 2024
db5c795
chore: Update pg-transactional-outbox version (#273)
yasithA Mar 26, 2024
59636e7
fix: Fix messaging errors
yasithA Mar 28, 2024
1a7483f
fix: make sure setup script works when service account for media serv…
AxTrusov Apr 3, 2024
d84a759
fix: entity titles are now fully generated for localized seasons and …
AxTrusov Apr 10, 2024
4206bd6
chore: Update packages
yasithA Mar 29, 2024
9f64cab
chore: Upgrade libs
yasithA Apr 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 8 additions & 2 deletions .adops/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ stages:
- script: yarn install --immutable
displayName: Install dependencies

- script: yarn build
- task: Bash@3
inputs:
targetType: 'inline'
script: |
yarn build || echo "Build exited with non-0 exit code"
echo "Build Exit Code: $?"
displayName: Build

- script: yarn apply-templates
Expand All @@ -67,7 +72,8 @@ stages:
echo -e "\nPOSTGRESQL_HOST=$(DATABASE_HOST)" >> .env
echo "POSTGRESQL_ROOT=$(DATABASE_USERNAME)" >> .env
echo "POSTGRESQL_ROOT_PASSWORD=$(DATABASE_PASSWORD)" >> .env
displayName: Add fake values to .env to keep config loader happy
displayName:
Add fake values to .env to keep config loader happy

- script: cat .env
displayName: Show .env
Expand Down
66 changes: 17 additions & 49 deletions .vscode/mosaic-sql-migrations.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,7 @@
},
"Create Messaging Counter Table (Ax Define)": {
"prefix": "ax-create-messaging-counter-table",
"body": [
"SELECT ax_define.create_messaging_counter_table();"
],
"body": ["SELECT ax_define.create_messaging_counter_table();"],
"description": [
"Creates a table that will count how often a message was already processed via Mosaic-based messaging e.g. multiple retries due to server crashes."
],
Expand Down Expand Up @@ -439,9 +437,7 @@
},
"Pgmemento Delete Old Logs (Ax Define)": {
"prefix": "ax-pgmemento-delete-old-logs",
"body": [
"SELECT ax_define.pgmemento_delete_old_logs(${age:'30 days'})"
],
"body": ["SELECT ax_define.pgmemento_delete_old_logs(${age:'30 days'})"],
"description": [
"Deletes all audit logs (for all registered tables) older than specified age.\n",
"Returns number of table events deleted.\n",
Expand Down Expand Up @@ -471,9 +467,7 @@
},
"Validate Identifier Length (Ax Utils)": {
"prefix": "ax-validate-identifier-length",
"body": [
"PERFORM ax_utils.validate_identifier_length('${1:identifier}');"
],
"body": ["PERFORM ax_utils.validate_identifier_length('${1:identifier}');"],
"description": [
"Raises an exception if the provided identifer exceeds the PostgreSQL max length (63 bytes).",
"This can be useful to prevent name truncation, identifier collisions and silently dropped constraints.",
Expand Down Expand Up @@ -683,39 +677,31 @@
},
"Validation Not Empty (Ax Utils)": {
"prefix": "ax-validation-not-empty",
"body": [
"ax_utils.validation_not_empty(${1:column_or_variable})"
],
"body": ["ax_utils.validation_not_empty(${1:column_or_variable})"],
"description": [
"Returns true if the value is not null, not an empty string, and not a whitespace string. Returns false otherwise."
],
"scope": "sql"
},
"Validation Is Trimmed (Ax Utils)": {
"prefix": "ax-validation-is-trimmed",
"body": [
"ax_utils.validation_is_trimmed(${1:column_or_variable})"
],
"body": ["ax_utils.validation_is_trimmed(${1:column_or_variable})"],
"description": [
"Returns false if the value starts or ends with a whitespace character. Returns true otherwise."
],
"scope": "sql"
},
"Validation Is Base64 (Ax Utils)": {
"prefix": "ax-validation-is-base64",
"body": [
"ax_utils.validation_is_base64(${1:column_or_variable})"
],
"body": ["ax_utils.validation_is_base64(${1:column_or_variable})"],
"description": [
"Returns true if the value is a base64 encoded string. Returns false otherwise."
],
"scope": "sql"
},
"Validation Is Identifier Key (Ax Utils)": {
"prefix": "ax-validation-is-identifier-key",
"body": [
"ax_utils.validation_is_identifier_key(${1:column_or_variable})"
],
"body": ["ax_utils.validation_is_identifier_key(${1:column_or_variable})"],
"description": [
"Returns true if the value only contains letters, numbers, underscores, and dashes.",
"Returns false otherwise."
Expand All @@ -724,19 +710,15 @@
},
"Validation Is Url (Ax Utils)": {
"prefix": "ax-validation-is-url",
"body": [
"ax_utils.validation_is_url(${1:column_or_variable})"
],
"body": ["ax_utils.validation_is_url(${1:column_or_variable})"],
"description": [
"Returns true if the value is a valid URL. Returns false otherwise, including in cases when value is an empty string."
],
"scope": "sql"
},
"Validation Is Optional Url (Ax Utils)": {
"prefix": "ax-validation-is-optional-url",
"body": [
"ax_utils.validation_is_optional_url(${1:column_or_variable})"
],
"body": ["ax_utils.validation_is_optional_url(${1:column_or_variable})"],
"description": [
"Returns true if the value is a valid URL or an empty string. Returns false otherwise."
],
Expand All @@ -754,19 +736,15 @@
},
"Validation Not Empty Array (Ax Utils)": {
"prefix": "ax-validation-not-empty-array",
"body": [
"ax_utils.validation_not_empty_array(${1:column_or_variable})"
],
"body": ["ax_utils.validation_not_empty_array(${1:column_or_variable})"],
"description": [
"Returns false if the value is an empty array or an array containing empty elements. Returns true otherwise."
],
"scope": "sql"
},
"Validation Valid Url Array (Ax Utils)": {
"prefix": "ax-validation-valid-url-array",
"body": [
"ax_utils.validation_valid_url_array(${1:column_or_variable})"
],
"body": ["ax_utils.validation_valid_url_array(${1:column_or_variable})"],
"description": [
"Returns false if at least one element of an array is not a valid URL or an empty string. Returns true otherwise."
],
Expand Down Expand Up @@ -798,9 +776,7 @@
},
"User Has Tag (Ax Utils)": {
"prefix": "ax-user-has-tag",
"body": [
"SELECT ax_utils.user_has_tag(${1:'tag1,tag2'});"
],
"body": ["SELECT ax_utils.user_has_tag(${1:'tag1,tag2'});"],
"description": [
"Checks if a user has one of the specified tags.\n",
"Returns true if the user has at least one of the tags from provided comma-separated string. Returns false otherwise."
Expand All @@ -822,9 +798,7 @@
},
"Current Tenant Id (Ax Utils)": {
"prefix": "ax-current-tenant-id",
"body": [
"SELECT ax_utils.current_tenant_id();"
],
"body": ["SELECT ax_utils.current_tenant_id();"],
"description": [
"Gets the tenant ID from the context of the current user.",
"This is needed for multitenancy systems."
Expand All @@ -833,9 +807,7 @@
},
"Current Environment Id (Ax Utils)": {
"prefix": "ax-current-environment-id",
"body": [
"SELECT ax_utils.current_environment_id();"
],
"body": ["SELECT ax_utils.current_environment_id();"],
"description": [
"Gets the environment ID from the context of the current user.",
"This is needed for multitenancy systems."
Expand All @@ -844,9 +816,7 @@
},
"Current User Id (Ax Utils)": {
"prefix": "ax-current-user-id",
"body": [
"SELECT ax_utils.current_user_id();"
],
"body": ["SELECT ax_utils.current_user_id();"],
"description": [
"Gets the User ID from the context of the current user.",
"This is needed when end-user RLS is needed."
Expand Down Expand Up @@ -1060,9 +1030,7 @@
"Drop Table (Ax Custom)": {
"scope": "sql",
"prefix": "ax-drop-table",
"body": [
"DROP TABLE IF EXISTS ${8:app_public}.${1:table_name} CASCADE;"
],
"body": ["DROP TABLE IF EXISTS ${8:app_public}.${1:table_name} CASCADE;"],
"description": "Drops a table."
},
"Add Enum and Column (Ax Custom)": {
Expand Down Expand Up @@ -1108,4 +1076,4 @@
"This snippet has a simplified migration sample that might require adjustments."
]
}
}
}
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"fairplay",
"geolocation",
"Inflector",
"localizable",
"loglevel",
"pilet",
"pilets",
Expand All @@ -31,6 +32,7 @@
"RABBITMQ",
"SMIL",
"SPEKE",
"TEXTBOX",
"unassignment",
"uncommit",
"unpublish",
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ Note that the following pre-requisites are assumed:
- i.e.
`yarn util:load-vars mosaic hosting service deploy -i media-service -t 20230927.1 -p media-workflows@1.0.1 -m media-service-manifest-20230927 -n media-service-deployment-20230927.1`
- Ensure you provide a unique value for the `<deployment-name>`
7. (Optional) In case Localizations are enabled - `media-service` service
account shall be adjusted to include the `INGESTS_EDIT` permission for
the`media-service` itself in the Admin Portal.

#### Deploy Catalog Service

Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { JestConfigWithTsJest } from 'ts-jest';

const jestConfig: JestConfigWithTsJest = {
preset: 'ts-jest',
testTimeout: 60000,
modulePathIgnorePatterns: ['./dist/'],
setupFilesAfterEnv: ['jest-expect-message', 'jest-extended/all'],
projects: [
Expand All @@ -18,6 +17,7 @@ const jestConfig: JestConfigWithTsJest = {
'!**/dist/**',
'!**/vendor/**',
],
workerIdleMemoryLimit: '1GB',
};

export default jestConfig;
6 changes: 3 additions & 3 deletions libs/media-messages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"build:compile": "tsc"
},
"devDependencies": {
"@axinom/mosaic-cli": "0.30.0",
"@axinom/mosaic-message-bus-abstractions": "0.11.0",
"@axinom/mosaic-cli": "^0.31.0-rc.8",
"@axinom/mosaic-message-bus-abstractions": "0.12.0-rc.8",
"@types/glob": "^7.2.0",
"concurrently": "^5.3.0",
"rimraf": "^3.0.2",
Expand All @@ -31,4 +31,4 @@
"typescript": "^4.9.4",
"watch": "^1.0.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@
"content_id": {
"$ref": "./common.json#/definitions/collection_id"
},
"title": {
"description": "Title of the collection.",
"$ref": "../common.json#/definitions/non_empty_string"
},
"synopsis": {
"description": "Short description.",
"type": "string"
},
"description": {
"description": "Longer description.",
"type": "string"
},
"tags": {
"$ref": "./common.json#/definitions/tags"
},
Expand Down Expand Up @@ -60,8 +48,41 @@
"required": ["order_no", "relation_type"],
"additionalProperties": false
}
},
"localizations": {
"description": "Localizations for every defined locale.",
"type": "array",
"additionalItems": false,
"items": {
"type": "object",
"additionalProperties": false,
"title": "collection_localization",
"required": ["is_default_locale", "language_tag", "title"],
"properties": {
"is_default_locale": {
"type": "boolean",
"description": "Boolean flag to indicate if locale is default or not."
},
"language_tag": {
"type": "string",
"description": "The locale for which the values are localized."
},
"title": {
"type": "string",
"description": "The localized title of this collection."
},
"description": {
"type": ["string", "null"],
"description": "The localized description of this collection."
},
"synopsis": {
"type": ["string", "null"],
"description": "The localized synopsis of this collection."
}
}
}
}
},
"required": ["content_id", "title", "related_items"],
"required": ["content_id", "related_items", "localizations"],
"additionalProperties": false
}
Loading
Loading