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

Add check in Asnible when setting the primary and secondary Languages to ensure they are correct values #1529

Open
guillemmayolramis1 opened this issue Oct 25, 2024 · 0 comments
Labels
Enhancement New feature or request

Comments

@guillemmayolramis1
Copy link

Feature and motivation

  • Currently there is no check to ensure the values used for baseLang and secondaryLangs are valid. This causes that the failure happens while already deploying MAS on the cluster which is frustrating as the mas install has to be invoked again passing again all parameters.

Example of failure
TASK [ibm.mas_devops.suite_app_config : Configure application in workspace] **** fatal: [localhost]: FAILED! => changed=false msg: 'Failed to create object: b''{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"ManageWorkspace.apps.mas.ibm.com \\"instance-nft-wsnft\\" is invalid: spec.settings.languages.secondaryLangs[1]: Unsupported value: \\"PT\\": supported values: \\"AR\\", \\"CS\\", \\"DA\\", \\"DE\\", \\"EN\\", \\"ES\\", \\"FI\\", \\"FR\\", \\"HE\\", \\"HR\\", \\"HU\\", \\"IT\\", \\"JA\\", \\"KO\\", \\"NL\\", \\"NO\\", \\"PL\\", \\"PT-BR\\", \\"RU\\", \\"SK\\", \\"SL\\", \\"SV\\", \\"TR\\", \\"UK\\", \\"ZH-CN\\", \\"ZH-TW\\"","reason":"Invalid","details":{"name":"instance-nft-wsnft","group":"apps.mas.ibm.com","kind":"ManageWorkspace","causes":[{"reason":"FieldValueNotSupported","message":"Unsupported value: \\"PT\\": supported values: \\"AR\\", \\"CS\\", \\"DA\\", \\"DE\\", \\"EN\\", \\"ES\\", \\"FI\\", \\"FR\\", \\"HE\\", \\"HR\\", \\"HU\\", \\"IT\\", \\"JA\\", \\"KO\\", \\"NL\\", \\"NO\\", \\"PL\\", \\"PT-BR\\", \\"RU\\", \\"SK\\", \\"SL\\", \\"SV\\", \\"TR\\", \\"UK\\", \\"ZH-CN\\", \\"ZH-TW\\"","field":"spec.settings.languages.secondaryLangs[1]"}]},"code":422}\n''' reason: Unprocessable Entity

Usage example

During mas install the language var should be evaluated against valid values and ask for the user to reinsert in case of invalid value.

@guillemmayolramis1 guillemmayolramis1 added the Enhancement New feature or request label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant