Skip to content

Commit

Permalink
feat(kubernetes): Skip loading events for manifest retrieval in WaitF… (
Browse files Browse the repository at this point in the history
#2997)

* feat(kubernetes): Skip loading events for manifest retrieval in WaitForManifestStableTask

* Account for changes from spinnaker/clouddriver#3796
  • Loading branch information
mtweten authored and ezimanyi committed Jun 20, 2019
1 parent 2f0e25f commit 39c4dbe
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ public Response getCluster(String app, String account, String cluster, String cl
}

@Override
public Manifest getManifest(String account, String name) {
return getService().getManifest(account, name);
public Manifest getManifest(String account, String name, boolean includeEvents) {
return getService().getManifest(account, name, includeEvents);
}

@Override
public Manifest getManifest(String account, String location, String name) {
public Manifest getManifest(String account, String location, String name, boolean includeEvents) {
return StringUtils.isEmpty(location)
? getService().getManifest(account, name)
: getService().getManifest(account, location, name);
? getService().getManifest(account, name, includeEvents)
: getService().getManifest(account, location, name, includeEvents);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ interface OortService {

@GET("/manifests/{account}/_/{manifest}")
Manifest getManifest(@Path("account") String account,
@Path("manifest") String manifest)
@Path("manifest") String manifest,
@Query("includeEvents") boolean includeEvents)

@GET("/manifests/{account}/{location}/{manifest}")
Manifest getManifest(@Path("account") String account,
@Path("location") String location,
@Path("manifest") String manifest)
@Path("manifest") String manifest,
@Query("includeEvents") boolean includeEvents)

@GET("/manifests/{account}/{location}/{kind}/cluster/{app}/{clusterName}/dynamic/{criteria}")
Manifest getDynamicManifest(@Path("account") String account,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public TaskResult execute(@Nonnull Stage stage) {

Manifest manifest =
retrySupport.retry(
() -> oortService.getManifest(account, stageData.location, stageData.manifestName),
() ->
oortService.getManifest(account, stageData.location, stageData.manifestName, false),
5,
1000,
true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public TaskResult execute(@Nonnull Stage stage) {
String identifier = readableIdentifier(account, location, name);
Manifest manifest;
try {
manifest = oortService.getManifest(account, location, name);
manifest = oortService.getManifest(account, location, name, false);
} catch (RetrofitError e) {
log.warn("Unable to read manifest {}", identifier, e);
return TaskResult.builder(ExecutionStatus.RUNNING)
Expand Down

0 comments on commit 39c4dbe

Please sign in to comment.