Use annotations to implement the error handling in the bind role. @cfoskin Sorry for not thinking about this earlier. Using the annotations is a lot simpler than parsing the JSON (as in https://github.com/aerogearcatalog/unifiedpush-apb/pusll/50).
How it works
Before the binding starts we check if the secret already has an annotation for the platform. The annotation is set after a variant has been created via UPS REST call and should be as valid as the config object for checking if a variant for a platform already exists.
Verification steps:
Deploy the apb using this branch
Create an android variant: it should work
Create an iOS variant: it should work
Create another android variant: it should fail
Delete the failed binding: it should work
Create another iOS variant: it should fail
Delete the failed binding: it should work
@aliok If you need to update the name of the annotations you also need to update them in the bind role now (or we use an ansible variable).
Use annotations to implement the error handling in the bind role. @cfoskin Sorry for not thinking about this earlier. Using the annotations is a lot simpler than parsing the JSON (as in https://github.com/aerogearcatalog/unifiedpush-apb/pusll/50).
How it works
Before the binding starts we check if the secret already has an annotation for the platform. The annotation is set after a variant has been created via UPS REST call and should be as valid as the config object for checking if a variant for a platform already exists.
Verification steps:
@aliok If you need to update the name of the annotations you also need to update them in the bind role now (or we use an ansible variable).