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

Refactor/service execution result #261

Merged
merged 5 commits into from
Mar 25, 2024
Merged

Conversation

ccamel
Copy link
Member

@ccamel ccamel commented Mar 22, 2024

This PR is a redesign of the concepts of execution order and execution result, which, after discussion with @amimart, appears to have ambiguities and inaccuracies. The redesign aims to clarify these concepts and to unambiguously define the relationships they have with other ontology concepts.

Orchestration Services

To understand the redesign, it's essential first to recall the different kind of resources we have:

  • Digital resources, e.g., datasets.
  • Digital services, such as storage services or processing services.
  • Orchestration services.

It's important to understand that digital services are consumables, meaning these are services that can only be invoked by an orchestration service. One cannot issue orders directly to a digital service without going through an orchestration service. Orchestration services listen for transactions on the chain and respond according to directives (orders) presented in the form of a Verifiable Credential (VC).

The VC Orchestration Service Execution Order

This VC instructs an Orchestration Service to carry out an execution. It's crucial to understand here that the order is expressed without necessarily showing the resources that will be involved in the processing. Indeed, this is subject to interpretation by the Orchestration Service, which, based on the elements of the command provided, determines the resources engaged or not. (if you love logic theory, this is an approach by intention - https://en.wikipedia.org/wiki/Extensional_and_intensional_definitions).

The VC Orchestration Service Execution

This VC represents an ongoing or final execution of an Orchestration Service relative to an Orchestration Service Execution Order. Here, the VC contains references to the resources involved, both consumed and produced. The VC also reflects the progress.

Workflow Overview

I'll briefly describe the orchestration workflow involving these two Verifiable Credentials (VCs).

OSEO (Orchestration Service Execution Order)

When a user wants to initiate an orchestration, they select the orchestration service and create (and sign) an Orchestration Service Execution Order Credential, specifying the orchestration service as the subject. The user must provide all the required arguments. Then, they submits this VC to the blockchain.

OSE (Orchestration Service Execution)

Once the OSEO is recorded on the blockchain, the orchestration service is notified and begins execution. Based on its understanding of the order, it identifies the resources needed, then creates (and signs) an OSE with an InExecution status, which is submitted to the blockchain. This OSE certifies the rights & permissions granted for the proper execution of the workflow. The OSE is updated to reflect the service's completion status, either Failed or Delivered.

In more complex scenarios where the orchestration involves a workflow, multiple OSEs are issued to describe the processing chain in a hierarchical manner.

Summary by CodeRabbit

  • Documentation
    • Enhanced domain information across multiple credentials in the documentation, including dataset descriptions, digital resource publications, digital resource rights, digital service authentication, and more.
    • Introduced schema documentation for Orchestration Service Execution Order and Execution Credentials.
  • New Features
    • Added a new concept InExecution to denote ongoing digital service execution.
  • Refactor
    • Updated schema templates to display domain information for properties.
  • Chores
    • Improved sidebar navigation and domain categorization in documentation.

@ccamel ccamel self-assigned this Mar 22, 2024
Copy link
Contributor

coderabbitai bot commented Mar 22, 2024

Walkthrough

The recent updates enhance and introduce schemas for various credentials, focusing on digital resources, services, and governance. Key additions include domain information across multiple credentials, the introduction of schemas for orchestration service execution and its order, and a new execution status. These changes aim to enrich the metadata and interoperability of digital credentials within a structured ecosystem.

Changes

Files Change Summary
docs/schemas/credential-dataset-description.md
docs/schemas/credential-digital-resource-publication.md
docs/schemas/credential-digital-resource-rights.md
docs/schemas/credential-digital-service-authentication.md
docs/schemas/credential-digital-service-description.md
docs/schemas/credential-zone-description.md
Added domain information for specified properties in various credentials.
docs/schemas/credential-governance-text.md Updated sidebar_position and added a new Domain entry.
docs/schemas/credential-orchestration-service-execution-order.md
docs/schemas/credential-orchestration-service-execution.md
Introduced schemas for Orchestration Service Execution and its Order with detailed properties.
script/cli/templates/schema.md.j2 Enhanced schema template to display domain information for properties.
src/schema/orchestration-service/... Introduced RDF schema definitions for orchestrating service execution orders and details.
src/thesaurus/digital-service-execution-status.ttl Added a new concept InExecution for Digital Service execution progress.

🐰✨
In the digital fields where data streams flow,
New schemas bloom, and credentials grow.
With each update, a richer tale we weave,
Of services orchestrated, in the web we believe.
Here's to the changes, may they guide us right,
Through the digital maze, into the light.
🌟📜🌐

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-tests 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 tests 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 tests.
    • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@ccamel ccamel force-pushed the refactor/service-execution-result branch from 07a9332 to 32ee096 Compare March 22, 2024 22:18
@amimart amimart self-requested a review March 23, 2024 13:32
@ccamel ccamel marked this pull request as ready for review March 25, 2024 08:00
@ccamel ccamel requested a review from MdechampG March 25, 2024 08:00
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between bb539ca and 32ee096.
Files selected for processing (13)
  • docs/schemas/credential-dataset-description.md (8 hunks)
  • docs/schemas/credential-digital-resource-publication.md (2 hunks)
  • docs/schemas/credential-digital-resource-rights.md (4 hunks)
  • docs/schemas/credential-digital-service-authentication.md (2 hunks)
  • docs/schemas/credential-digital-service-description.md (7 hunks)
  • docs/schemas/credential-governance-text.md (2 hunks)
  • docs/schemas/credential-orchestration-service-execution-order.md (1 hunks)
  • docs/schemas/credential-orchestration-service-execution.md (1 hunks)
  • docs/schemas/credential-zone-description.md (5 hunks)
  • script/cli/templates/schema.md.j2 (1 hunks)
  • src/schema/orchestration-service/credential-orchestration-service-execution-order.ttl (1 hunks)
  • src/schema/orchestration-service/credential-orchestration-service-execution.ttl (1 hunks)
  • src/thesaurus/digital-service-execution-status.ttl (1 hunks)
Additional comments: 34
src/thesaurus/digital-service-execution-status.ttl (1)
  • 29-34: The addition of the InExecution concept is well-defined and aligns with the PR's objectives to enhance clarity around digital service execution statuses. The definition is clear and semantically correct.
script/cli/templates/schema.md.j2 (1)
  • 51-54: The addition of the domain display for properties in the schema template is a valuable enhancement. It improves the documentation by providing clearer context for each property's application. Ensure that the domain information is accurate and up-to-date for all properties.
docs/schemas/credential-digital-service-authentication.md (2)
  • 40-40: Adding the domain information for the forOrder property enhances the schema documentation by clearly specifying the applicable context for this property. This is a positive change that aligns with best practices for schema documentation.
  • 50-50: Similarly, specifying the domain for the toService property clarifies its context within the DigitalServiceAuthenticationCredential. This addition is consistent and beneficial for understanding the schema's structure.
docs/schemas/credential-digital-resource-publication.md (2)
  • 38-38: The addition of domain information for the hasIdentifier property clearly specifies its applicability within the DigitalResourcePublicationCredential, enhancing the schema's documentation quality.
  • 48-48: The domain specification for the servedBy property is another positive change, providing clear context for its use within the DigitalResourcePublicationCredential. This helps in understanding the schema's structure and intended usage.
src/schema/orchestration-service/credential-orchestration-service-execution-order.ttl (2)
  • 7-21: The definitions for OrchestrationServiceExecutionOrder and OrchestrationServiceExecutionOrderCredential are well-structured and semantically clear. These additions align with the PR's objectives to enhance the framework for executing and orchestrating digital services.
  • 23-29: The property hasExecutionOrder is correctly defined, linking the execution order credential to its specific execution order. This property is essential for establishing the relationship between the credential and the execution order, facilitating a standardized method for managing service execution.
docs/schemas/credential-digital-resource-rights.md (2)
  • 39-39: The domain information for the hasAuthor property is a valuable addition, clearly defining its context within the DigitalResourceRightsCredential. This enhances the schema's documentation by providing clarity on property applicability.
  • 49-49: Similarly, specifying the domain for the hasCreator property improves the schema documentation by clearly indicating its usage context. This change aligns with best practices for schema documentation.
docs/schemas/credential-zone-description.md (2)
  • 72-72: Adding domain information for the hasDescription property within the ZoneDescriptionCredential schema is a positive change, enhancing clarity and understanding of the property's intended context.
  • 82-82: The domain specification for the hasImage property clearly defines its applicability, contributing to a more comprehensive and understandable schema documentation.
docs/schemas/credential-orchestration-service-execution-order.md (2)
  • 4-4: Please note that this file is marked as auto-generated. If this documentation is indeed generated from source code or another authoritative source, ensure that any changes made here are also reflected in the source to maintain consistency.
  • 1-88: Consider adding practical examples of how this schema is used, especially for complex properties and classes. Examples can significantly enhance understanding and ease of use for developers implementing this schema.
src/schema/orchestration-service/credential-orchestration-service-execution.ttl (10)
  • 7-11: The definition of :OrchestrationServiceExecution is clear and well-documented. The comment provides a good explanation of the class's purpose.
  • 13-21: The :OrchestrationServiceExecutionCredential class is well-defined, with a comprehensive comment explaining its purpose and significance. It's important to ensure that the concept of the orchestration service being both the subject and the issuer is well understood and implemented correctly in the system.
  • 23-29: The property :executionOf is correctly defined with appropriate domain and range. The comment provides a clear explanation of its purpose. However, ensure that the relationship between :OrchestrationServiceExecutionOrderCredential and :OrchestrationServiceExecutionOrder is implemented correctly in the system.
  • 31-39: The :hasConsumedResource property is well-documented, and its purpose is clear. It's important to ensure that the system can handle multiple instances of this property correctly, reflecting the complexity of digital service orchestration.
  • 41-47: The :hasExecution property is succinctly defined. The comment could be expanded to provide more details about what constitutes an execution result for clarity.

Consider expanding the comment for :hasExecution to include examples or more detailed explanations of what an execution result might entail.

  • 49-57: The :hasExecutionEvidence property is well-defined, with a detailed comment explaining its purpose and the types of resources that can serve as evidence. This is crucial for auditing and verification purposes.
  • 59-65: The :hasExecutionStatus property is correctly defined. Ensure that the system correctly implements and updates the execution status, using the defined thesaurus for digital service execution status.
  • 67-73: The :hasExecutionTime property is well-defined, with a clear domain and range. It's important to ensure that the system accurately records the execution time in the specified DateTime format.
  • 75-81: The :hasProducedResource property is clearly defined. Like :hasConsumedResource, ensure the system can handle multiple instances of this property to accurately reflect resources produced during execution.
  • 83-91: The :partOfExecution property introduces a hierarchical relationship between executions, which is crucial for tracking complex orchestrations. Ensure that the system correctly implements this hierarchy to facilitate understanding and tracking of workflows.
docs/schemas/credential-digital-service-description.md (1)
  • 81-88: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [74-135]

The property definitions for the Digital Service Description Credential, including hasCategory, hasDescription, hasImage, hasPublisher, hasTag, hasTitle, and hasWebpage, are well-documented with clear domains and ranges. Each property's purpose is clearly explained, which is beneficial for understanding the schema's structure and intended use.

docs/schemas/credential-dataset-description.md (1)
  • 82-89: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [75-147]

The property definitions for the Dataset Description Credential, including hasDescription, hasFormat, hasGeoCoverage, hasImage, hasTag, hasTemporalCoverage, hasTitle, and hasTopic, are well-documented with clear domains and ranges. Each property's purpose is clearly explained, which is beneficial for understanding the schema's structure and intended use.

docs/schemas/credential-orchestration-service-execution.md (4)
  • 1-5: The metadata section, including the sidebar position and the auto-generated note, is correctly formatted and informative.
  • 6-34: The schema description provides a clear overview of the orchestration service execution credential's purpose. Ensure the namespace URL is correctly formatted and accessible.
  • 36-56: The properties Has execution result and Has execution status are well-documented, with clear IRIs, domains, ranges, and descriptions.
  • 58-116: The class Orchestration service execution and its properties are comprehensively documented, with clear IRIs, ranges, and descriptions.
docs/schemas/credential-governance-text.md (4)
  • 1-5: The metadata section, including the updated sidebar position and the auto-generated note, is correctly formatted and informative.
  • 41-48: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [6-45]

The schema description provides a clear overview of the governance text credential's purpose. Ensure the namespace URL is correctly formatted and accessible.

  • 44-45: The property Is governed by is well-documented, with a clear IRI, domain, range, and description.
  • 41-48: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [46-244]

The classes related to governance text, including Article, Chapter, Governance text, Paragraph, and Section, are comprehensively documented, with clear IRIs, ranges, and descriptions for each property.

Copy link
Member

@amimart amimart left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ccamel ccamel merged commit 2595b68 into main Mar 25, 2024
10 checks passed
@ccamel ccamel deleted the refactor/service-execution-result branch March 25, 2024 10:37
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.

2 participants