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

Upgrade licensor parent version to 14.10 #163 #167

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

oanalavinia
Copy link
Contributor

@oanalavinia oanalavinia commented Apr 4, 2024

Note that this needs to be tested on a staging server before the final release (so a RC release will be used), since it touches licenses manager code. I could mainly test Licensor code

* update parent version
* export from 14.10 and remove deprecated property defaultCategory
* update jaxb plugin configuration, which was duplicated from the parent version
* add a dependency needed by jaxb
* skip banned dependency type enforcer
* update functional tests as well to use 14.10
* WIP: start working on fixing functional tests, which seem to be failing due to some certificate generation problem, which led me to XWIKI-19676; only unit tests are passing now
* test vnc recording also not working, set to false for now
* performed other 14.10 minor changes
@oanalavinia oanalavinia marked this pull request as ready for review December 5, 2024 10:06
* banneddependencytype-xar enforcer skip needed since licensor-api depends on licensor-ui
@oanalavinia
Copy link
Contributor Author

This is not needed for this PR, but I'm adding a comment in case it's needed for future references:
WIP:
Functional tests are currently failing. There is some work done, but it's not complete and might need further investigation.

-> the functional tests were failing around here, since the UI showed no license available. The actual problem was that the licenses livetable wasn't refreshed (the instance created by docker didn't had the local version of licensor-ui, which contained a bug). When I tested manually on the created instance, I falsely assumed that it's not working to add licenses. This problem was reproducing because I needed to execute UseCertificates (will add the locally created certificates public keys in the static lists from here, which is used for checking validity)

@oanalavinia oanalavinia linked an issue Dec 5, 2024 that may be closed by this pull request
Copy link
Contributor

@trrenty trrenty left a comment

Choose a reason for hiding this comment

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

Looks good. Left some comments.

@@ -38,6 +38,8 @@
<xwiki.extension.namespaces>{root}</xwiki.extension.namespaces>
<checkstyle.suppressions.location>${basedir}/src/main/checkstyle/checkstyle-suppressions.xml</checkstyle.suppressions.location>
<xwiki.jacoco.instructionRatio>0.50</xwiki.jacoco.instructionRatio>
<!-- Added for the licensor-ui dependency, since a JAR extension shouldn't depend on a XAR one. -->
<xwiki.enforcer.banneddependencytype-xar.skip>true</xwiki.enforcer.banneddependencytype-xar.skip>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does it depend on the UI module?

Copy link
Contributor Author

@oanalavinia oanalavinia Dec 6, 2024

Choose a reason for hiding this comment

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

From what I understand, this is how the licensor was designed, so each pro app has the api module as dependency, which has the ui. This, as we know, makes the pro (licensed) apps to be identified by the api dependency and I guess that they didn't used the ui module instead since you might want to depend on it for other usecases (displaying something, I don't know). Or simply it wasn't a best practice at that moment to not have apis depending on xar and the current solution felt more natural.
Anyway, I don't think it's an easy fix to avoid it now, maybe only adding also the ui dependency besides the api one, but I'm not very fond of this. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

So, If i understand correctly, the pro apps have a dependency to the licensor-api which marks them as an app that requires a license. The licensor-api has a dependency to the ui module in order to bring all the xwiki pages when installing the the mentioned pro app.

In order to get rid of this dependency to the ui module, we would need to update the code that checks whether an app depends on the licensor-api and update all the pro apps to depend on the licensor-ui?

If so, it does sound like plenty of work that might cause some complications. But it might also be fairly simple to do. (unless im missing some implications).

I'm not a fan of also adding the ui dependency. Doing that or skipping the enforcer is kind of the same thing - a hack that needs a comment as an explanation.

I think its ok to leave this as is, for now. But it would be useful to have an issue for this.

* moved internal macro to a category that will make it hidden in macro search
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.

Upgrade licensor parent version to 14.10
2 participants