-
Notifications
You must be signed in to change notification settings - Fork 16
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 build script for project foxhound. #225
Conversation
Currently one of the difficulties for people to get started with project foxhound seems to be the build. As how to build foxhound with playwright is something that's currently undocumented outside of the SAP CI and my adaption of it, this seems like a big hurdle to overcome. This PR aims to be the first step to automate most of the build requirements. It borrows heavily from Foxhound_builder, but as this script is supposed to live in tree we can simplify stuff greatly. We can, for example, make the playwright version available in machine readable format. This avoids the issue that each user has to update the build script on each release, because we can maintain the compatible playwright version. This can be extended to cover checks for usable rustc versions in the future. Generally, there are some additions that would be nice to have in the future: - Support to make a commit for the version we are trying to build. This matters in combination with playwright, as we avoid having an unclean tree. It also brings some issues, as we would have to detect that we are building on top of a branch used to build playwright to avoid throwing the branch away for each build (?) - Support to disable the preparation phase. If we want to test small changes iteratively, re-applying the playwright patches, running bootstrap etc is superfluous and can be avoided. - Additional safeguards. Such as tests for the correct rust version. This might be cumbersome as we would have to ensure the script picks up the same rust version mach does. It seems to favor the rustup based version over the version that is installed on the main OS. This requires testing, as this is only based on my observations so far. - Post build checks. For example, if we compile with playwright support, we can test `foxhound -juggler-pipe` and if the flag is recognized, the playwright integration is available.
Are you planning to implement the bullet points for this PR or just at some point in the future? |
Hmm, the low hanging fruits I'd implement in this PR. The safeguards are something I'm less sure about and would leave them open for future consideration. |
That would have been my preference too! |
Hmmm, during local testing, I get the feeling that having too many options can lead to situations where you have to recover the build environment manually. For example, if I run |
- Add option to reset the git repository prior to building - Fixed the no clobber behavior (logic was inverted, bash scripting is a mess)
I guess there will always be the issue that after applying playwright patches the user should not develop / commit on top of this. So after the build we will always want to roll-back the patches before developing anything. Could we handle this by creating a git branch specifically where the patches are applied? |
That was my first intuition, too; most of the building blocks for this are already in place in the script. I think this would require quite extensive documentation on how to work on Foxhound, as otherwise, people might get into states that are cumbersome to resolve. I think the workflow that we should support based on the build script is the following:
What I think might work is something like the following: |
I have started updating the documentation in the Wiki and added the option to create a Git commit after applying the playwright changes ( Due to the increasing number of flags, some combinations may be problematic, but testing them all is too time-consuming at the moment. Once our server admin is back from vacation, I'll have a look at running the build via a cron job every night to provide compiled executables to download. |
Unless you have some change requests I think we can merge this @tmbrbr :) |
Currently one of the difficulties for people to get started with project foxhound seems to be the build. As how to build foxhound with playwright is something that's currently undocumented outside of the SAP CI and my adaption of it, this seems like a big hurdle to overcome.
This PR aims to be the first step to automate most of the build requirements. It borrows heavily from Foxhound_builder, but as this script is supposed to live in tree we can simplify stuff greatly.
We can, for example, make the playwright version available in machine readable format. This avoids the issue that each user has to update the build script on each release, because we can maintain the compatible playwright version. This can be extended to cover checks for usable rustc versions in the future.
Generally, there are some additions that would be nice to have in the future:
Support to make a commit for the version we are trying to build. This matters in combination with playwright, as we avoid having an unclean tree. It also brings some issues, as we would have to detect that we are building on top of a branch used to build playwright to avoid throwing the branch away for each build (?)
Support to disable the preparation phase. If we want to test small changes iteratively, re-applying the playwright patches, running bootstrap etc is superfluous and can be avoided.
Additional safeguards. Such as tests for the correct rust version. This might be cumbersome as we would have to ensure the script picks up the same rust version mach does. It seems to favor the rustup based version over the version that is installed on the main OS. This requires testing, as this is only based on my observations so far.
Post build checks.
For example, if we compile with playwright support, we can test
foxhound -juggler-pipe
and if the flag is recognized, the playwright integration is available.