This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes concourse/concourse#5901 Currently there's some odd behaviour for one-off builds -- they appear as `<team name>///<build name>/<step name>`, but this will be handled in a later issue. While working on this, I noticed some blank entries in the output and realized these corresponded to image check and image pull containers -- these are for finding and fetching the `image_resource` on a task. I've written a separate issue to add accounting for these as well. There is clearly some conceptual duplication between the `insertResourceWorkloads` and `insertBuildWorkloads` functions -- I can imagine adding more such functions for the other container types I mentioned above, so it's probably worth formalizing this as an interface. Instinctively it feels a Strategy pattern, and I'd like to have a good name for the way these strategies get aggregated as well. My other thought was to make multiple Accountant implementations with some means of composing them -- like a monoid structure on Accountants. Maybe this would look like a `CompositeAccountant`. There is also some not-so-pretty duplication between the big test cases, and despite my best efforts at isolation, they are already reaching a 10-second running time. I assume most of that time is spent waiting for asynchronous processes in the setup -- I wonder if there is a good way to profile each test case. Signed-off-by: Jamie Klassen <[email protected]>
- Loading branch information
Jamie Klassen
committed
Jul 22, 2020
1 parent
3a6aa0b
commit 4802d1f
Showing
4 changed files
with
250 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters