Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(managed-delivery): Fix application summary API #1091

Merged
merged 2 commits into from Mar 10, 2020

Conversation

luispollo
Copy link
Contributor

Fixes the /managed/application API per changes introduced in spinnaker/keel#848

@luispollo luispollo self-assigned this Mar 10, 2020
@erikmunson
Copy link
Member

Is this change backwards compatible? Ideally deploying this to gate shouldn’t depend on a specific keel software version.

@luispollo
Copy link
Contributor Author

Is this change backwards compatible? Ideally deploying this to gate shouldn’t depend on a specific keel software version.

No, it's not... 😞

@luispollo
Copy link
Contributor Author

Is this change backwards compatible? Ideally deploying this to gate shouldn’t depend on a specific keel software version.

No, it's not... 😞

Now it is.

@@ -86,7 +86,9 @@ Response updateConstraintStatus(

@GET("/application/{application}")
Map getApplicationDetails(
@Path("application") String application, @Query("includeDetails") Boolean includeDetails);
@Path("application") String application,
@Query("includeDetails") Boolean includeDetails,
Copy link
Member

Choose a reason for hiding this comment

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

What would happen if the new keel version (I.e. the one that no longer accepts this parameter) got sent includeDetails=false on the request?

Copy link
Member

Choose a reason for hiding this comment

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

Or actually, I guess the same question applies for a value of true - that’s what deck will be sending up until we change it.

Copy link
Contributor Author

@luispollo luispollo Mar 10, 2020

Choose a reason for hiding this comment

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

Keel just ignores it. In other words, it no longer has any effect -- you'll have to change the UI to pass ?entities=resources in places where you previously had just ?includeDetails=true when keel changes. Until then, this would ensure the UI continues to work as before.

return keelService.getApplicationDetails(application, includeDetails);
@RequestParam(name = "includeDetails", required = false, defaultValue = "false")
Boolean includeDetails,
@RequestParam(name = "entities", required = false, defaultValue = "") List<String> entities) {
Copy link
Member

Choose a reason for hiding this comment

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

can we make the default value resources here? as of right now if we ship this and then the new keel version, I think deck is going to stop getting back resource summaries. Just checked the new keel we've got up and running internally and if i hit it without an entities list I get no summaries at all.

Copy link
Contributor Author

@luispollo luispollo Mar 10, 2020

Choose a reason for hiding this comment

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

Done.

Copy link
Member

@erikmunson erikmunson left a comment

Choose a reason for hiding this comment

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

🌈 thanks for doing this!

@luispollo luispollo merged commit 60a2225 into spinnaker:master Mar 10, 2020
@luispollo luispollo deleted the fix-managed-application-api branch March 10, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants