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

Feature/Add AcceptResponseItems #76

Merged
merged 28 commits into from
May 24, 2024

Conversation

Milena-Czierlinski
Copy link
Contributor

No description provided.

Copy link

coderabbitai bot commented Mar 25, 2024

Important

Review Skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Milena-Czierlinski and others added 7 commits April 15, 2024 10:24
…tItemProcessor (#80)

* feat: add is{Predecessor,Successor}Of

* feat: add AttributeSuccessionAcceptResponseItem

* feat: adjust ReadAttributeRequestItemProcessor

* test: AttributeSuccessionAcceptResponseItem for
ReadAttributeRequestItemProcessor

* feat: add thirdPartyOwnedRelationshipAttributeSuccession

* fix: succession in ReadAttributeRequestItemProcessor

* test: succession in ReadAttributeRequestItemProcessor

* feat: omit check for RepositoryAttribute in getSharedVersionsOfRepositoryAttribute

* fix: ownSharedThirdPartyAttributeSuccession

* feat: allow applyIncomingResponseItem to return events

* fix: make iql tests independent

* test: returned event applying incoming ResponseItem

* feat: integrate comments

* feat: add AttributeSuccessionAcceptResponseItem to DataViewExpander

* feat: integrate comments

* fix: adjust renamed functions in tests

* feat: integrate comments

* feat: correct test names

* feat: combine isA{Predecessor,Successor}Of to a single function

* feat: add TODO comment for renaming getSharedVersionsOfRepositoryAttribute

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…uestItemProcessor (#101)

* feat: add AttributeSuccessionAcceptResponseItem for ProposeAttributeRequestItemProcessor

* test: AcceptSuccessionResponseItem in ProposeAttributeRequestItemDVO

* feat: integrate comments

* feat: integrate comments

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@Milena-Czierlinski Milena-Czierlinski changed the base branch from main to release/v5 April 18, 2024 14:34
Magnus-Kuhn and others added 4 commits April 24, 2024 16:17
* chore: adapt accept, reject, revoke runtime use cases

* chore: change relationship classes

* chore: adapt transmission types

* chore: rename transmission request/response types

* fix: relationships backbone response type

* chore: adapt RelationshipsController

* chore: adapt ExternalEventsProcessor

* chore: adapt the relationship use cases

* chore: adapt request response type

* chore: adapt completing incoming requests

* refactor: content type names

* feat: get relationship with audit logs, fix types

* chore: adapt outgoing request controller and use cases

* chore: adapt relationship (change) dtos

* chore: adapt request module

* chore: adapt index file

* refactor: auditLog is transport relationship member

* chore: adapt relationship getter use cases

* chore: rename use cases

* chore: adapt transport validation

* chore: adapt schemas and further renaming

* chore: rename relation creation request content file

* refactor: renaming types

* chore: adapt request consumption tests

* refactor: rename content to creation content in sendRelationship

* fix: relationship creation request type name

* chore: adapt final consumption and transport tests

* chore: adapt runtime tests

* fix: adapt changes in transport tests

* chore: adapt the new external event processor

* chore: use correct backbone version

* fix: adapt to backbone signature

* fix: await promise

* fix: update status with relationship

* refactor: move audit log to relationship cache

* refactor: merge the relationship event handlers

* fix: relationship controller flows

* refactor: relationship types

* fix: audit log deserializer

* fix: relationship event payload

* fix: get correct creation/acceptance content

* fix: only decrypt relationship if secrets available

* fix: don't use sync result in a test

* chore: remove comments / debug code

* fix: transport tests, sort audit log

* fix: consumption tests, request controller type

* refactor: remove auditLog flag in useCases

* fix: assorted fixes

* chore: update app-runtime

* fix: exports

* refactor: massively simplify DTO creation

* fix: app runtime tests

* fix: import

* fix: mandatory audit log

* fix: adapt relationship dto/dvo, remove null checks

* refactor/fix: add audit log to test factory, remove redundant method

* fix: de-duplicate functions

* fix: redo old behaviour

* fix: casing

* fix: update event behaviour

* fix: re-add some tests

* fix: make peer an address again

* refactor: mandatory payload in put

* feat: add the relationship changes to the relationship dto

* chore: add validation to outoing request controller

* refactor: relationshipCreationContent instead of CreationRequestContent

* refactor/fix: auditLog to relationshipAuditLog, add createdByDevice

* refactor: simplify RelationshipMapper

* chore: remove unused runtime error

* fix: re-add check, remove throw

* fix: add createdByDevice to relationship DTO

* refactor: cleaner function call

* test: add old relationship change tests; test for creation content

* fix: add createdByDevice to audit log method

* fix: wrong type annotations

* fix: condition in createRequestFromTemplateResponse

* fix: add createdBDevice to TestObjectFactory audit logs

* refactor: rename auditLog file

* refactor: cosmetic changes

* refactor: correct audit log in test object factory

* fix: add oldStatus

* refactor: remove empty acceptanceContents

* refactor: request/response to creation-/acceptanceContent

* chore: adapt backbone return types, type check

* fix: correctly use types

* refactor: no type extension in backboneGetRelationships

* fix: catch undefined creation content

* refactor: fail fast undefined creation content

* fix: this was supposed to be the previous commit

* refactor: add relationship prefix to audit log

* refactor: rename relationship event processor

* refactor: change checks, use JSONWrapper for creation content

* refactor: split audit log class

* fix: update import

* refactor: acceptanceContent -> creationResponseContent

* refactor: combine events

* fix: naming

* chore: bump backbone

* chore: add admin ui to compose

* fix: naming

* chore: naming

* fix: Relationships

* fix: re-add import

* fix: update types and errors

* chore: bump backbone

* fix: add enum validators

* chore: any is always nullable

* fix: pass creation content

* fix: throw error again

* chore: remove unused content

* fix: make publicCreationResponseContentCrypto required

* chore: update validate annotation

---------

Co-authored-by: Julian König <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@Milena-Czierlinski Milena-Czierlinski changed the base branch from release/v5 to main May 8, 2024 08:54
Milena-Czierlinski and others added 5 commits May 8, 2024 13:57
* feat: rename getSharedVersionsOfAttribute

* chore: remove todo

* refactor: rename variables

* feat: integrate comments

* feat: re-add deprecated getSharedVersionsOfRepositoryAttribute

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@Milena-Czierlinski Milena-Czierlinski marked this pull request as ready for review May 15, 2024 15:34
@Milena-Czierlinski
Copy link
Contributor Author

This introduces basically two new features (that were already reviewed in separate PRs):

  1. Answering a ReadAttributeRequestItem or ProposeAttributeRequestItem with an Attribute already shared in the respective Relationship doesn't create new shared copies, but returns the ID of the already shared Attribute.
  2. Answering a ReadAttributeRequestItem or ProposeAttributeRequestItem with the successor of an Attribute already shared in the respective Relationship performs an Attribute succession of the shared Copies.

@britsta
Copy link
Contributor

britsta commented May 15, 2024

Why was the base branch first changed from main to release/v5 and then from release/v5 to main again?

@Milena-Czierlinski
Copy link
Contributor Author

Why was the base branch first changed from main to release/v5 and then from release/v5 to main again?

Initially, I renamed getSharedVersionsOfRepositoryAttribute to getSharedVersionsOfAttribute here (which is a breaking change). To be able to merge it to main now, the use case getSharedVersionsOfAttribute is already added, but we also keep the old one marked as deprecated. I will create a PR for v5 that deletes that use case there, as its functionality is provided and extended by the new use case.

Copy link
Member

@jkoenig134 jkoenig134 left a comment

Choose a reason for hiding this comment

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

version bumps missing

Copy link
Member

@jkoenig134 jkoenig134 left a comment

Choose a reason for hiding this comment

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

LGTM

@Milena-Czierlinski Milena-Czierlinski merged commit 73d8168 into main May 24, 2024
16 checks passed
@Milena-Czierlinski Milena-Czierlinski deleted the feature/add-acceptresponseitems branch May 24, 2024 10:42
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