Skip to content

Conversation

wolfs
Copy link
Member

@wolfs wolfs commented Feb 1, 2018

Sharing the service causes problems when they are shut down - sometimes
the root service is shut down even if one of the included builds is
still running and using it.

This provides a fix for #4216.

@wolfs wolfs self-assigned this Feb 1, 2018
@wolfs wolfs added this to the 4.6 RC1 milestone Feb 1, 2018
@wolfs wolfs force-pushed the wolfs/build-cache/composite-build-bug branch from 4bb596c to 019d1fb Compare February 1, 2018 13:31
@wolfs wolfs changed the title Fix #4216 Build cache should work if included builds finish after the root build Feb 1, 2018
@wolfs wolfs changed the title Build cache should work if included builds finish after the root build WIP: Build cache should work if included builds finish after the root build Feb 1, 2018
@wolfs wolfs changed the title WIP: Build cache should work if included builds finish after the root build Build cache should work if included builds finish after the root build Feb 1, 2018
@wolfs wolfs modified the milestones: 4.6 RC1, 4.5.1 Feb 1, 2018
@wolfs wolfs force-pushed the wolfs/build-cache/composite-build-bug branch from c68232a to 07c40ba Compare February 1, 2018 17:45
@wolfs wolfs changed the base branch from master to release February 1, 2018 17:45
@wolfs wolfs changed the title Build cache should work if included builds finish after the root build Share build cache configuration instead of build cache service Feb 1, 2018
@wolfs wolfs force-pushed the wolfs/build-cache/composite-build-bug branch 2 times, most recently from 31a1fde to 8591878 Compare February 1, 2018 18:06
Sharing the service causes problems when they are shut down - sometimes
the root service is shut down even if one of the included builds is
still running and using it.

#4216
@wolfs wolfs force-pushed the wolfs/build-cache/composite-build-bug branch from 8591878 to a6350ce Compare February 1, 2018 22:03
It is possible to have more than one DirectoryBuildCache service
using the same target directory.
@wolfs wolfs force-pushed the wolfs/build-cache/composite-build-bug branch from 699e009 to 3002a18 Compare February 1, 2018 22:42
"""

expect:
succeeds '--parallel'
Copy link
Contributor

Choose a reason for hiding this comment

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

you don't need --parallel as the tasks for included builds are run in parallel anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, @adammurdoch. Removed.

@ldaley
Copy link
Contributor

ldaley commented Feb 2, 2018

This seems like the wrong solution to me. I think we should fix the lifecycling instead.

For example, this would complicate a solution for pre-emptively opening connections to the remote cache to amortize the connection cost.

and:
def finalizeOps = operations.all(FinalizeBuildCacheConfigurationBuildOperationType)
finalizeOps.size() == 2
finalizeOps.size() == 5
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a break for build scans.

We either need to roll this back (e.g. don't fire this event for non root builds), or we have to update build scans to ignore these events.

@ldaley
Copy link
Contributor

ldaley commented Feb 2, 2018

I've just realised that buildFinished for the root build firing before all other builds have finished is very detrimental to build scans.

I think we should just not fire the root buildFinished until the other builds have completed, as per #4199.

@wolfs
Copy link
Member Author

wolfs commented Feb 2, 2018

Closed in favor of #4249

@wolfs wolfs closed this Feb 2, 2018
@wolfs wolfs deleted the wolfs/build-cache/composite-build-bug branch February 13, 2018 22:36
@ov7a ov7a removed this from the 4.5.1 milestone Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants