Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Automate generation of all possible answer path for each service's questions #194

Open
4 tasks done
spaniernathan opened this issue Feb 4, 2021 · 0 comments
Open
4 tasks done
Assignees

Comments

@spaniernathan
Copy link
Contributor

spaniernathan commented Feb 4, 2021

Is your feature request related to a problem? Please describe.
For now, we are writing each permutation of ressource deployment for tests and we want to automate this process.

For example on the IVS service, those are all the questions permutation the user can do:
Screenshot 2021-02-04 at 15 08 19

And those kind of shell scripts are written for each paths permutations:

#!/bin/bash
set -e
IFS='|'
PERMUTATION="{\
\"service\":\"video\",\
\"serviceType\":\"ivs\",\
\"providerName\":\"awscloudformation\",\
\"resourceName\":\"std-low\",\
\"channelQuality\":\"STANDARD\",\
\"channelLatency\":\"LOW\",\
...
}"
amplify video add --payload $PERMUTATION

I would like to automate this kind of process

Describe the solution you'd like
A script that will go through a specific file (called helper file for now) containing the relations between questions asked to the user, A script that will go through every provider-utils/{}-questions.json files then build a graph of all the possible paths the CLI user can go through when creating a ressource and then go all over that graph to generate all the possible cases. Automate the generation of all possible cloudformation templates a user can generate with amplify video add.

Describe alternatives you've considered

  • Build a graph of all permutations for a {}-questions.json file (Only for the ivs-questions.json for now but the goal is to be able to do it with all question files).
  • Write the helper files for IVS and Livestream services
  • Generate the Tree of all the possible paths for answers to CLI questions
  • Go through all those permutations and generate the shell script that will emulate user input to generate CouldFormation template

Additional context
For some of the paths, we might not be able to automatically generate the possible permutations because some logic is implemented between certain question (for example in VOD serviceType) some of the paths are programatically implemented (for example if on question 10 the user says 'yes' it goes to question 11 and if he says 'no' it goes on question 14). If we want to be able to fully automate the generation, we might need to change how the questions files are formatted (maybe add relation between questions)

Related to: #186

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant