-
Notifications
You must be signed in to change notification settings - Fork 46
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
Test/improve deploy and CI methods #836
Comments
Hi I'd love to help with this. I have expertise on Linux systems and releasing free software products. Depending on the requirements and priorities some things that, off the top of my head, could use some love (imo) are:
probably you have already some solutions and opinions on the above topics, I'd love to hear your thoughts on this. At last I'm not sure if any of you will attend Reclaim The Tech this May in Bologna. I'm based there and I was pondering the idea of bringing a small talk/workshop on how to build a Bonfire extension. I still don't know Elixir very well so I'm not sure if I will be able to, but if you are interested in my proposal above we could setup a meeting (I believe also @chobeat may be interested) where we define better the needs of Bonfire in terms of CI and release workflow and you show me how you currently build and run Bonfire on your environment :) WDYT? |
Hey @fishinthecalculator this sounds really great! totally up to dicuss it further over a call. |
Awesome. I'm sending you a poll via email @ivanminutillo and @mayel . thank you for your help! |
Of course this is up for discussion but I'd say our blessed ways so far are:
|
There's an initial test workflow here: https://github.com/bonfire-networks/bonfire-app/blob/main/.github/workflows/test.yaml
There's
There's then https://github.com/bonfire-networks/bonfire-app/blob/main/.github/workflows/release.yaml which builds docker images for different flavours (only for amd64 for now since there others were too slow, but we should try adding arm64 again so it can produce a multiarch image). We can also build a release locally instead using Additionally there's https://github.com/bonfire-networks/bonfire-app/blob/main/.github/workflows/docs.yaml which builds docs and publishes them to https://doc.bonfirenetworks.org/readme.html |
Anyway, I look forward to chatting next week, just thought it'd be useful to see what we have and where the gaps or room for improvement are beforehand :) |
I'd like your opinion on this: CI for the main branch is worth insofar as its breakage is rare or at least is solved quickly and all changes to the main branch should require a MR (or equivalent, like a branch) with green CI. this is not really urgent right now but I think it is pretty important for a stable 1.0 software, so starting setting up some process in this sense could be helpful. I'm reasonably sure that the CI in #856 is working, but right now on main there's some dependency conflict so it would still be red upon merge. I think to prevent failures we should at least:
how can we stabilize the main branch (and the extensions repositories) development workflow so that CI "never" breaks? can I help? my only experience is with a branching policy that has develop/main branches with feature branches going into develop and releases done on main after merging a stable develop commit (the develop name is just an example). maybe the whole develop/main circus is too much bureaucracy, and feature branches against main are sufficient? what do you think? one this is figured out I can proceed with the release CI i believe |
I've been thinking about this too since our chat, and while I don't have any definitive answers, as you've seen with #851 it seems like ideally tests should run within each extension as much as possible, so the main app repo prioritise running extension integration tests (ones that depend on several extensions working together), maybe only running the full suite before a release. This means having a CI workflow in each extension, but first I need to get tests to actually run within extension (finishing #851)... Speaking of releases, we should start using semantic versioning not only on the app but also for each extension, so dependencies can be specified with a version number rather than pointing to main branch. Ideally we'd publish the extensions to https://hex.pm as well and only use git for development. Anyway, more to think about and discuss... |
To answer your question about where extensions are specified:
|
@fishinthecalculator alright, it required some tweaks (on the elixir and justfile sides) but tests are now running :) |
cool thanks. I'll look into the release pipeline :) |
@fishinthecalculator alright closed #851 meaning tests are now runnable in isolated fashion in the https://github.com/bonfire-networks/bonfire_ui_me extension, so you could use that one for prototyping and then we can replicate to the others |
See bonfire-networks/bonfire_fail#1 (comment) for a discussion of our branching/commit/PR workflow... |
@fishinthecalculator following that discussion, I have translated jungle into elixir (for fetching all cloned extensions/forks in parallel and same for messctl is in progress |
Alright, still needs some more testing, but here's |
@fishinthecalculator @ivanminutillo here's a first attempt at auto-branching-and-PR, but would love to have a higher level discussion about ideal workflows first: https://github.com/bonfire-networks/bonfire-app/pull/1071/files (yes, that branch and PR where created by the script in the PR) |
After discussing with @ivanminutillo here's a workflow that seems to balance the pros/cons for us:
|
this sounds quite close to established practices and a huge step forward compared to the current structure so 👍 for me. How would the last item look like in practice? |
Well ideally the release script (or CI) would also increment the version and publish to hex once tests pass, so actually releases would use that instead of the |
Hi @mayel @ivanminutillo @chobeat , apologies for the delay. I agree on the main/stable branching model, thank you for your help! |
Also what would be the next steps? Can I help somehow? Otherwise I plan to add CI to the following extensions in this order:
|
Well, haven't given it much thought, but in terms of which extensions would benefit first, it's worth knowing that the UI ones have the most failing tests (some from changes in features/UX where tests haven't been updated, some from changes in HTML/CSS which points to fragile tests, some from bugs) whereas the backend extensions (like bonfire_me, bonfire_social, bonfire_posts, bonfire_social_graph, etc) are more likely to have little to no broken tests |
hey, wonderful improvements :) imo this could be a good moment to start adding CI to UI extensions, now that features and UX are become stable, in particular :
|
Hi @mayel @ivanminutillo , let me recap the requirements so that you can help me prioritize them. The need is to have development supported through process improvements, CI and automation scripts directed to the goal of stabilizing the Bonfire umbrella app and extension codebases. We'll need to have some kind of measure of success to define when this task can be considered complete, it can be a minimal set of required repositories that have to be covered and a set of nice to haves or something else entirely. Let me know your thoughts about this, thanks. Bonfire development modelBelow I'll describe the development model proposed by @mayel some comments above with some changes I'm proposing. Once we reach consensus this will probably need to be documented somewhere.
Priority of the extensionsAn extension is considered covered once it has CI running on the
Do you have a list of extensions that must be covered before 1.0? What do you think about this proposal? All of the above is obviously doomed to be exposed to change if some technical issue arises but I think it's a good start. Definitely let me know if I need to elaborate further. Thank you |
I think we've got a good approach, and a working structure https://github.com/bonfire-networks/bonfire-extension-boilerplate and its justfile that can update itself and other files in extension repos (such as CI scripts). Closing this issue and we can follow it up by more specific ones as needs arise. |
No description provided.
The text was updated successfully, but these errors were encountered: