Interface LowLevelProblemMutingService
-
- All Known Implementing Classes:
LowLevelProblemMutingServiceImpl
public interface LowLevelProblemMutingService
A service for muting tests and obtaining information about muted tests. Medium level interface.- Since:
- 6.1
- Author:
- Leonid Bushuev from JetBrains
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearMuteInfoCache()
Resets cache of mute informationMuteInfo
copyMuteInfo(MuteInfo muteInfo, SProject newProject)
Creates a copy of mute info in another project.BuildProblemMuter
makeBuildProblemMuter(BuildPromotionEx buildPromotion)
Makes a new build problem muting service.TestRunMuter
makeTestRunMuter(BuildPromotionEx buildPromotion)
Makes a new test run muting service.MuteInfo
muteProblemsInBT(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, String projectId, Set<String> buildTypes, Set<Integer> problems)
Mutes the specified build problems in the build configuration scope.MuteInfo
muteProblemsInBuild(long userId, String comment, String projectId, long buildId, Set<Integer> problems)
Mutes the build problems in a specified build only.void
muteProblemsInBuild(long buildId, Set<Integer> problems)
Mutes the build problems in a specified build only.MuteInfo
muteProblemsInProject(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, Set<Integer> problems)
Mutes specified build problems in the project scope.MuteInfo
muteProblemsInProject(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, UnmutePreference handleExistingMutesPreference, Set<Integer> problems)
Mutes specified build problems in the project scope.MuteInfo
muteTestsInBT(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, String projectId, Set<String> buildTypes, Set<Long> tests, boolean removePreviousMutes)
Mutes the specified tests in the build configuration scope.MuteInfo
muteTestsInBuild(long userId, String comment, String projectId, long buildId, Set<Long> tests)
Mutes the tests in a specified build only.MuteInfo
muteTestsInProject(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, Set<Long> tests)
Mutes specified tests in the project scope.MuteInfo
muteTestsInProject(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, UnmutePreference handleExistingMutesPreference, Set<Long> tests)
Mutes specified tests in the project scope.void
retrieveMutesOfOneTestInBuilds(long testNameId, Collection<Long> relatedBuildIds, MutingInBuildInfoConsumer consumer)
Retrieves mutes of runs of one test in given builds.void
retrieveMutesWithTimeOut(MutingInfoConsumer consumer)
Retrieves current mutes that already not actual because of the auto-unmuting time.Map<Integer,MuteInfo>
retrieveProblemMutesForBuild(long buildId)
Map<Integer,MuteInfo>
retrieveProblemMutesForBuild(DBFunctions dbf, long buildId)
void
retrieveProblemsCurrentMuteInfos(Set<String> projectIds, Set<String> buildTypeIds, MutingInfoConsumer consumer)
Retrieves information about currently muted build problems for the specified projects and build configurations.Map<Long,MuteInfo>
retrieveTestMutesForBuild(long buildId)
Retrieves the information about tests muting in the specified build.Map<Long,Map<Long,MuteInfo>>
retrieveTestMutesForBuilds(Collection<Long> buildIds)
Retrieves the information about muted tests in the specified builds.void
retrieveTestsCurrentMuteInfos(Set<String> projectIds, Set<String> buildTypeIds, MutingInfoConsumer consumer)
Retrieves information about currently muted tests for the specified projects and build configurations.void
unmuteProblems(long buildId, Set<Integer> problems)
Mutes the build problems in a specified build only.void
unmuteProblems(Set<String> projectIds, Set<String> buildTypeIds, Collection<Integer> problems)
Unmutes the specified build problems in the specified project and specified build configurations.void
unmuteProblemsByMuteInfo(Collection<Integer> muteInfoIds)
Unmutes build problems associated with the given mute infos.void
unmuteTests(Set<String> projectIds, Set<String> buildTypeIds, Collection<Long> testNameIds)
Unmutes the specified tests in the specied project and specified build configurations.void
unmuteTestsByMuteInfo(Collection<Integer> muteInfoIds)
Unmutes tests associated with the given mute infos.
-
-
-
Method Detail
-
muteTestsInProject
@NotNull MuteInfo muteTestsInProject(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull Set<Long> tests)
Mutes specified tests in the project scope. Existing mutes on given tests in the descendent projects and build configurations are removed.- Parameters:
userId
- user who muting the tests.comment
- a user's comment.unmuteWhenFixed
- unmute the test automatically when it is fixed everywhere.unmuteByTime
- unmute the test automatically on a certain date.project
-tests
- ids of tests to mute. @return identifier of the just created mute-info.
-
muteTestsInProject
@NotNull MuteInfo muteTestsInProject(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull UnmutePreference handleExistingMutesPreference, @NotNull Set<Long> tests)
Mutes specified tests in the project scope.- Parameters:
userId
- user who muting the tests.comment
- a user's comment.unmuteWhenFixed
- unmute the test automatically when it is fixed everywhere.unmuteByTime
- unmute the test automatically on a certain date.project
-tests
- ids of tests to mute. @return identifier of the just created mute-info.- Since:
- 2024.07
-
copyMuteInfo
@NotNull MuteInfo copyMuteInfo(@NotNull MuteInfo muteInfo, @NotNull SProject newProject)
Creates a copy of mute info in another project. Does not process parent or sub projects anyhow.- Parameters:
muteInfo
- mute info to copynewProject
- project where a copy of mute info should be created- Returns:
- a copy of mute info
- Since:
- 10.0.3
-
muteProblemsInProject
@NotNull MuteInfo muteProblemsInProject(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull Set<Integer> problems)
Mutes specified build problems in the project scope.- Parameters:
userId
- user who is muting.comment
- user's comment.unmuteWhenFixed
- unmute problem automatically when it is fixed everywhere.unmuteByTime
- unmute problem automatically on a certain date.projectId
- project in which the problem should be muted.projectBuildTypeIds
- all build types of the specified project (for unmuting if needed).problems
- identities of build problems to mute.- Returns:
- identifier of the just created mute-info.
- Since:
- 8.0
-
muteProblemsInProject
@NotNull MuteInfo muteProblemsInProject(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull UnmutePreference handleExistingMutesPreference, @NotNull Set<Integer> problems)
Mutes specified build problems in the project scope.- Parameters:
userId
- user who is muting.comment
- user's comment.unmuteWhenFixed
- unmute problem automatically when it is fixed everywhere.unmuteByTime
- unmute problem automatically on a certain date.projectId
- project in which the problem should be muted.projectBuildTypeIds
- all build types of the specified project (for unmuting if needed).problems
- identities of build problems to mute.- Returns:
- identifier of the just created mute-info.
- Since:
- 2024.07
-
muteTestsInBT
@NotNull MuteInfo muteTestsInBT(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull String projectId, @NotNull Set<String> buildTypes, @NotNull Set<Long> tests, boolean removePreviousMutes)
Mutes the specified tests in the build configuration scope.- Parameters:
userId
- user who muting the tests.comment
- a user's comment.unmuteWhenFixed
- unmute the test automatically when it is fixed everywhere.unmuteByTime
- unmute the test automatically on a certain date.projectId
- project the specified build types are belong.buildTypes
- build types where tests to mute.tests
- tests to mute.removePreviousMutes
- if true then removes mutes data currently associated with specified project, build configurations and tests; otherwise does not try to find and remove this data (useful when we know for sure that project and build types are new, for instance, just copied)- Returns:
- identifier of the just created mute-info.
-
muteProblemsInBT
@NotNull MuteInfo muteProblemsInBT(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull String projectId, @NotNull Set<String> buildTypes, @NotNull Set<Integer> problems)
Mutes the specified build problems in the build configuration scope.- Parameters:
userId
- user who is muting.comment
- user's comment.unmuteWhenFixed
- unmute problem automatically when it is fixed everywhere.unmuteByTime
- unmute problem automatically on a certain date.projectId
- project where the specified build types belong.buildTypes
- build types where to mute.problems
- build problems to mute.- Returns:
- identifier of the just created mute-info.
- Since:
- 8.0
-
muteTestsInBuild
@NotNull MuteInfo muteTestsInBuild(long userId, @Nullable String comment, @NotNull String projectId, long buildId, @NotNull Set<Long> tests)
Mutes the tests in a specified build only. Note: does not process the build status, dependent builds, etc.- Parameters:
userId
- the user who is performing the actioncomment
- the commentprojectId
- the project idbuildId
- the build idtests
- the list of test ids- Returns:
- identifier of the just created mute-info.
-
muteProblemsInBuild
@NotNull MuteInfo muteProblemsInBuild(long userId, @Nullable String comment, @NotNull String projectId, long buildId, @NotNull Set<Integer> problems)
Mutes the build problems in a specified build only. Note: does not process the build status, dependent builds, etc.- Parameters:
userId
- the user who is performing the actioncomment
- the commentprojectId
- the project idbuildId
- the build idproblems
- the list of buidld problems ids- Returns:
- identifier of the just created mute-info.
- Since:
- 8.0
-
muteProblemsInBuild
void muteProblemsInBuild(long buildId, @NotNull Set<Integer> problems)
Mutes the build problems in a specified build only. Note: does not process the build status, dependent builds, etc.- Parameters:
projectId
- the project idbuildId
- the build idproblems
- the list of buidld problems ids- Since:
- 8.0
-
unmuteTests
void unmuteTests(@NotNull Set<String> projectIds, @NotNull Set<String> buildTypeIds, @NotNull Collection<Long> testNameIds)
Unmutes the specified tests in the specied project and specified build configurations.- Parameters:
projectIds
-buildTypeIds
- build configuration ids.testNameIds
- test name identifiers to unmute.
-
unmuteProblems
void unmuteProblems(@NotNull Set<String> projectIds, @NotNull Set<String> buildTypeIds, @NotNull Collection<Integer> problems)
Unmutes the specified build problems in the specified project and specified build configurations.- Parameters:
projectIds
-buildTypeIds
- build configuration ids.problems
- build problem identities to unmute.- Since:
- 8.0
-
unmuteProblems
void unmuteProblems(long buildId, @NotNull Set<Integer> problems)
Mutes the build problems in a specified build only. Note: does not process the build status, dependent builds, etc.- Parameters:
projectId
- the project idbuildId
- the build idproblems
- the list of buidld problems ids- Since:
- 8.0
-
unmuteTestsByMuteInfo
void unmuteTestsByMuteInfo(@NotNull Collection<Integer> muteInfoIds)
Unmutes tests associated with the given mute infos.- Parameters:
muteInfoIds
- identifiers of mute info records.
-
unmuteProblemsByMuteInfo
void unmuteProblemsByMuteInfo(@NotNull Collection<Integer> muteInfoIds)
Unmutes build problems associated with the given mute infos.- Parameters:
muteInfoIds
- identifiers of mute info records.- Since:
- 8.0
-
retrieveTestsCurrentMuteInfos
void retrieveTestsCurrentMuteInfos(@NotNull Set<String> projectIds, @NotNull Set<String> buildTypeIds, @NotNull MutingInfoConsumer consumer)
Retrieves information about currently muted tests for the specified projects and build configurations.For each mute entry it call the consumer's method:
MutingInfoConsumer.consumeTestMutedInProject(java.lang.Long, java.lang.String, jetbrains.buildServer.serverSide.mute.MuteInfo)
if the entry is project-related,MutingInfoConsumer.consumeTestMutedInBuildType(java.lang.Long, java.lang.String, jetbrains.buildServer.serverSide.mute.MuteInfo)
if the entry is build-configuration-related.
- Parameters:
projectIds
-buildTypeIds
- build configurations id (should relate the project id).consumer
- consumer that will consume and process MuteInfo entries.- Since:
- 9.1.5
-
retrieveProblemsCurrentMuteInfos
void retrieveProblemsCurrentMuteInfos(@NotNull Set<String> projectIds, @NotNull Set<String> buildTypeIds, @NotNull MutingInfoConsumer consumer)
Retrieves information about currently muted build problems for the specified projects and build configurations.- Parameters:
projectIds
-buildTypeIds
- build configurations id (should relate the project id).consumer
- consumer that will consume and process MuteInfo entries.- Since:
- 9.1.5
-
retrieveMutesWithTimeOut
void retrieveMutesWithTimeOut(@NotNull MutingInfoConsumer consumer)
Retrieves current mutes that already not actual because of the auto-unmuting time.- Parameters:
consumer
- consumer that will consume and process MuteInfo entries.
-
retrieveTestMutesForBuild
@NotNull Map<Long,MuteInfo> retrieveTestMutesForBuild(long buildId)
Retrieves the information about tests muting in the specified build.- Parameters:
buildId
- build the information is needed for.- Returns:
- map of TestId -> MuteInfo; contains only test runs that are muted.
-
retrieveTestMutesForBuilds
@NotNull Map<Long,Map<Long,MuteInfo>> retrieveTestMutesForBuilds(@NotNull Collection<Long> buildIds)
Retrieves the information about muted tests in the specified builds.- Parameters:
buildId
- build the information is needed for.- Returns:
- map of build id to map of TestId -> MuteInfo; contains only test runs that are muted.
-
retrieveProblemMutesForBuild
@NotNull Map<Integer,MuteInfo> retrieveProblemMutesForBuild(long buildId)
- Since:
- 8.0
-
retrieveProblemMutesForBuild
@NotNull Map<Integer,MuteInfo> retrieveProblemMutesForBuild(@NotNull DBFunctions dbf, long buildId)
- Since:
- 8.0
-
retrieveMutesOfOneTestInBuilds
void retrieveMutesOfOneTestInBuilds(long testNameId, Collection<Long> relatedBuildIds, MutingInBuildInfoConsumer consumer)
Retrieves mutes of runs of one test in given builds.- Parameters:
testNameId
- identifier of test name.relatedBuildIds
- set of related buildsconsumer
- consumer to consume the retrieved info.- Since:
- 2019.2.1
-
makeTestRunMuter
@NotNull TestRunMuter makeTestRunMuter(@NotNull BuildPromotionEx buildPromotion)
Makes a new test run muting service.Warning! - the client should release all references to this service when the build is finished, to avoid memory leaks.
- Parameters:
buildPromotion
- build promotion- Returns:
- the service.
-
makeBuildProblemMuter
@NotNull BuildProblemMuter makeBuildProblemMuter(@NotNull BuildPromotionEx buildPromotion)
Makes a new build problem muting service.Warning! - the client should release all references to this service when the build is finished, to avoid memory leaks.
- Parameters:
buildPromotion
- build promotion- Since:
- 2020.2
-
clearMuteInfoCache
void clearMuteInfoCache()
Resets cache of mute information- Since:
- 2019.1
-
-