Repository navigation
feat(PipelineInitialize): add additionalcountries warning - #44
ChrisBlankDe wants to merge 1 commit into
Conversation
…tries in COSMO Alpaca
There was a problem hiding this comment.
Pull request overview
Adds a settings check to PipelineInitialize.ps1 to detect additionalCountries usage and emit diagnostic output indicating the feature is unsupported in COSMO Alpaca.
Changes:
- Parse
additionalCountrieswhen provided as a comma-separated string. - Emit a debug line listing specified additional countries.
- Emit a warning that
additionalCountriesis not supported, pointing to documentation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if ($additionalCountries -is [String]) { $additionalCountries = @($additionalCountries.Split(',').Trim() | Where-Object { $_ }) } | ||
| if ($additionalCountries.Length -gt 0) { | ||
| Write-AlpacaDebug "Additional countries specified: $($additionalCountries -join ', ')" | ||
| Write-AlpacaWarning "AdditionalCountries are not supported by COSMO Alpaca. Use BuildModes to validate additional countries. https://docs.cosmoconsult.com/en-en/cloud-service/alpaca/github/" #TODO update link when site is published. |
There was a problem hiding this comment.
The warning message uses AdditionalCountries (PascalCase) while the setting/variable is additionalCountries, and the phrasing is a bit inconsistent (e.g., “AdditionalCountries are not supported…”). Aligning the casing with the actual setting name and tightening the wording will make the warning clearer/searchable.
| Write-AlpacaWarning "AdditionalCountries are not supported by COSMO Alpaca. Use BuildModes to validate additional countries. https://docs.cosmoconsult.com/en-en/cloud-service/alpaca/github/" #TODO update link when site is published. | |
| Write-AlpacaWarning "The setting 'additionalCountries' is not supported by COSMO Alpaca. Use BuildModes to validate additional countries. https://docs.cosmoconsult.com/en-en/cloud-service/alpaca/github/" #TODO update link when site is published. |
|
|
||
|
|
||
| # Check Settings | ||
| if ($additionalCountries -is [String]) { $additionalCountries = @($additionalCountries.Split(',').Trim() | Where-Object { $_ }) } |
There was a problem hiding this comment.
$additionalCountries is only split/trimmed when it's a single string. If it’s already an array (e.g., coming from settings as a JSON array), entries won’t be trimmed/filtered consistently and the debug output can include leading/trailing spaces. Consider normalizing the value for both string and array inputs (trim each entry, drop empty) before checking/counting.
| if ($additionalCountries -is [String]) { $additionalCountries = @($additionalCountries.Split(',').Trim() | Where-Object { $_ }) } | |
| if ($additionalCountries -is [String]) { | |
| $additionalCountries = @($additionalCountries.Split(',')) | |
| } | |
| else { | |
| $additionalCountries = @($additionalCountries) | |
| } | |
| $additionalCountries = @( | |
| $additionalCountries | | |
| ForEach-Object { "$_".Trim() } | | |
| Where-Object { $_ } | |
| ) |
|
Moved to new repo: https://github.com/cosmoconsult/alpaca-al-go/pull/6 |
This pull request adds a validation step for the
additionalCountriesparameter in thePipelineInitialize.ps1script. Now, if additional countries are specified, the script will output a debug message listing them and a warning that this feature is not supported, with a link to relevant documentation.Validation and warnings for additional countries:
additionalCountriesparameter, displaying a debug message with the specified countries and a warning that this feature is not supported by COSMO Alpaca, including a documentation link.part of AB#4538