From 95f51e4924c09730c587b13f6f026c089067a4e3 Mon Sep 17 00:00:00 2001 From: Magnun A V F <103958633+MagnunAVFAzion@users.noreply.github.com> Date: Fri, 17 Oct 2025 11:32:42 -0300 Subject: [PATCH 1/4] fix: update DNS resolution schema with api (#295) --- packages/config/README.md | 2 +- .../converterJsonConfig/index.test.ts | 4 ++-- .../helpers/azion.config.example.ts | 2 +- .../config/src/configProcessor/helpers/schema.ts | 4 ++-- .../src/configProcessor/helpers/schemaManifest.ts | 2 +- .../connectorProcessConfigStrategy.test.ts | 14 +++++++------- .../connectorProcessConfigStrategy.ts | 2 +- packages/config/src/constants.ts | 2 +- packages/config/src/types.ts | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/config/README.md b/packages/config/README.md index 126308c4..d51320d8 100644 --- a/packages/config/README.md +++ b/packages/config/README.md @@ -192,7 +192,7 @@ const config = defineConfig({ }, ], connectionOptions: { - dnsResolution: 'preserve', + dnsResolution: 'both', transportPolicy: 'preserve', httpVersionPolicy: 'http1_1', host: '${host}', diff --git a/packages/config/src/configProcessor/converterJsonConfig/index.test.ts b/packages/config/src/configProcessor/converterJsonConfig/index.test.ts index 5c4462f7..88912276 100644 --- a/packages/config/src/configProcessor/converterJsonConfig/index.test.ts +++ b/packages/config/src/configProcessor/converterJsonConfig/index.test.ts @@ -216,7 +216,7 @@ describe('convertJsonConfigToObject', () => { // }, // ], // connectionOptions: { -// dnsResolution: 'preserve', +// dnsResolution: 'both', // transportPolicy: 'preserve', // httpVersionPolicy: 'http1_1', // host: '${host}', @@ -257,7 +257,7 @@ describe('convertJsonConfigToObject', () => { // }), // ]), // connectionOptions: expect.objectContaining({ -// dnsResolution: 'preserve', +// dnsResolution: 'both', // transportPolicy: 'preserve', // httpVersionPolicy: 'http1_1', // host: '${host}', diff --git a/packages/config/src/configProcessor/helpers/azion.config.example.ts b/packages/config/src/configProcessor/helpers/azion.config.example.ts index 1f4e6cb3..d20572cf 100644 --- a/packages/config/src/configProcessor/helpers/azion.config.example.ts +++ b/packages/config/src/configProcessor/helpers/azion.config.example.ts @@ -359,7 +359,7 @@ const config: AzionConfig = { }, ], connectionOptions: { - dnsResolution: 'preserve' as ConnectorDnsResolution, + dnsResolution: 'both' as ConnectorDnsResolution, transportPolicy: 'preserve' as ConnectorTransportPolicy, httpVersionPolicy: 'http1_1' as ConnectorHttpVersionPolicy, host: '${host}', diff --git a/packages/config/src/configProcessor/helpers/schema.ts b/packages/config/src/configProcessor/helpers/schema.ts index ed59748d..7373df29 100644 --- a/packages/config/src/configProcessor/helpers/schema.ts +++ b/packages/config/src/configProcessor/helpers/schema.ts @@ -1581,8 +1581,8 @@ const azionConfigSchema = { dnsResolution: { type: 'string', enum: EDGE_CONNECTOR_DNS_RESOLUTION, - default: 'preserve', - errorMessage: "The 'dnsResolution' must be one of: preserve, force_ipv4, force_ipv6", + default: 'both', + errorMessage: "The 'dnsResolution' must be one of: both, force_ipv4", }, transportPolicy: { type: 'string', diff --git a/packages/config/src/configProcessor/helpers/schemaManifest.ts b/packages/config/src/configProcessor/helpers/schemaManifest.ts index 9f7f6d57..cd3b6b49 100644 --- a/packages/config/src/configProcessor/helpers/schemaManifest.ts +++ b/packages/config/src/configProcessor/helpers/schemaManifest.ts @@ -1435,7 +1435,7 @@ const schemaConnectorManifest = { type: 'string', enum: EDGE_CONNECTOR_DNS_RESOLUTION, default: 'preserve', - errorMessage: "The 'dns_resolution' must be one of: preserve, force_ipv4, force_ipv6", + errorMessage: "The 'dns_resolution' must be one of: both, force_ipv4", }, transport_policy: { type: 'string', diff --git a/packages/config/src/configProcessor/processStrategy/implementations/connectorProcessConfigStrategy.test.ts b/packages/config/src/configProcessor/processStrategy/implementations/connectorProcessConfigStrategy.test.ts index fef8303f..b5314c9a 100644 --- a/packages/config/src/configProcessor/processStrategy/implementations/connectorProcessConfigStrategy.test.ts +++ b/packages/config/src/configProcessor/processStrategy/implementations/connectorProcessConfigStrategy.test.ts @@ -88,7 +88,7 @@ describe('ConnectorProcessConfigStrategy', () => { }, ], connection_options: { - dns_resolution: 'preserve', + dns_resolution: 'both', transport_policy: 'preserve', http_version_policy: 'http1_1', host: '${host}', @@ -256,7 +256,7 @@ describe('ConnectorProcessConfigStrategy', () => { }, ], connectionOptions: { - dnsResolution: 'preserve', + dnsResolution: 'both', transportPolicy: 'preserve', }, }, @@ -282,7 +282,7 @@ describe('ConnectorProcessConfigStrategy', () => { }, ], connection_options: { - dns_resolution: 'preserve', + dns_resolution: 'both', transport_policy: 'preserve', http_version_policy: 'http1_1', host: '${host}', @@ -417,7 +417,7 @@ describe('ConnectorProcessConfigStrategy', () => { }, ], connection_options: { - dns_resolution: 'preserve', + dns_resolution: 'both', transport_policy: 'preserve', http_version_policy: 'http1_1', host: '${host}', @@ -453,7 +453,7 @@ describe('ConnectorProcessConfigStrategy', () => { expect(httpAttributes.addresses[0].address).toBe('example.com'); expect(httpAttributes.addresses[0].httpPort).toBe(80); expect(httpAttributes.addresses[0].httpsPort).toBe(443); - expect(httpAttributes.connectionOptions.dnsResolution).toBe('preserve'); + expect(httpAttributes.connectionOptions.dnsResolution).toBe('both'); expect(transformedPayload.connectors).toEqual(result); }); @@ -563,7 +563,7 @@ describe('ConnectorProcessConfigStrategy', () => { }, ], connection_options: { - dns_resolution: 'preserve', + dns_resolution: 'both', transport_policy: 'preserve', http_version_policy: 'http1_1', host: '${host}', @@ -626,7 +626,7 @@ describe('ConnectorProcessConfigStrategy', () => { }, ], connection_options: { - dns_resolution: 'preserve', + dns_resolution: 'both', transport_policy: 'preserve', http_version_policy: 'http1_1', }, diff --git a/packages/config/src/configProcessor/processStrategy/implementations/connectorProcessConfigStrategy.ts b/packages/config/src/configProcessor/processStrategy/implementations/connectorProcessConfigStrategy.ts index 8b2a197f..5fdac48b 100644 --- a/packages/config/src/configProcessor/processStrategy/implementations/connectorProcessConfigStrategy.ts +++ b/packages/config/src/configProcessor/processStrategy/implementations/connectorProcessConfigStrategy.ts @@ -53,7 +53,7 @@ class ConnectorProcessConfigStrategy extends ProcessConfigStrategy { modules: addr.modules || null, })), connection_options: { - dns_resolution: connector.attributes.connectionOptions.dnsResolution ?? 'preserve', + dns_resolution: connector.attributes.connectionOptions.dnsResolution ?? 'both', transport_policy: connector.attributes.connectionOptions.transportPolicy ?? 'preserve', http_version_policy: connector.attributes.connectionOptions.httpVersionPolicy ?? 'http1_1', host: connector.attributes.connectionOptions.host ?? '${host}', diff --git a/packages/config/src/constants.ts b/packages/config/src/constants.ts index 84365f18..2f733f0f 100644 --- a/packages/config/src/constants.ts +++ b/packages/config/src/constants.ts @@ -297,7 +297,7 @@ export const WORKLOAD_HTTP_VERSIONS = ['http1', 'http2'] as const; // Constantes para Connector V4 export const EDGE_CONNECTOR_TYPES = ['http', 'storage', 'live_ingest'] as const; -export const EDGE_CONNECTOR_DNS_RESOLUTION = ['preserve', 'force_ipv4', 'force_ipv6'] as const; +export const EDGE_CONNECTOR_DNS_RESOLUTION = ['both', 'force_ipv4'] as const; export const EDGE_CONNECTOR_TRANSPORT_POLICY = ['preserve', 'force_https', 'force_http'] as const; export const EDGE_CONNECTOR_HTTP_VERSION_POLICY = ['http1_1'] as const; export const EDGE_CONNECTOR_LOAD_BALANCE_METHOD = ['round_robin', 'least_conn', 'ip_hash'] as const; diff --git a/packages/config/src/types.ts b/packages/config/src/types.ts index 45720a4a..0d34d811 100644 --- a/packages/config/src/types.ts +++ b/packages/config/src/types.ts @@ -178,7 +178,7 @@ export type WorkloadHTTPVersion = 'http1' | 'http2'; // Connector types export type ConnectorType = 'http' | 'storage' | 'live_ingest'; -export type ConnectorDnsResolution = 'preserve' | 'force_ipv4' | 'force_ipv6'; +export type ConnectorDnsResolution = 'both' | 'force_ipv4'; export type ConnectorTransportPolicy = 'preserve' | 'force_https' | 'force_http'; export type ConnectorHttpVersionPolicy = 'http1_1'; export type ConnectorLoadBalanceMethod = 'round_robin' | 'least_conn' | 'ip_hash'; From 0bf4f8dedd128c6c624551d2ea5c3da260542aa0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 17 Oct 2025 14:34:05 +0000 Subject: [PATCH 2/4] chore(release): 2.2.1-stage.1 [skip ci] ### [2.2.1-stage.1](https://github.com/aziontech/lib/compare/v2.2.0...v2.2.1-stage.1) (2025-10-17) ### Bug Fixes * update DNS resolution schema with api (#295) ([95f51e4](https://github.com/aziontech/lib/commit/95f51e4924c09730c587b13f6f026c089067a4e3)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45a636da..22a6f43e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### [2.2.1-stage.1](https://github.com/aziontech/lib/compare/v2.2.0...v2.2.1-stage.1) (2025-10-17) + + +### Bug Fixes + +* update DNS resolution schema with api (#295) ([95f51e4](https://github.com/aziontech/lib/commit/95f51e4924c09730c587b13f6f026c089067a4e3)) + ## [2.2.0](https://github.com/aziontech/lib/compare/v2.1.4...v2.2.0) (2025-10-15) diff --git a/package.json b/package.json index 325a6fbd..d9b2f71a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "azion", - "version": "2.2.0", + "version": "2.2.1-stage.1", "description": "Azion Packages for Edge Computing.", "scripts": { "prepare": "husky", From b50d71e4cc0ea8909c0e7302aca9c11447a4b7c2 Mon Sep 17 00:00:00 2001 From: Magnun A V F <103958633+MagnunAVFAzion@users.noreply.github.com> Date: Tue, 21 Oct 2025 15:09:57 -0300 Subject: [PATCH 3/4] fix: update tiered cache topologies (#297) --- .../src/configProcessor/helpers/azion.config.example.ts | 2 +- packages/config/src/configProcessor/helpers/schema.ts | 6 +++--- .../config/src/configProcessor/helpers/schemaManifest.ts | 2 +- .../application/cacheProcessConfigStrategy.ts | 4 ++-- packages/config/src/constants.ts | 2 +- packages/config/src/types.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/config/src/configProcessor/helpers/azion.config.example.ts b/packages/config/src/configProcessor/helpers/azion.config.example.ts index d20572cf..f9283ee9 100644 --- a/packages/config/src/configProcessor/helpers/azion.config.example.ts +++ b/packages/config/src/configProcessor/helpers/azion.config.example.ts @@ -50,7 +50,7 @@ const config: AzionConfig = { }, tieredCache: { enabled: true, - topology: 'global', + topology: 'nearest-region', }, cacheByQueryString: { option: 'denylist' as CacheByQueryString, diff --git a/packages/config/src/configProcessor/helpers/schema.ts b/packages/config/src/configProcessor/helpers/schema.ts index 7373df29..954c01f7 100644 --- a/packages/config/src/configProcessor/helpers/schema.ts +++ b/packages/config/src/configProcessor/helpers/schema.ts @@ -630,10 +630,10 @@ const azionConfigSchema = { }, topology: { type: 'string', - enum: ['near-edge', 'br-east-1', 'us-east-1', 'global'], - default: 'global', + enum: ['nearest-region', 'us-east-1', 'br-east-1'], + default: 'nearest-region', errorMessage: - "The 'topology' field must be one of 'near-edge', 'br-east-1', 'us-east-1', or 'global'.", + "The 'topology' field must be one of 'nearest-region', 'br-east-1', 'us-east-1'.", }, }, additionalProperties: false, diff --git a/packages/config/src/configProcessor/helpers/schemaManifest.ts b/packages/config/src/configProcessor/helpers/schemaManifest.ts index cd3b6b49..af889930 100644 --- a/packages/config/src/configProcessor/helpers/schemaManifest.ts +++ b/packages/config/src/configProcessor/helpers/schemaManifest.ts @@ -629,7 +629,7 @@ const schemaApplicationCacheSettings = { topology: { type: 'string', enum: TIERED_CACHE_TOPOLOGY, - errorMessage: "The 'topology' must be one of: near-, br-east-1, us-east-1.", + errorMessage: "The 'topology' must be one of: nearest-region, us-east-1, br-east-1.", }, }, required: ['topology'], diff --git a/packages/config/src/configProcessor/processStrategy/implementations/application/cacheProcessConfigStrategy.ts b/packages/config/src/configProcessor/processStrategy/implementations/application/cacheProcessConfigStrategy.ts index 96f69aa5..44ede93e 100644 --- a/packages/config/src/configProcessor/processStrategy/implementations/application/cacheProcessConfigStrategy.ts +++ b/packages/config/src/configProcessor/processStrategy/implementations/application/cacheProcessConfigStrategy.ts @@ -71,7 +71,7 @@ class CacheProcessConfigStrategy extends ProcessConfigStrategy { }, tiered_cache: { enabled: cache?.tieredCache?.enabled || false, - topology: cache?.tieredCache?.topology || 'global', + topology: cache?.tieredCache?.topology || 'nearest-region', }, }, application_accelerator: { @@ -121,7 +121,7 @@ class CacheProcessConfigStrategy extends ProcessConfigStrategy { queryStringSort: cache.modules?.application_accelerator?.cache_vary_by_querystring?.sort_enabled || false, tieredCache: { enabled: cache.modules?.cache?.tiered_cache?.enabled || false, - topology: cache.modules?.cache?.tiered_cache?.topology || 'global', + topology: cache.modules?.cache?.tiered_cache?.topology || 'nearest-region', }, }; diff --git a/packages/config/src/constants.ts b/packages/config/src/constants.ts index 2f733f0f..2b8c983f 100644 --- a/packages/config/src/constants.ts +++ b/packages/config/src/constants.ts @@ -186,7 +186,7 @@ export const CACHE_BY_QUERY_STRING = ['ignore', 'all', 'allowlist', 'denylist'] export const CACHE_BY_COOKIE = ['ignore', 'all', 'allowlist', 'denylist'] as const; export const CACHE_ADAPTIVE_DELIVERY = ['ignore', 'allowlist'] as const; export const CACHE_VARY_BY_METHOD = ['options', 'post'] as const; -export const TIERED_CACHE_TOPOLOGY = ['near-edge', 'br-east-1', 'us-east-1'] as const; +export const TIERED_CACHE_TOPOLOGY = ['nearest-region', 'us-east-1', 'br-east-1'] as const; export const CACHE_L2_REGION = [null, 'sa-brazil', 'na-united-states'] as const; // Constantes para Build diff --git a/packages/config/src/types.ts b/packages/config/src/types.ts index 0d34d811..697a9b61 100644 --- a/packages/config/src/types.ts +++ b/packages/config/src/types.ts @@ -159,7 +159,7 @@ export type CacheByQueryString = 'ignore' | 'all' | 'allowlist' | 'denylist'; export type CacheByCookie = 'ignore' | 'all' | 'allowlist' | 'denylist'; export type CacheAdaptiveDelivery = 'ignore' | 'allowlist'; export type CacheVaryByMethod = 'options' | 'post'; -export type TieredCacheTopology = 'global'; +export type TieredCacheTopology = 'nearest-region' | 'br-east-1' | 'us-east-1'; // Build types export type BuildBundler = 'webpack' | 'esbuild'; From 9f64c6fcf2fc24ee04c7fc5011d7b205c1cf78e6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 21 Oct 2025 18:11:23 +0000 Subject: [PATCH 4/4] chore(release): 2.2.1-stage.2 [skip ci] ### [2.2.1-stage.2](https://github.com/aziontech/lib/compare/v2.2.1-stage.1...v2.2.1-stage.2) (2025-10-21) ### Bug Fixes * update tiered cache topologies (#297) ([b50d71e](https://github.com/aziontech/lib/commit/b50d71e4cc0ea8909c0e7302aca9c11447a4b7c2)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22a6f43e..77113023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### [2.2.1-stage.2](https://github.com/aziontech/lib/compare/v2.2.1-stage.1...v2.2.1-stage.2) (2025-10-21) + + +### Bug Fixes + +* update tiered cache topologies (#297) ([b50d71e](https://github.com/aziontech/lib/commit/b50d71e4cc0ea8909c0e7302aca9c11447a4b7c2)) + ### [2.2.1-stage.1](https://github.com/aziontech/lib/compare/v2.2.0...v2.2.1-stage.1) (2025-10-17) diff --git a/package.json b/package.json index d9b2f71a..f282da55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "azion", - "version": "2.2.1-stage.1", + "version": "2.2.1-stage.2", "description": "Azion Packages for Edge Computing.", "scripts": { "prepare": "husky",