Skip to content
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

Build out Pipeline for Whistium Builds #7118

Open
rpadaki opened this issue Aug 22, 2022 · 0 comments
Open

Build out Pipeline for Whistium Builds #7118

rpadaki opened this issue Aug 22, 2022 · 0 comments
Labels
devOps Improving or adding new tests & CI capabilities priority-4-medium #4 Priority - An important, non-blocking issue 📁 Repo: browser This PR/Issue modifies /browser code 📁 Repo: mandelboxes This PR/Issue modifies /mandelboxes code

Comments

@rpadaki
Copy link
Contributor

rpadaki commented Aug 22, 2022

Copied from Slack

Curious people's thoughts on a development setup for Whistium (our server Chromium-based fork). Right now it's going to be as simple as:

  1. Log on to roshan-builds-chromium EC2 instance
  2. Make your changes
  3. Build
  4. Upload to S3
  5. Rebuild your browsers/whistium mandelbox to pull the new version
    Meanwhile, deployment instances will also just pull from the S3 bucket. This is fine for now because we don't need to make any more changes for the time being.

Eventually, though, we need a more robust setup if we're going to make significant changes. This will consist of two components:
CI for dev, staging, and prod, which applies our Whistium patches to Chromium or Brave, builds it, and uploads the .deb output to S3.
A development build setup
The CI is self-explanatory. The development build setup needs to enable us to modify and test Chromium during development, or to build mandelboxes in general even if not modifying Whistium. I see a few options:

  1. Require all developer EC2 instances to be capable of building Chromium. This will either be expensive or lead to extremely time-consuming builds. Probably both.
  2. Pull Whistium from the dev CI S3 bucket. If a developer needs to modify Whistium, they should have a separate beefy instance capable of building it, and then they can manually load it into their mandelbox. But pulling from dev as a default can make everyone else's lives easier.
  3. Cache on a hash of the patch (a mouthful, I know) in S3. That is, have an S3 bucket where we keep Whistium builds indexed by a hash of the diff.
    When we ./build.sh browsers/whistium, check if hash_contents("whistium.patch") is a folder in the S3 bucket.
    • If it is, pull that whistium.deb and use it for the mandelbox.
    • If isn't, use the gh CLI to trigger a manual workflow run on a beefy EC2 runner and wait for it to finish. This workflow takes the submitted whistium.patch, applies it to Chromium, and uploads the result to the hash_contents("whistium.patch") folder in S3.
    • The great thing about this approach is that we don't need a separate pipeline for CI versus development. Dev/staging/prod CI can use the exact same logic above, allowing them to skip unnecessarily building Chromium if a developer already triggered a build when they merged the most recent whistium.patch PR. Also no need to rebuild after promotions.
    • To avoid the S3 bucket becoming massive, we could add very simple logic to evict any builds that are not dev/staging/prod and are over a week old.
  4. Don't cache on a hash of the patch. Similar to Catch staging up with master #3, but instead of this shared S3 bucket, have the workflow directly send the Chromium build back to the developer's EC2 instance. While this may be conceptually simpler, it will lead to extraneous work.
  5. Consider Catch staging up with master #3 and Set up monorepo (into master) #4 using GitHub Actions artifacts instead of an S3 bucket. Then we can take advantage of GitHub's default retention policy as well.
@rpadaki rpadaki added 📁 Repo: browser This PR/Issue modifies /browser code 📁 Repo: mandelboxes This PR/Issue modifies /mandelboxes code devOps Improving or adding new tests & CI capabilities core-implementation This needs to be implemented to get this project working in the first place priority-4-medium #4 Priority - An important, non-blocking issue and removed core-implementation This needs to be implemented to get this project working in the first place labels Aug 22, 2022
@philippemnoel philippemnoel removed the core-implementation This needs to be implemented to get this project working in the first place label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devOps Improving or adding new tests & CI capabilities priority-4-medium #4 Priority - An important, non-blocking issue 📁 Repo: browser This PR/Issue modifies /browser code 📁 Repo: mandelboxes This PR/Issue modifies /mandelboxes code
Projects
None yet
Development

No branches or pull requests

2 participants