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 various 5.11 build errors #3722

Merged
merged 15 commits into from
Aug 24, 2023
Merged

Fix various 5.11 build errors #3722

merged 15 commits into from
Aug 24, 2023

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Aug 21, 2023

StartupExtendedTest assertion error

No parquet procs found in checkCoreAndExtendedWithExtraDependenciesJars and checkExtendedWithExtraDependenciesJars tests.

Added parquet procs in extended.txt.
Added @Extended to LoadParquet and ImportParquet classes.


Generalized html with js error messages

It could depend on the driver version


ExportExtendedSecurityTest errors

Manual cherry-pick of neo4j/apoc#464
CI Error solved: https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/5925227756/job/16064237048#step:5:2069


StartupExtendedTest conflict

Excluded some extra-dependencies/hadoop/build.gradle sub-dependencies which are included in 5.11 lib as well, to prevent conflict exception like here.

CI Error solved: https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/5693341463/job/15432238158


Custom procedure error

Changed globalProceduresRegistry.register(<Callable>, true) (which allowed ) to globalProceduresRegistry.register(<Callable>) and added globalProceduresRegistry.unregister(signature.name());
in order to prevent "Unable to register function/procedure, because the name %s is already in use " error.
This happens because of this neo4j change

CI Error solved:
See https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/5585556876/jobs/10208445586?pr=3605#step:6:199

(actual and formal argument lists differ in length)
/home/runner/work/neo4j-apoc-procedures/neo4j-apoc-procedures/extended/src/main/java/apoc/custom/CypherProceduresHandler.java:371: error: no suitable method found for register(<anonymous BasicUserFunction>,boolean)
            globalProceduresRegistry.register(new CallableUserFunction.BasicUserFunction(signature) {

Added a card to check for a better resolution: https://trello.com/c/88y38wtZ/64-check-for-better-resolution


Custom procedure 2nd error

Removed globalProceduresRegistry.lookupComponentProvider(Transaction.class, true); and transactionComponentFunction.apply(ctx); ,
and added Transaction tx = ctx.transaction(); instead

CI Error solved:
See https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/5622346308/job/15234835763?pr=3666#step:6:203

/home/runner/work/neo4j-apoc-procedures/neo4j-apoc-procedures/extended/src/main/java/apoc/custom/CypherProceduresHandler.java:117: error: cannot find symbol
        transactionComponentFunction = globalProceduresRegistry.lookupComponentProvider(Transaction.class, true);
                                                               ^
  symbol:   method lookupComponentProvider(Class<Transaction>,boolean)

Flaky CI termination without errors

Lightened extended/src/test/resources/long-create.cypher, which flakily interrupt the CI without errors, this could be due to a heap space memory error.

Cherry-pick #3666


Spotless error

The following seems to be a temporary server error which now appears to be resolved.
https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/5944955989/job/16123319880?pr=3722#step:5:59

Could not GET '***/com/google/googlejavaformat/google-java-format/1.15.0/google-java-format-1.15.0.pom'. Received status code 502 from server: Bad Gateway

@vga91 vga91 added do_not_merge cherry-picked This PR has been cherry-picked to the other active branches extended-functionality 5.11 labels Aug 21, 2023
@vga91 vga91 force-pushed the fix-various-5.11-conflict-errors branch 2 times, most recently from 9cff46a to ca66bc6 Compare August 21, 2023 10:44
@vga91 vga91 removed the cherry-picked This PR has been cherry-picked to the other active branches label Aug 21, 2023
@vga91 vga91 force-pushed the fix-various-5.11-conflict-errors branch 4 times, most recently from 0ca8b9f to 4a45136 Compare August 22, 2023 10:50
@vga91 vga91 force-pushed the fix-various-5.11-conflict-errors branch 2 times, most recently from a903bbb to 7b24b7c Compare August 22, 2023 15:19
// if in sys-db there is a Procedure with the same name of the Function, or vice versa,
// we re-register it, because the above unregister method delete every fun and proc with that name.
// we use `registerWithoutOverride` to avoid recursion
readSignatures().filter(i -> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Who guarantees that here there are both the procs/funcs?
I mean you're removing at line 374 the proc/func with signature custom.map_data, who guarantees that the same procedure is not returned by readSignatures

Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to exclude the signatureName from the records returned by readSignatures

@vga91 vga91 force-pushed the fix-various-5.11-conflict-errors branch from 4579312 to 7830bfe Compare August 23, 2023 15:39
@conker84 conker84 merged commit e8d90e8 into 5.11 Aug 24, 2023
@conker84 conker84 deleted the fix-various-5.11-conflict-errors branch August 24, 2023 07:24
vga91 added a commit that referenced this pull request Aug 24, 2023
* Fix various 5.11 build errors

* small comment changes

* excluded some hadoop deps to avoid conflict with neo4j 5.11 lib deps

* Fix failing path traversal CI tests

* Add explicit mockito test dependency

* Generalized html with js error - it depends on the driver version

* added parquet procs to extended.txt

* wip - include only StartupExtendedTest

* restored build.gradle

* Added Extended annotation

* Added Extended annotation

* Added Extended annotation

* Updated com.diffplug.spotless version

* restore spotless

* Fix custom proc with homonyms
vga91 added a commit that referenced this pull request Aug 24, 2023
* Fix various 5.11 build errors

* small comment changes

* excluded some hadoop deps to avoid conflict with neo4j 5.11 lib deps

* Fix failing path traversal CI tests

* Add explicit mockito test dependency

* Generalized html with js error - it depends on the driver version

* added parquet procs to extended.txt

* wip - include only StartupExtendedTest

* restored build.gradle

* Added Extended annotation

* Added Extended annotation

* Added Extended annotation

* Updated com.diffplug.spotless version

* restore spotless

* Fix custom proc with homonyms
vga91 added a commit that referenced this pull request Aug 24, 2023
* Solve no suitable method found for register

* Re-register homonym fun/proc

* lightened tests

* lightened tests

* try include only Startup

* ignore provisionally startup with extra-deps tests

* restore ExtendedTestContainerUtil

* small comment changes

* excluded some hadoop deps to avoid conflict with neo4j 5.11 lib deps

* Fix various 5.11 build errors (#3722)

* Fix various 5.11 build errors

* small comment changes

* excluded some hadoop deps to avoid conflict with neo4j 5.11 lib deps

* Fix failing path traversal CI tests

* Add explicit mockito test dependency

* Generalized html with js error - it depends on the driver version

* added parquet procs to extended.txt

* wip - include only StartupExtendedTest

* restored build.gradle

* Added Extended annotation

* Added Extended annotation

* Added Extended annotation

* Updated com.diffplug.spotless version

* restore spotless

* Fix custom proc with homonyms

* Removed unused imports

* Fix CypherEnterpriseExtendedTest similarly to 5.11 one
vga91 added a commit that referenced this pull request Aug 30, 2023
vga91 added a commit that referenced this pull request Aug 31, 2023
recrwplay pushed a commit to recrwplay/neo4j-apoc-procedures that referenced this pull request Aug 31, 2023
* Solve no suitable method found for register

* Re-register homonym fun/proc

* lightened tests

* lightened tests

* try include only Startup

* ignore provisionally startup with extra-deps tests

* restore ExtendedTestContainerUtil

* small comment changes

* excluded some hadoop deps to avoid conflict with neo4j 5.11 lib deps

* Fix various 5.11 build errors (neo4j-contrib#3722)

* Fix various 5.11 build errors

* small comment changes

* excluded some hadoop deps to avoid conflict with neo4j 5.11 lib deps

* Fix failing path traversal CI tests

* Add explicit mockito test dependency

* Generalized html with js error - it depends on the driver version

* added parquet procs to extended.txt

* wip - include only StartupExtendedTest

* restored build.gradle

* Added Extended annotation

* Added Extended annotation

* Added Extended annotation

* Updated com.diffplug.spotless version

* restore spotless

* Fix custom proc with homonyms

* Removed unused imports

* Fix CypherEnterpriseExtendedTest similarly to 5.11 one
vga91 added a commit that referenced this pull request Oct 23, 2023
vga91 added a commit that referenced this pull request Dec 22, 2023
vga91 added a commit that referenced this pull request Nov 22, 2024
vga91 added a commit that referenced this pull request Jan 21, 2025
vga91 added a commit that referenced this pull request Jan 21, 2025
vga91 added a commit that referenced this pull request Jan 21, 2025
* [BqvAC2FK] Update selenium dependencies (#3663)

* [BqvAC2FK] Update selenium dependencies

* [BqvAC2FK] solve deps conflicts

* [BqvAC2FK] removed ext. dep

* [BqvAC2FK] add testImplementation dep.

* [BqvAC2FK] Fix failing LoadHtmlTest (#3722)

* [BqvAC2FK] Updated again deps and excluded sub dependencies

* [BqvAC2FK] spotlessApply changes
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