Skip to content

[#5146] fix(core): Support to rename and delete metadata object in the authorization plugin #8155

[#5146] fix(core): Support to rename and delete metadata object in the authorization plugin

[#5146] fix(core): Support to rename and delete metadata object in the authorization plugin #8155

Triggered via pull request October 28, 2024 11:30
Status Failure
Total duration 2m 27s
Artifacts

python-integration-test.yml

on: pull_request
changes
4s
changes
Matrix: PythonIT
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 3 warnings
PythonIT (linux/amd64, 17): task ':core:spotlessJavaCheck'#L1
Execution failed for task ':core:spotlessJavaCheck': The following files had format violations: src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java @@ -18,7 +18,6 @@ ·*/ package·org.apache.gravitino.authorization; -import·com.google.common.collect.Lists; import·com.google.common.collect.Sets; import·java.util.Collection; import·java.util.List; @@ -273,31 +272,40 @@ ····} ··} -··public·static·void·removeAuthorizationPluginPrivileges(NameIdentifier·ident,·Entity.EntityType·type)·{ +··public·static·void·removeAuthorizationPluginPrivileges( +······NameIdentifier·ident,·Entity.EntityType·type)·{ ····//·If·we·enable·authorization,·we·should·remove·the·privileges·about·the·entity·in·the ····//·authorization·plugin. ····if·(GravitinoEnv.getInstance().accessControlDispatcher()·!=·null)·{ ······MetadataObject·metadataObject·=·NameIdentifierUtil.toMetadataObject(ident,·type); ······MetadataObjectChange·removeObject·=·MetadataObjectChange.remove(metadataObject); -······callAuthorizationPluginForMetadataObject(ident.namespace().level(0),·metadataObject,·authorizationPlugin·->·{ -········authorizationPlugin.onMetadataUpdated(removeObject); -······}); +······callAuthorizationPluginForMetadataObject( +··········ident.namespace().level(0), +··········metadataObject, +··········authorizationPlugin·->·{ +············authorizationPlugin.onMetadataUpdated(removeObject); +··········}); ····} ··} -··public·static·void·renameAuthorizationPluginPrivileges(NameIdentifier·ident,·Entity.EntityType·type,·String·newName)·{ +··public·static·void·renameAuthorizationPluginPrivileges( +······NameIdentifier·ident,·Entity.EntityType·type,·String·newName)·{ ····//·If·we·enable·authorization,·we·should·rename·the·privileges·about·the·entity·in·the ····//·authorization·plugin. ····if·(GravitinoEnv.getInstance().accessControlDispatcher()·!=·null)·{ ······MetadataObject·oldMetadataObject·=·NameIdentifierUtil.toMetadataObject(ident,·type); -······MetadataObject·newMetadataObject·=·NameIdentifierUtil.toMetadataObject(NameIdentifier.of(ident.namespace(),·newName),·type); -······MetadataObjectChange·renameObject·=·MetadataObjectChange.rename(oldMetadataObject,·newMetadataObject); -······callAuthorizationPluginForMetadataObject(ident.namespace().level(0),·oldMetadataObject,·authorizationPlugin·->·{ -········authorizationPlugin.onMetadataUpdated(renameObject); -······}); +······MetadataObject·newMetadataObject·= +··········NameIdentifierUtil.toMetadataObject(NameIdentifier.of(ident.namespace(),·newName),·type); +······MetadataObjectChange·renameObject·= +··········MetadataObjectChange.rename(oldMetadataObject,·newMetadataObject); +······callAuthorizationPluginForMetadataObject( ... (12 more lines that didn't fit) Violations also present in 12 other files. Run './gradlew :core:spotlessApply' to fix these violations. at com.diffplug.gradle.spotless.SpotlessCheck.performAction(SpotlessCheck.java:111) at com.diffplug.gradle.spotless.SpotlessCheck.performAction(SpotlessCheck.java:53) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29) at org.gradle.
PythonIT (linux/amd64, 17)
Process completed with exit code 1.
changes
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, dorny/paths-filter@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
PythonIT (linux/amd64, 17)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, docker/setup-qemu-action@v2, actions/upload-artifact@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
PythonIT (linux/amd64, 17)
No files were found with the provided path: build/reports integration-test/build/integration-test.log distribution/package/logs/gravitino-server.out distribution/package/logs/gravitino-server.log catalogs/**/*.log catalogs/**/*.tar. No artifacts will be uploaded.