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

feat(irs-api):[#199] register policy definition for certain bpnls #802

Merged

Conversation

ds-psosnowski
Copy link

@ds-psosnowski ds-psosnowski commented Mar 5, 2024

Copy link

github-actions bot commented Mar 5, 2024

CHANGELOG file was not updated! Make sure to include important changes.

dsmf

This comment was marked as resolved.

@ds-psosnowski ds-psosnowski requested a review from dsmf March 11, 2024 08:48
ds-psosnowski and others added 3 commits March 13, 2024 13:57
 1) harden test PolicyStoreServiceTest#whenUpdate by asserting that the creation timestamp is not changed and that the validUntil timestamp is changed as expected

 2) clean method signature by moving loop from controller to the service method
dsmf

This comment was marked as resolved.

@dsmf

This comment was marked as resolved.

@dsmf

This comment was marked as resolved.

- updatePolicies_shouldAddPolicyToEachBpn
- updatePolicies_shouldAddBpnsToEachPolicy
@ds-psosnowski
Copy link
Author

ds-psosnowski commented Mar 14, 2024

Hey, please comment out code so I can reply in relevant topics. According to:

  1. list of bpns in path param - this is get request so you cannot have body for it also array is perfectly fine as parameter. If for some reason we don't want that this method need to be converted to post for example.
    There is business partner number when you query for all policies. If you are not (you are passing the bpn as param) then there is no need to return it since you are returning polices for given bnps right?
    About return type - original get was returning whole policy not just an id, I don't think it would make sense to return only id's for policies that are for some bpns and whole policy when we use getAll, I believe this is mistake in story definition, but we can confirm it.

    We agreed on changing param type and leave returning policy not just an id
  2. ../policy/... or .../policies/... - do you really think that it was intended to use singular only for one request? I would rather think that this is just typo agreed that we will leave it plural as other controller methods

@ds-psosnowski ds-psosnowski requested a review from dsmf March 15, 2024 09:53
@dsmf
Copy link

dsmf commented Mar 15, 2024

merged main again because of new conflict

Copy link

@dsmf dsmf left a comment

Choose a reason for hiding this comment

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

Hi @ds-psosnowski and @ds-jhartmann ,

There are open questions concerning the "default" and why apiAllowedBpn was removed. This may be fine, but I simply don't understand this. Maybe you can clarify this?


// assert
verify(persistence).delete("bpn2", "testId");
verify(persistence).save(eq(List.of("bpn1")), any());
}
}
Copy link

Choose a reason for hiding this comment

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

Hi @ds-psosnowski , I think we should also add the following tests:

  • updatePolicies_shouldAddPolicyToEachBpn
  • updatePolicies_shouldAddBpnsToEachPolicy

See my review branch: https://github.com/catenax-ng/tx-item-relationship-service/tree/feature/%23199-register-policy-definition-for-certian-bpnls--REVIEW in commit id c999b0a

Copy link

Choose a reason for hiding this comment

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

ok looks good now

void putBlob(String targetBlobName, byte[] blob) throws BlobPersistenceException;

Optional<byte[]> getBlob(String sourceBlobName) throws BlobPersistenceException;

Map<String, byte[]> getAllBlobs() throws BlobPersistenceException;
Copy link

Choose a reason for hiding this comment

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

Hi @ds-psosnowski , Something similar like my suggestion above in PolicyPersistence?

dsmf
dsmf previously approved these changes Mar 21, 2024
Copy link

@dsmf dsmf left a comment

Choose a reason for hiding this comment

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

Clarified apiAllowedBpn and default handling with @ds-psosnowski via msteams. Makes sense to me now. Therefore approved from my side.

Copy link

Copy link

@ds-jhartmann ds-jhartmann left a comment

Choose a reason for hiding this comment

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

LGTM

@ds-psosnowski ds-psosnowski merged commit 7703420 into main Mar 22, 2024
@ds-psosnowski ds-psosnowski deleted the feature/#199-register-policy-definition-for-certian-bpnls branch March 22, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants