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

Configuration pre-install validation against schema #58

Merged
merged 10 commits into from
Mar 2, 2023

Conversation

guidograzioli
Copy link
Member

@guidograzioli guidograzioli commented Feb 7, 2023

Fix #55

Ideally active_address_settings items should accept a map of arbitrary activemq settings (in snake-case instead of kebab-case); given a specific activemq version, the generated configuration should be validate against the corresponding xsd, possibly in the prereq phase. An additional variable activemq_address_settings_defaults should control the output (or not) of passed-in parameters that are defined as default in the xml schema, in order to explicitly fix a configuration between schema updates, or alternatively accept whatever is the default of that version.

This PR adds extra tasks before the install/configuration phase, which take care of fetching the xsd schemas for required activemq version, pre-generate the configuration, and perform a schema validation step against each of the broker.xml main elements under <core:core>

Additionally, it refactors how address-settings are generated, so that arbitrary configuration is accepted (and validated).

The activemq_address_settings variable has changed type from list(dict) to list(match(str),parameters(dict), like follows:

  - match: activemq.management#
    parameters:
      dead_letter_address: DLQ
      expiry_address: ExpiryQueue
      redelivery_delay: 0
      max_size_bytes: -1
      message_counter_history_day_limit: 10
      address_full_policy: PAGE
      auto_create_queues: true
      auto_create_addresses: true
      auto_create_jms_queues: true
      auto_create_jms_topics: true

@guidograzioli guidograzioli added the minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix label Feb 7, 2023
@guidograzioli guidograzioli changed the title Complete address-settings template parameters Configuration pre-install validation against schema Mar 2, 2023
@guidograzioli guidograzioli added major_changes Major changes mean the user can CHOOSE to make a change when they update but do not have to and removed minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix labels Mar 2, 2023
Copy link
Contributor

@rpelisse rpelisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@guidograzioli guidograzioli merged commit c1737f2 into main Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major_changes Major changes mean the user can CHOOSE to make a change when they update but do not have to
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We would like to get more option for address settings
2 participants