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

XWIKI-22791: Costly and unconditional tag cloud computation done for all live table requests using the default source #3875

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

douakli
Copy link
Contributor

@douakli douakli commented Feb 4, 2025

Jira URL

https://jira.xwiki.org/browse/XWIKI-22791

Changes

Description

This PR makes the LiveTableResultsMacros page behave as it did before (build the tagcloud anyway) when the tagcloud query parameter is absent.

Executed Tests

mvn clean install -Pquality,integration-tests,docker ran on modules:

  • xwiki-platform-web
  • xwiki-platform-flamingo-skin-resources
  • xwiki-platform-livetable

I haven't been able to run any docker test due to the following error:

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.249 s <<< FAILURE! -- in org.xwiki.appwithinminutes.test.ui.AllIT
[ERROR] org.xwiki.appwithinminutes.test.ui.AllIT -- Time elapsed: 8.249 s <<< ERROR!
java.lang.RuntimeException: Error setting up the XWiki testing environment
        at org.xwiki.test.docker.internal.junit5.XWikiDockerExtension.raiseException(XWikiDockerExtension.java:500)
        at org.xwiki.test.docker.internal.junit5.XWikiDockerExtension.beforeAll(XWikiDockerExtension.java:106)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at org.xwiki.platform:xwiki-platform-appwithinminutes-test-docker:jar:17.1.0-SNAPSHOT -> org.xwiki.platform:xwiki-platform-appwithinminutes-ui:xar:17.1.0-SNAPSHOT -> org.xwiki.platform:xwiki-platform-livetable-ui:xar:17.1.0-SNAPSHOT -> org.xwiki.platform:xwiki-platform-wiki-script:jar:17.1.0-SNAPSHOT -> org.xwiki.platform:xwiki-platform-wiki-default:jar:17.1.0-SNAPSHOT -> org.xwiki.platform:xwiki-platform-oldcore:jar:17.1.0-SNAPSHOT -> io.sf.carte:css4j:jar:5.1 -> io.sf.jclf:jclf-text:jar:[5.0.2,)
        at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:291)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:284)
        at org.xwiki.test.integration.maven.ArtifactResolver.getArtifactDependencies(ArtifactResolver.java:152)
        at org.xwiki.test.integration.maven.MavenResolver.getDependencies(MavenResolver.java:279)
        at org.xwiki.test.integration.maven.MavenResolver.resolveVersions(MavenResolver.java:321)
        at org.xwiki.test.integration.maven.MavenResolver.convertToArtifacts(MavenResolver.java:235)
        at org.xwiki.test.docker.internal.junit5.WARBuilder.build(WARBuilder.java:140)
        at org.xwiki.test.docker.internal.junit5.XWikiDockerExtension.beforeAllInternal(XWikiDockerExtension.java:154)
        at org.xwiki.test.docker.internal.junit5.XWikiDockerExtension.beforeAll(XWikiDockerExtension.java:104)
        ... 1 more
Caused by: org.eclipse.aether.resolution.VersionRangeResolutionException: No versions available for io.sf.jclf:jclf-text:jar:[5.0.2,) within specified range

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • stable-16.10.x
    • stable-16.4.x

…all live table requests using the default source
@michitux
Copy link
Contributor

michitux commented Feb 4, 2025

@douakli If you couldn't execute any automatic test, have you at least manually confirmed that LiveTable still works with these changes and that it still has the intended effect?

@douakli
Copy link
Contributor Author

douakli commented Feb 4, 2025

@douakli If you couldn't execute any automatic test, have you at least manually confirmed that LiveTable still works with these changes and that it still has the intended effect?

Livetable still works with the example from the documentation.
I also performed a GET to the following URLs:

/xwiki/bin/get/XWiki/LiveTableResults?outputSyntax=plain&transprefix=xe.userdirectory.&classname=XWiki.XWikiUsers&collist=_avatar%2Cfirst_name%2Clast_name%2Cemail%2Cdoc.creationDate&queryFilters=currentlanguage%2Chidden&offset=1&limit=10&reqNo=1&sort=first_name&dir=asc

http://localhost:8081/xwiki/bin/get/XWiki/LiveTableResults?outputSyntax=plain&transprefix=xe.userdirectory.&classname=XWiki.XWikiUsers&collist=_avatar%2Cfirst_name%2Clast_name%2Cemail%2Cdoc.creationDate&queryFilters=currentlanguage%2Chidden&tagcloud=false&offset=1&limit=10&reqNo=1&sort=first_name&dir=asc

http://localhost:8081/xwiki/bin/get/XWiki/LiveTableResults?outputSyntax=plain&transprefix=xe.userdirectory.&classname=XWiki.XWikiUsers&collist=_avatar%2Cfirst_name%2Clast_name%2Cemail%2Cdoc.creationDate&queryFilters=currentlanguage%2Chidden&tagcloud=true&offset=1&limit=10&reqNo=1&sort=first_name&dir=asc

I now realize I did not check what happens when the tagcloud option is absent in the livetable macro itself.
I will check this and report back.
Thanks.

@michitux
Copy link
Contributor

michitux commented Feb 4, 2025

So what I'm asking for is a basic (manual) test to confirm that:

  1. Tag cloud enabled still works (in the actual UI, not with a manually constructed URL).
  2. Tag cloud disabled doesn't trigger the tag cloud computation. This should also be confirmed with Live Data as I'm pretty sure that Live Data manually constructs this LiveTable request (internally, see ) and thus won't add the tagcloud parameter, so in the end with this change you might not achieve the intended effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants