Skip to content

[#2869] feat(core): Add the core logic of authorization #1062

[#2869] feat(core): Add the core logic of authorization

[#2869] feat(core): Add the core logic of authorization #1062

Triggered via pull request June 26, 2024 11:42
Status Failure
Total duration 1m 56s
Artifacts

flink-integration-test.yml

on: pull_request
changes
4s
changes
Matrix: test-amd64-arch
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 2 warnings
test-amd64-arch (linux/amd64, 11): task ':core:spotlessJavaCheck'#L1
Execution failed for task ':core:spotlessJavaCheck': The following files had format violations: src/test/java/com/datastrato/gravitino/authorization/TestAuthorizationUtils.java @@ -789,8 +789,20 @@ ····AccessControlManager·manager·=·Mockito.mock(AccessControlManager.class); ····FieldUtils.writeField(GravitinoEnv.getInstance(),·"accessControlManager",·manager,·true); ····SecurableObject·metalake·= -············SecurableObjects.ofMetalake( -····················"metalake",·Lists.newArrayList(Privileges.AddUser.allow(),·Privileges.RemoveUser.allow(),·Privileges.GetUser.allow(),·Privileges.AddGroup.allow(),·Privileges.RemoveGroup.allow(),·Privileges.GetGroup.allow(),·Privileges.GrantRole.allow(),·Privileges.RevokeRole.allow(),·Privileges.CreateRole.allow(),·Privileges.DeleteRole.allow(),·Privileges.GetRole.allow())); +········SecurableObjects.ofMetalake( +············"metalake", +············Lists.newArrayList( +················Privileges.AddUser.allow(), +················Privileges.RemoveUser.allow(), +················Privileges.GetUser.allow(), +················Privileges.AddGroup.allow(), +················Privileges.RemoveGroup.allow(), +················Privileges.GetGroup.allow(), +················Privileges.GrantRole.allow(), +················Privileges.RevokeRole.allow(), +················Privileges.CreateRole.allow(), +················Privileges.DeleteRole.allow(), +················Privileges.GetRole.allow())); ····RoleEntity·roleEntity·=·Mockito.mock(RoleEntity.class); ····Mockito.when(roleEntity.namespace()).thenReturn(Namespace.of("metalake")); ····Mockito.when(roleEntity.securableObjects()).thenReturn(Lists.newArrayList(metalake)); @@ -798,143 +810,155 @@ ····//·Allow·to·operate·user ····Assertions.assertTrue( -············AuthorizationUtils.satisfyPrivileges( -····················"metalake", -····················SecurableObjects.ofMetalake( -····························"metalake",·Lists.newArrayList(Privileges.AddUser.allow())))); +········AuthorizationUtils.satisfyPrivileges( +············"metalake", +············SecurableObjects.ofMetalake( +················"metalake",·Lists.newArrayList(Privileges.AddUser.allow())))); ····Assertions.assertTrue( -············AuthorizationUtils.satisfyPrivileges( -····················"metalake", -····················SecurableObjects.ofMetalake( -····························"metalake",·Lists.newArrayList(Privileges.RemoveUser.allow())))); +········AuthorizationUtils.satisfyPrivileges( +············"metalake", +············SecurableObjects.ofMetalake( +················"metalake",·Lists.newArrayList(Privileges.RemoveUser.allow())))); ····Assertions.assertTrue( -············AuthorizationUtils.satisfyPrivileges( -····················"metalake", ... (220 more lines that didn't fit) 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.api.internal.tasks.execut
test-amd64-arch (linux/amd64, 11)
Process completed with exit code 1.
test-amd64-arch (linux/amd64, 17)
The job was canceled because "linux_amd64_11" failed.
test-amd64-arch (linux/amd64, 17)
The operation was canceled.
test-amd64-arch (linux/amd64, 8)
The job was canceled because "linux_amd64_11" failed.
test-amd64-arch (linux/amd64, 8)
The operation was canceled.
changes
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, dorny/paths-filter@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
test-amd64-arch (linux/amd64, 11)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, docker/setup-qemu-action@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.