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 UI incorrectly displays errors in Policy #662

Open
tmberthold opened this issue Feb 8, 2024 · 4 comments
Open

Fix UI incorrectly displays errors in Policy #662

tmberthold opened this issue Feb 8, 2024 · 4 comments
Assignees
Labels
component/edc-ui affected software component kind/bug Something isn't working. The software does not behave as expected or specified.

Comments

@tmberthold
Copy link
Member

tmberthold commented Feb 8, 2024

Bug Report

Description

If policies are created via the Management-API that cannot be created via the UI, the UI indicates that the policy is incorrect, even though they technically work.

Expected Behavior

Don't show errors in the UI if technically there aren't any. Or expand the UI so that all functionalities of the Management-API are supported.

Observed Behavior

image

image

Steps to Reproduce

Steps to reproduce the behavior:

Create a policy via Management-API, which cannot be created via the UI but still works technically.

Context Information

  • Here in the specific cases EDC EE based on EDC 0.2.1 were used.
  • How it works with the Management-API. The Management-API enables customers to create any policy so they just give it a try because they know the policy from other use-cases. The management API has no input-validation and allows any POST bodies, meaning they can just try it out changing the Body, there are no specifications enforced like there are with the UI.
  • That's where the UI fails, because user can create any Policy with the Management-API, whether it is technically correct or not, which is not the case with the UI. The UI then tries to display all policies in the tab but simply doesn't know the syntax of some of the policies.

Possible Implementation and Work Breakdown

Possible short-term solution: Hide the error message for the scenario described above given that the policy actually works.

@tmberthold tmberthold added the kind/bug Something isn't working. The software does not behave as expected or specified. label Feb 8, 2024
@AbdullahMuk AbdullahMuk added the component/edc-ui affected software component label Feb 29, 2024
@AbdullahMuk AbdullahMuk added the clean-backlog requires backlog cleaning label May 2, 2024
@ununhexium ununhexium changed the title UI incorrectly displays errors in Policy Fix UI incorrectly displays errors in Policy May 2, 2024
@ununhexium ununhexium removed the clean-backlog requires backlog cleaning label May 8, 2024
@AbdullahMuk AbdullahMuk assigned illfixit and unassigned ununhexium Jun 4, 2024
@tmberthold tmberthold added this to the MDS 2.2 milestone Aug 2, 2024
@kamilczaja
Copy link
Collaborator

kamilczaja commented Aug 9, 2024

While the UI is not supporting every edge-case and all shenanigans that could be achieved by using the management API, we recently implemented and/or constraints and empty constraints officially into the UI and the API Wrapper. This should suffice to support most use cases found in MDS or Catena-X.

So, while we don't have and probably don't intend to implement everything described in this issue, the linked MDS issue was fixed here: sovity/edc-ce#1012

The question here is: Can this be closed?

@illfixit
Copy link
Collaborator

the original MDS issue includes only 0 constraints error and as mentioned before it was already fixed.
the second part in our issue (not in MDS) also mentions other errors like OrConstraints are currently unsupported

@AbdullahMuk
Copy link
Collaborator

@kamilczaja @illfixit thanks for sharing these insights.

We will assess the efficiency of the current fixes after all connectors have been upgraded to latest version of edc-ui. moving this issue to a later sprint.

@AbdullahMuk AbdullahMuk removed this from the MDS 2.2 milestone Aug 13, 2024
@richardtreier
Copy link
Collaborator

  • Our API Wrapper might accidentally display an error for empty policies.
    • I believe this was once the case, but is now fixed
    • Should be fixed, according to Ilia
  • Our API Wrapper should support now OR, XOR, AND without errors.
    • Otherwise it needs to be adjusted (TODO: confirm)
    • Confirm: Does this still happen?
  • Our API Wrapper supports policies that were created with multiple Permissions or multiple Constraints per Permission:
    • It will point out, though, that it is preferred that you use an AND Constraint, and only a single Permission and a single Constraint.
    • This is intended.
    • This does not impede functionality.
    • This is rather a deprecation notice to people still creating policies in the old way.
    • There is no distinction between errors and warnings right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/edc-ui affected software component kind/bug Something isn't working. The software does not behave as expected or specified.
Projects
None yet
Development

No branches or pull requests

6 participants