Open dzwillia opened 4 years ago
Sorry -- just saw this. Hmm.
There are a few potential issues I can see here:
functions-
is a flex internal thing or will be forked/used by devs. If the latter, this is a pretty heavy dump of crap into the otherwise clean repo. To me, the creation of a new intercom.yml takes all of 5 minutes (copy/paste, find/replace name) and doesn't seem to be the core showstopper in all the above efforts that you're making. Maybe I'm missing something, but seems like if you automated everything else EXCEPT the final website servicename.yml file, the latter would be a trivial thing for us to add manually?
We only have a dozen or so integrations right now and, as we continue to roll them out, I've had a few thoughts on "pinch points" in the process.
Right now, when we want to add a new integration, we have to do the following:
1) Create a new repo named "functions-<integration-name>" which includes the scripts that contain the logic as well as a flexio.yml file. 2) Make sure we have a logo for the integration -- add the logo file to the flexiodata/flexio-static repo. 3) Add the repository header information to integrations.yml both in the flexiodata/flexio-static repo as well as the flexiodata/website repo.
4) Update the update-integrations.bat with the repo name in the flexiodata/flexio-static repo as well as the flexiodata/website repo. 5) Run update-integrations.bat in the flexiodata/flexio-static repo as well as the flexiodata/website repo and push the changes. (NOTE: Pushing changes to the flexiodata/flexio-static repo will trigger a rebuild of the static site via Netlify). 6) Create a.yml file with all of the website content (including/duplicating most of the information from its respective flexio.yml file) in the src/def/integrations folder in the flexiodata/website repo.
7) SSH into test.flex.io, rebuild the website and make sure everything looks good:
So, much of this is relatively trivial stuff, however, one thing that we're running into that is somewhat annoying and causing problems is the multiple sources of truth. There's the function pack repos (in 3 places!), there's the integrations.yml file (in two locations), there are multiple update scripts that have to be edited and then there's the website content file (also a .yml file) for the integration. (I will include an example of these files as part of this issue)
I feel like this is the sort of thing that can be sorted pretty easily by merging the YAML file we use for the website content into the flexio.yml file in each function pack. This would give us a single source of truth. The only downside to doing this is that when someone forks that repo, they would be able to see some of the info we use (keywords, Markdown) that we use to render the integration page on our website. Dunno... I don't think that's a very big deal. Right now, the YAML that builds the form that we use in the app is already included.
Certainly don't want to get sidetracked with an "organization/optimization" project right now, however, I believe this wouldn't take more than a half a day or so to get sorted and I think it might make this far more straightforward as we add more. (I'm also think forward to the couple of weeks I'll be out of pocket once the baby arrives and trying to make sure this is manageable for you all).
Thoughts?
flexio.yml (in functions-intercom repo)
intercom.yml (in src/def/integrations folder in flexiodata/website repo)
Proposed flexio.yml file with website content merged in