Skip to content

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Nov 22, 2023

Issue being fixed or feature implemented

Hopefully fixes issues like

The job running on runner ubuntu-core-x64_i-05ed4263b8e049c7a has exceeded the maximum execution time of 360 minutes

https://github.com/dashpay/dash/actions/runs/6932017275

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes

What was done?

Bump timeouts for the job itself and for the corresponding step. Also, implemented caching for .cache and depends folders.

How Has This Been Tested?

#5729

https://github.com/dashpay/dash/actions/runs/6996271543/job/19031968814?pr=5729

Breaking Changes

n/a

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

Copy link

@strophy strophy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should work on implementing caching or appropriately scaling the runners instead. Is this mostly single threaded load? Why does it take so long? Could we get better performance with e.g. native ARM runners?

@UdjinM6 UdjinM6 force-pushed the bump_ci_guix_timeout branch from de5f100 to 4eaeef4 Compare November 27, 2023 16:13
@UdjinM6 UdjinM6 changed the title ci: Bump Guix build timeout ci: Bump Guix build timeout and implement cacheing Nov 27, 2023
@UdjinM6
Copy link
Author

UdjinM6 commented Nov 27, 2023

I think we should work on implementing caching or appropriately scaling the runners instead. Is this mostly single threaded load? Why does it take so long? Could we get better performance with e.g. native ARM runners?

No idea about using other runners but I reduced the timeout from 12h I originally proposed to 8h and implemented some caching. It takes 6h+ with no/outdated cache and 4-5h with an up to date cache. The build time also vary due to the need to build some Guix modules when they are updated but 8h should be enough to cover that I think. Or we can slightly bump it later if needed.

@UdjinM6 UdjinM6 mentioned this pull request Nov 27, 2023
5 tasks
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK for squash merge

@UdjinM6 UdjinM6 requested a review from strophy November 29, 2023 14:49
@strophy
Copy link

strophy commented Nov 29, 2023

8h seems extremely long to me, given we just got the (theoretically much more complex) platform build down to <10m. Can we cache the Guix modules that need to be built? Is there any way we can switch this back to running on GitHub-hosted runners?

@UdjinM6
Copy link
Author

UdjinM6 commented Nov 30, 2023

8h seems extremely long to me, given we just got the (theoretically much more complex) platform build down to <10m.

8h is the upper limit, ~6.5h is the current known worst case scenario and this PR brings the time for (hopefully) most cases down to 4.5h. Also, in this Guix workflow we produce deterministic binaries for 7 hosts/platforms. I'm not familiar with platform workflows but is it even an apples-to-apples comparison?

Can we cache the Guix modules that need to be built?

We use substitutions (pre-built modules) already and I think all the cache Guix produces for it's own modules sits in .cache/guix which is cached too now.

Is there any way we can switch this back to running on GitHub-hosted runners?

I guess it should be possible to do it by using https://github.com/marketplace/actions/install-gnu-guix maybe (but probably won't help because we'd need to install other packages too somehow). Right now we use docker to build it (we do not install guix on host machines) and this PR simply aims to fix (and slightly optimise) Guix builds that were working previously. We could try to migrate to gh runners later imo.

Copy link

@strophy strophy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's merge for now and verify everything is working as expected for a few builds. @ktechmidas please monitor CPU usage during a run and see if we are better off running this on a low CPU-count host due to long time spent on single-threaded tasks during build. In that case we should be fine moving back to GH-hosted runners, where cache response time will also be faster.

@PastaPastaPasta PastaPastaPasta merged commit bc9af85 into dashpay:develop Dec 1, 2023
@UdjinM6 UdjinM6 modified the milestones: 20.1, 20.0.2 Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants