Class AutoCheckoutHealthReport
- java.lang.Object
-
- jetbrains.buildServer.serverSide.healthStatus.HealthStatusReport
-
- jetbrains.buildServer.serverSide.healthStatus.reports.AutoCheckoutHealthReport
-
- All Implemented Interfaces:
ServerExtension
,TeamCityExtension
public class AutoCheckoutHealthReport extends HealthStatusReport
For each build configuration that uses auto-checkout mode reports different cases when agent-side checkout is not possible.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AutoCheckoutHealthReport.BuildDecisionWithBuild
-
Field Summary
Fields Modifier and Type Field Description static String
MISSING_CLIENT_ITEM
static String
MISSING_VCS_CLIENT_CATEGORY_NAME
Reported as a separate category because user can easily fix it by installing software to the agent.static String
NOT_OPTIMAL_CHECKOUT_CATEGORY_NAME
static String
OTHER_REASON
static String
REPORT_TYPE
static String
UNSUPPORTED_CHECKOUT_RULES_ITEM
-
Constructor Summary
Constructors Constructor Description AutoCheckoutHealthReport(AutoCheckoutResolveResults autoCheckoutResolveResults, BuildHistory buildHistory, RunningBuildsManager runningBuildsManager, WebLinks webLinks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canReportItemsFor(HealthStatusScope scope)
Check whether the report can produce any items accepted by the specified scope.Collection<ItemCategory>
getCategories()
Problems categories producing by this problem finder.String
getDisplayName()
User presentable name of the problem finder.String
getType()
void
report(HealthStatusScope scope, HealthStatusItemConsumer resultConsumer)
When called must report all found problems to result consumer according to the received scope.-
Methods inherited from class jetbrains.buildServer.serverSide.healthStatus.HealthStatusReport
equals, hashCode
-
-
-
-
Field Detail
-
REPORT_TYPE
public static final String REPORT_TYPE
- See Also:
- Constant Field Values
-
MISSING_CLIENT_ITEM
public static final String MISSING_CLIENT_ITEM
- See Also:
- Constant Field Values
-
UNSUPPORTED_CHECKOUT_RULES_ITEM
public static final String UNSUPPORTED_CHECKOUT_RULES_ITEM
- See Also:
- Constant Field Values
-
OTHER_REASON
public static final String OTHER_REASON
- See Also:
- Constant Field Values
-
MISSING_VCS_CLIENT_CATEGORY_NAME
public static final String MISSING_VCS_CLIENT_CATEGORY_NAME
Reported as a separate category because user can easily fix it by installing software to the agent.- See Also:
- Constant Field Values
-
NOT_OPTIMAL_CHECKOUT_CATEGORY_NAME
public static final String NOT_OPTIMAL_CHECKOUT_CATEGORY_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AutoCheckoutHealthReport
public AutoCheckoutHealthReport(AutoCheckoutResolveResults autoCheckoutResolveResults, BuildHistory buildHistory, RunningBuildsManager runningBuildsManager, WebLinks webLinks)
-
-
Method Detail
-
getType
@NotNull public String getType()
- Specified by:
getType
in classHealthStatusReport
- Returns:
- unique identifier of the problem finder
-
getDisplayName
@NotNull public String getDisplayName()
Description copied from class:HealthStatusReport
User presentable name of the problem finder.- Specified by:
getDisplayName
in classHealthStatusReport
- Returns:
- name of the problem finder to show in the user interface.
-
getCategories
@NotNull public Collection<ItemCategory> getCategories()
Description copied from class:HealthStatusReport
Problems categories producing by this problem finder. All problems of 'undeclared' categories will be filtered even if they were consumed.- Specified by:
getCategories
in classHealthStatusReport
- Returns:
- Unmodifiable not-empty collection of unique categories producing by this problem finder.
-
canReportItemsFor
public boolean canReportItemsFor(@NotNull HealthStatusScope scope)
Description copied from class:HealthStatusReport
Check whether the report can produce any items accepted by the specified scope.HealthStatusReport.report(HealthStatusScope, HealthStatusItemConsumer)
will not be called if this method return false. Implementations should not perform any complex calculations, they are expected to quickly analyzeHealthStatusScope
and return false if it is clear that they can not report any acceptable items. For example, they can return false if they can't produce items with the requested severity (that is accepted byHealthStatusScope.isItemWithSeverityAccepted(ItemSeverity)
).- Specified by:
canReportItemsFor
in classHealthStatusReport
-
report
public void report(@NotNull HealthStatusScope scope, @NotNull HealthStatusItemConsumer resultConsumer)
Description copied from class:HealthStatusReport
When called must report all found problems to result consumer according to the received scope. Always called with system privileges (in all permissions mode) so no permission checks are required. Note that this method can be called quite often, so long-running implementations should return false fromHealthStatusReport.canReportItemsFor(HealthStatusScope)
if it's clear that they can't produce any items for the requested scope. Implementations of this method should always return in a reasonable time. For example, long running computations or network calls should not be made in this method, but rather called in some background thread, their result saved to a cache, and then be read from the cache in this method.- Specified by:
report
in classHealthStatusReport
- Parameters:
scope
- health status coderesultConsumer
- health status item consumer
-
-