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

[PAYARA-4150] - Micro Container Updates #27

Merged
merged 9 commits into from
Oct 15, 2019

Conversation

cubastanley
Copy link
Contributor

A recent update to the package naming within Payara Server caused a full break to the micro-managed container caused by the directory of the file with micro boot properties not being the same anymore. This PR updates the container to use the glassfish domain properties which have a consistent directory for the time being.

Tested against Payara 5.193 and 5.194-SNAPSHOT on EE7 and EE8 samples

Properties microProperties = new Properties();
microProperties.load(microJarFile.getInputStream(pomProperties));
this.microVersion = new PayaraVersion(microProperties.getProperty("version"));
this.microVersion = new PayaraVersion(microProperties.getProperty("major_version") + microProperties.getProperty("minor_version"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't there be a dot between major and minor?

ZipEntry pomProperties = microJarFile
.getEntry("META-INF/maven/fish.payara.micro/payara-micro-boot/pom.properties");

zipEntryDir = "MICRO-INF/domain/branding/glassfish-version.properties";
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a file, not a directory, so also the exception below is bit misleading

Properties microProperties = new Properties();
microProperties.load(microJarFile.getInputStream(pomProperties));
this.microVersion = new PayaraVersion(microProperties.getProperty("version"));
this.microVersion = new PayaraVersion(microProperties.getProperty("major_version") + "." + microProperties.getProperty("minor_version"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing update_version, payara_version and payara_update_version as in the case of Payara 4.1.2.191.4 following properties are listed too in glassfish-version.properties.

major_version=4
minor_version=1
update_version=2
payara_version=191
payara_update_version=4

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean payara 4 micro? 😉 I don't think we'll return to this versioning scheme, so major and minor are enough

Copy link
Contributor

Choose a reason for hiding this comment

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

Payara 4 is an example in the above comment, https://github.com/payara/Payara/blob/master/appserver/packager/appserver-base/src/main/resources/config/branding/glassfish-version.properties includes all of the above properties

Another example:

major_version=5
minor_version=191
update_version=5

Copy link
Contributor

Choose a reason for hiding this comment

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

So it looks like PayaraVersion needs a factory method fromBrandingProperties then, because this is getting complicated.

Copy link
Contributor Author

@cubastanley cubastanley Oct 11, 2019

Choose a reason for hiding this comment

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

I think I want to mark this as a void point, I'm open to discussion on it but as far as I'm aware Payara 4 versions aren't affected by the package changes in core server and so wouldn't (arguably shouldn't) use the newest container release; they could stick on 1.1/1.2

Update: re-read this and understand the issue is present in Payara 5 versions as well, I'll look into a viable solution

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made an implementation to accommodate this - all input is very welcome

ZipEntry pomProperties = microJarFile
.getEntry("META-INF/maven/fish.payara.micro/payara-micro-boot/pom.properties");

zipEntryFileDir = "MICRO-INF/domain/branding/glassfish-version.properties";
Copy link
Contributor

Choose a reason for hiding this comment

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

Constant can be declared for the path.

@cubastanley cubastanley merged commit cc428ed into payara:master Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants