Skip to content

Conversation

@jcbsfilho
Copy link
Collaborator

This pull request refines the configuration and validation logic for the tiered cache feature in the Azion configuration system. It removes the deprecated tieredCacheEnabled flag, restructures how tiered cache settings are defined and validated, and improves error reporting for configuration validation. These changes make the configuration more flexible and user-friendly, especially regarding optional fields and error diagnostics.

Tiered Cache Configuration Updates:

  • Removed the deprecated tieredCacheEnabled flag from both the example config and documentation, and replaced it with a more structured tieredCache object under each cache entry. [1] [2]
  • Updated documentation and type definitions to reflect the new tieredCache structure, including its enabled and topology properties. [1] [2] [3]

Validation Schema Improvements:

  • Enhanced the JSON schema for tieredCache to require the topology field only when enabled is set to true, and to allow topology to be null. Improved error messages for missing or invalid properties. [1] [2]

Process Logic Adjustments:

  • Updated the cache processing logic to only include the topology property in the output when tiered cache is enabled, ensuring more accurate configuration output and import. [1] [2] [3] [4]

Validation Error Reporting:

  • Improved configuration validation error reporting by providing more detailed and user-friendly error messages, including up to three specific errors and a summary if there are more.

- Added structured error display showing error number, message, path, and missing properties
- Limited output to first 3 errors with counter for remaining errors
- Enhanced readability with visual separators and emoji indicators
- Changed topology field to be optional when tieredCache is disabled
- Added schema validation requiring topology only when enabled is true
- Updated cache processing logic to conditionally include topology in payload
@jcbsfilho jcbsfilho requested a review from a team as a code owner November 13, 2025 13:52
@jcbsfilho jcbsfilho merged commit f6a53cf into stage Nov 13, 2025
10 checks passed
@jcbsfilho jcbsfilho deleted the schema-azion-config branch November 13, 2025 13:57
pablodiehl pushed a commit that referenced this pull request Nov 13, 2025
[skip ci]
## [2.3.0-stage.1](v2.2.4-stage.3...v2.3.0-stage.1) (2025-11-13)

### Features

* improve validation error messages with detailed formatting and fix cache settings (#314) ([f6a53cf](f6a53cf))
@pablodiehl
Copy link
Collaborator

🎉 This PR is included in version 2.3.0-stage.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jcbsfilho jcbsfilho mentioned this pull request Dec 5, 2025
pablodiehl pushed a commit that referenced this pull request Dec 5, 2025
[skip ci]
## [2.3.0](v2.2.3...v2.3.0) (2025-12-05)

### Features

* add AsyncLocalStorage snapshot polyfill and zlib inflateSync support (#317) ([e507301](e507301))
* add SvelteKit preset with custom adapter (#315) ([b46122b](b46122b))
* improve validation error messages with detailed formatting and fix cache settings (#314) ([f6a53cf](f6a53cf))

### Bug Fixes

* add required field validation for config schema (#313) ([b223cfd](b223cfd))
* add support for ArrayBuffer and Uint8Array content types in Storage API (#323) ([2623b63](2623b63))
* adjust Node.js Polyfills and add Unicode Character Sanitization (#320) ([8bd151e](8bd151e))
* cmd manifest transform (#312) ([18b516a](18b516a))
* improve performance of pem cleanup in the jws package (#311) ([4e24b26](4e24b26))
@pablodiehl
Copy link
Collaborator

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants