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

Fixes #4355: The apoc.metrics.get throws an URLAccessChecker error #4357

Merged
merged 3 commits into from
Feb 17, 2025

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Feb 17, 2025

Fixes #4355

The problem is due to the Mode of the procedure.
With DBMS, the URLAccessChecker.checkURL(url) blocks the execution and throws the LOAD ... is not allowed for user ... error, because reading CSVs requires the procedure to be READ (which is the default mode).
Consistently with apoc.load.csv and the other load procedures

Changes

  • Fixed the bug removing the Procedure.Mode annotation from the 3 procedures
  • De-ignored the shouldGetMetrics test
  • The neo4j.system.check_point.total_time doesn't work, as has been replaced by neo4j.database.system.check_point.total_time setting
    • Therefore changed the shouldGetMetrics test to check all possible metrics retrieved via the apoc.metrics.list procedure
  • added a println in the shouldGetMetrics catch block to facilitate debug in case of CI error
  • Changed getStreamConnection to readerFor, consistently with the apoc.load.csv procedure (see here)
    not possible, since in this way it prepends /var/lib/neo4j/import to path, see here

@vga91 vga91 added to-cherry-pick issues related to commits to cherry-pick extended-functionality 2025.01 labels Feb 17, 2025
@vga91 vga91 marked this pull request as draft February 17, 2025 12:57
@vga91 vga91 marked this pull request as ready for review February 17, 2025 14:11
@vga91 vga91 changed the title Fixes #4355: The throws an URLAccessChecker error Fixes #4355: The apoc.metrics.get throws an URLAccessChecker error Feb 17, 2025
@RobertoSannino RobertoSannino merged commit db53703 into 2025.01 Feb 17, 2025
5 checks passed
@RobertoSannino RobertoSannino deleted the issue-4355 branch February 17, 2025 15:46
vga91 added a commit that referenced this pull request Feb 18, 2025
…4357)

* Fixes #4355: The  throws an URLAccessChecker error

* refactoring and improved test

* restored reader creation
vga91 added a commit that referenced this pull request Feb 24, 2025
…4357)

* Fixes #4355: The  throws an URLAccessChecker error

* refactoring and improved test

* restored reader creation
vga91 added a commit that referenced this pull request Feb 25, 2025
…4357) (#4360)

* Fixes #4355: The  throws an URLAccessChecker error

* refactoring and improved test

* restored reader creation
vga91 added a commit that referenced this pull request Feb 28, 2025
…4357)

* Fixes #4355: The  throws an URLAccessChecker error

* refactoring and improved test

* restored reader creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2025.01 extended-functionality to-cherry-pick issues related to commits to cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants