Apps Manager

 UI fails to load with Spring 2/Actuator Full Git Info

Brendan H's profile image
Brendan H posted Oct 09, 2018 09:32 PM

This appears to be as of Spring 2, but exposing git properties as described here (https://docs.spring.io/spring-boot/docs/current/reference/html/howto-build.html#howto-git-info) with `management.info.git.mode=full` breaks the Apps Manager UI when attempting to view the Settings page of an application.

 

The UI appears to work when the mode is simple because it expects the commit sha to be located in the json response from `/actuator/info` at `git.commit.id`. This is correct in Spring 1 and in Spring 2 with `git.mode=simple`, but `git.mode=full` returns `id` as an object in Spring 2 and the UI throws a React error and fails to load any page content.

 

Example with Spring 2

```

{

"git": {

"commit": {

"id": {

"describe": "v0.2.1+53-c33aa86",

"abbrev": "c33aa86",

"full": "c33aa86af52f228ec0f5b97ae54445a4b1b5df6a"

}

}

}

```

Brendan H's profile image
Brendan H

Apps Manager version: 2.1.12

Browser: Chrome 69.0.3497.100 (Official Build) (64-bit), Firefox 61.0.2 (64-bit)

Our onsite staff wasn't able to identify any fixes in future versions that applied.

Daniel Lynch's profile image
Broadcom Employee Daniel Lynch

what version of spring boot are they using and what browser? 

 

I created a simple spring boot app and enabled pretty much all of its features. Then deployed it in PAS 2.2.4. What i observed in firefox is i get none of the spring actuator features to display and there are no errors. But opening apps manager via safari i do see all the features and they are displaying without any errors. I also attempted to simulate the null field issue but it all seems to work ok there in safari. That is why i am curios what browser and version is being used that causes the react errors so we can isolate this further.

 

here is the sample app using spring boot 2.0.5

https://github.com/randomtask1155/spring-boot-actuator-sample

 

mvn package && cf push -p target/spring-boot-actuator-0.0.1-SNAPSHOT.jar

 

Brendan H's profile image
Brendan H

Spring Boot 2.0.3-RELEASE

We're using Gradle with gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.5.2

 

This gives us a git.properties like this.

#Tue Oct 09 15:19:15 EDT 2018 git.branch=branch-name git.build.host=HOSTNAME git.build.time=2018-10-09T15\:19\:15-0400 git.build.user.email=my_email@domain.com git.build.user.name=myUserId git.build.version=DEV-SNAPSHOT git.closest.tag.commit.count=1 git.closest.tag.name=v0.0.0+60 git.commit.id=0ded6fa8377a9e29c7d7ebe982205291c89aecb9 git.commit.id.abbrev=0ded6fa git.commit.id.describe=v0.0.0+60-1-g0ded6fa-dirty git.commit.message.full=description git.commit.message.short=description git.commit.time=2018-10-09T10\:07\:15-0400 git.commit.user.email=my_email@domain.com git.commit.user.name=myUserId git.dirty=true git.remote.origin.url=https\://github.domain.com/organization/repo git.tags= git.total.commit.count=286

 

Chrome 69.0.3497.100 (Official Build) (64-bit)

Firefox 61.0.2 (64-bit)

Just tried Safari Version 12.0 (13606.2.11) and got the same result.

 

I have the Actuator icon (Green Hexagon with a Power Icon) on all browsers.

And immediate and obvious indicator I get is that the top right of all pages for that Application show "Git: [object Object]" above the Buildpack link.

Here's an image of that: https://i.imgur.com/o5ZCkC8.png

Brendan H's profile image
Brendan H

and `/actuator/info` returns the following schema for the git info.

 

{ git: { build: { host: "", version: "", time: "", user: { name: "", email: "" } }, branch: "", commit: { message: { short: "", full: "" }, id: { describe: "", abbrev: "", full: "" }, time: "", user: { email: "", name: "" } }, closest: { tag: { name: "", commit: { count: "" } } }, dirty: "", remote: { origin: { url: "" } }, tags: "", total: { commit: { count: "" } } } }

 

Daniel Lynch's profile image
Broadcom Employee Daniel Lynch

In early 2.1 we added support for spring boot 2.0 in appsmanager. There were a few bugs throughout that release which have been fixed in the latest 2.1.

 

* There is a known issue where the health endpoint will cause the apps manager page to crash when viewing the app details. This has to do with the response containing an object instead of a string. This is fixed in the latest and is not fixed in 2.1.12.

 

 

for the github issue we could not find a specific commit that addresses that issue. Would you be willing to upgrade to the latest 2.1 pas tile release to pick up the health endpoint fix and see if that also resolves the git issue?

Brendan H's profile image
Brendan H

Thanks for the answer, I've observed the /health endpoint issue as well, but I assumed it was related to null values as it was loading objects fine for me.

 

I don't have access to update Apps Manager, but I'll reach back out to the team that maintains that and see what we can get done. They had recommended that I open up a query here first to identify whether a fix was present in some future version.

v2.1.15 looks to be the latest in this major version as far as I can tell, so I'll take that information back to them.

Daniel Lynch's profile image
Broadcom Employee Daniel Lynch

Hi Brendan,

Can you get the apps man version you have running? We think the git issue should be fixed in 2.1.11. To get the version of apps manager you can simply go to this endpoint.

 

https://apps.system.domain/currentSha

Brendan H's profile image
Brendan H

@Dan Lynch​ 

We have multiple versions of Apps Manager running apparently across our main instances. I've confirmed that the git information does not display correctly on any of these. My understanding is that we are on 2.1.12 as per a discussion with someone that manages our Cloudfoundry setup, though that might not be entirely accurate if we're on multiple shas.

 

219e33d3ba2edcd3ef6151a82b2b8b94b53fb4eb

b2a43e76528c138f8e35a412a7020c7ec1ea7fdd