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

Update DTOs #13

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Update DTOs #13

merged 2 commits into from
Aug 6, 2024

Conversation

roxblnfk
Copy link
Member

@roxblnfk roxblnfk commented Aug 6, 2024

Sync with RR 2024.2

Summary by CodeRabbit

  • New Features

    • Added new properties request_id to several event attribute classes to enhance tracking of requests.
    • Introduced scheduled_event_id in the PendingNexusOperationInfo class for better event correlation.
    • Enhanced the Message class with additional fields for detailed task management.
  • Documentation

    • Updated documentation for properties and methods to improve clarity and correctness.
    • Removed outdated comments regarding the next_retry_delay behavior in ApplicationFailureInfo class.
  • Bug Fixes

    • Corrected references in documentation to align with updated attributes in the RespondWorkflowTaskCompletedResponse class.

Copy link

coderabbitai bot commented Aug 6, 2024

Walkthrough

The recent changes involve significant updates to the Temporal API, enhancing the functionality and clarity of various components. Key alterations include the addition of new fields for tracking request IDs in event attributes and improvements to API versioning for clearer endpoint management. Additionally, updates to internal metadata and method documentation aim to streamline interactions within the system, ensuring better performance and maintainability.

Changes

Files Change Summary
generated/.../Message.php Updates to protocol buffer metadata initialization and event attribute definitions, enhancing workflow capabilities.
generated/.../Service.php Modifications to API endpoint paths for improved versioning and clarity in service methods.
generated/.../NexusOperation*.php Addition of request_id property across multiple event attribute classes for better request tracking.
generated/.../PendingNexusOperationInfo.php New scheduled_event_id property added for correlating events in workflow execution responses.
generated/.../RespondWorkflowTaskCompletedResponse.php Documentation updates for clarity on activity task attributes.
generated/.../ApplicationFailureInfo.php Removed outdated comments on next_retry_delay behavior.
generated/.../Failure.php Cosmetic changes to comment formatting for consistency.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Service
    participant Workflow

    Client->>Service: Request workflow execution
    Service->>Workflow: Start execution with metadata
    Workflow->>Service: Send task details
    Service->>Client: Respond with task completion
Loading

🐇 "In the forest of code, changes abound,
New fields sprout up from the ground.
With IDs to track and paths refined,
Our workflows now leave worries behind.
Hopping through versions, oh what a sight,
A brighter future in code, delight!" 🐇


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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

CodeRabbit Configuration 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.

@roxblnfk roxblnfk added the enhancement New feature or request label Aug 6, 2024
Copy link

@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.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
generated/RoadRunner/HTTP/DTO/V1/GPBMetadata/Http.php (1)

Verify the impact of removing \GPBMetadata\Google\Protobuf\Any::initOnce();.

The Any type is used in various parts of the codebase, and its initialization is called in multiple files. Removing the initialization in Http.php could affect the handling of dynamic message types. Ensure that this change does not introduce any issues in message serialization or deserialization.

  • Files with Any type usage:
    • generated/GPBMetadata/Temporal/Api/Errordetails/V1/Message.php
    • generated/GPBMetadata/Temporal/Api/Protocol/V1/Message.php
    • generated/Temporal/Api/Protocol/V1/Message.php
    • generated/Temporal/Api/Nexus/V1/IncomingServiceSpec.php
    • generated/Temporal/Api/Errordetails/V1/MultiOperationExecutionFailure/OperationStatus.php
    • generated/RoadRunner/Common/DTO/V1/Status.php
    • generated/RoadRunner/Common/DTO/V1/GPBMetadata/GrpcStatus.php
Analysis chain

Line range hint 12-20:
Verify the impact of removing \GPBMetadata\Google\Protobuf\Any::initOnce();.

Removing the initialization of the Any type could affect the handling of dynamic message types if they are used later in the code. Ensure that this change does not introduce any issues in message serialization or deserialization.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `Any` type in the codebase.

# Test: Search for the usage of `Any` type. Expect: Ensure that the removal does not affect the code.
rg --type php '\Google\Protobuf\Any'

Length of output: 125


Script:

#!/bin/bash
# Description: Verify the usage of `Any` type in the codebase.

# Test: Search for the usage of `Any` type. Expect: Ensure that the removal does not affect the code.
rg --type php 'Google\\Protobuf\\Any'

Length of output: 1997

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a6dfcba and 1d312c9.

Files selected for processing (17)
  • api (1 hunks)
  • generated/GPBMetadata/Temporal/Api/History/V1/Message.php (1 hunks)
  • generated/GPBMetadata/Temporal/Api/Operatorservice/V1/Service.php (1 hunks)
  • generated/GPBMetadata/Temporal/Api/Workflow/V1/Message.php (1 hunks)
  • generated/GPBMetadata/Temporal/Api/Workflowservice/V1/Service.php (1 hunks)
  • generated/RoadRunner/HTTP/DTO/V1/GPBMetadata/Http.php (1 hunks)
  • generated/RoadRunner/Temporal/DTO/V1/GPBMetadata/Temporal.php (1 hunks)
  • generated/RoadRunner/Temporal/DTO/V1/Message.php (3 hunks)
  • generated/Temporal/Api/Failure/V1/ApplicationFailureInfo.php (4 hunks)
  • generated/Temporal/Api/Failure/V1/Failure.php (4 hunks)
  • generated/Temporal/Api/History/V1/NexusOperationCanceledEventAttributes.php (3 hunks)
  • generated/Temporal/Api/History/V1/NexusOperationCompletedEventAttributes.php (3 hunks)
  • generated/Temporal/Api/History/V1/NexusOperationFailedEventAttributes.php (3 hunks)
  • generated/Temporal/Api/History/V1/NexusOperationStartedEventAttributes.php (3 hunks)
  • generated/Temporal/Api/History/V1/NexusOperationTimedOutEventAttributes.php (3 hunks)
  • generated/Temporal/Api/Workflow/V1/PendingNexusOperationInfo.php (3 hunks)
  • generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskCompletedResponse.php (4 hunks)
Files skipped from review due to trivial changes (4)
  • api
  • generated/Temporal/Api/Failure/V1/ApplicationFailureInfo.php
  • generated/Temporal/Api/Failure/V1/Failure.php
  • generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskCompletedResponse.php
Additional comments not posted (45)
generated/RoadRunner/Temporal/DTO/V1/GPBMetadata/Temporal.php (1)

Line range hint 12-19:
LGTM! But verify the usage of new fields in Message.

The code changes are approved.

However, ensure that all usages of the Message class correctly handle the new fields (task_queue, tick_time, replay, continue_as_new_suggested).

generated/GPBMetadata/Temporal/Api/Operatorservice/V1/Service.php (1)

Line range hint 12-19:
LGTM! But verify the usage of updated API endpoints.

The code changes are approved.

However, ensure that all usages of the updated API endpoints correctly handle the new versioning scheme (/api/v1/).

Verification successful

LGTM! But verify the usage of updated API endpoints.

The code changes are approved. The new versioning scheme (/api/v1/) is consistently used across multiple files.

  • Ensure that all usages of the updated API endpoints correctly handle the new versioning scheme (/api/v1/).
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of updated API endpoints.

# Test: Search for the usage of updated API endpoints. Expect: Ensure that the new versioning scheme is correctly handled.
rg --type php '/api/v1/'

Length of output: 71525

generated/Temporal/Api/History/V1/NexusOperationCanceledEventAttributes.php (3)

31-36: Addition of request_id property looks good.

The new property request_id is well-documented and follows the existing structure.


48-49: Update to constructor's PHPDoc looks good.

The constructor's PHPDoc comment now correctly includes the new request_id property.


119-143: Addition of getRequestId and setRequestId methods looks good.

The new methods for accessing and modifying the request_id property are well-implemented and follow the existing pattern.

generated/Temporal/Api/History/V1/NexusOperationTimedOutEventAttributes.php (3)

31-36: Addition of request_id property looks good.

The new property request_id is well-documented and follows the existing structure.


48-49: Update to constructor's PHPDoc looks good.

The constructor's PHPDoc comment now correctly includes the new request_id property.


119-143: Addition of getRequestId and setRequestId methods looks good.

The new methods for accessing and modifying the request_id property are well-implemented and follow the existing pattern.

generated/Temporal/Api/History/V1/NexusOperationFailedEventAttributes.php (3)

31-36: Addition of request_id property looks good.

The new property request_id is well-documented and follows the existing structure.


48-49: Update to constructor's PHPDoc looks good.

The constructor's PHPDoc comment now correctly includes the new request_id property.


119-143: Addition of getRequestId and setRequestId methods looks good.

The new methods for accessing and modifying the request_id property are well-implemented and follow the existing pattern.

generated/Temporal/Api/History/V1/NexusOperationStartedEventAttributes.php (4)

35-40: Addition of the request_id property looks good.

The request_id property is correctly defined with appropriate annotations.


53-54: Constructor documentation update looks good.

The documentation correctly includes the new request_id parameter.


116-121: Addition of the getRequestId method looks good.

The method is correctly implemented and documented.


127-140: Addition of the setRequestId method looks good.

The method is correctly implemented with validation and documented.

generated/Temporal/Api/History/V1/NexusOperationCompletedEventAttributes.php (4)

32-37: Addition of the request_id property looks good.

The request_id property is correctly defined with appropriate annotations.


50-51: Constructor documentation update looks good.

The documentation correctly includes the new request_id parameter.


123-128: Addition of the getRequestId method looks good.

The method is correctly implemented and documented.


134-147: Addition of the setRequestId method looks good.

The method is correctly implemented with validation and documented.

generated/GPBMetadata/Temporal/Api/Workflow/V1/Message.php (1)

28-28: Update to the initOnce method looks good.

The method correctly includes additional generated files in the descriptor pool.

generated/RoadRunner/Temporal/DTO/V1/Message.php (11)

67-72: Property task_queue added

The property task_queue is correctly declared as a string with a default value of an empty string.


377-401: Getter and Setter for task_queue

The getter and setter methods for task_queue are correctly implemented with appropriate type checks.


73-78: Property tick_time added

The property tick_time is correctly declared as a string with a default value of an empty string.


403-427: Getter and Setter for tick_time

The getter and setter methods for tick_time are correctly implemented with appropriate type checks.


79-84: Property replay added

The property replay is correctly declared as a boolean with a default value of false.


429-453: Getter and Setter for replay

The getter and setter methods for replay are correctly implemented with appropriate type checks.


85-90: Property continue_as_new_suggested added

The property continue_as_new_suggested is correctly declared as a boolean with a default value of false.


455-479: Getter and Setter for continue_as_new_suggested

The getter and setter methods for continue_as_new_suggested are correctly implemented with appropriate type checks.


91-97: Property history_size added

The property history_size is correctly declared as an integer with a default value of 0.


481-507: Getter and Setter for history_size

The getter and setter methods for history_size are correctly implemented with appropriate type checks.


121-131: Constructor updated

The constructor has been correctly updated to include the new properties in its type annotations.

generated/Temporal/Api/Workflow/V1/PendingNexusOperationInfo.php (3)

92-98: Property scheduled_event_id added

The property scheduled_event_id is correctly declared as an integer with a default value of 0.


517-543: Getter and Setter for scheduled_event_id

The getter and setter methods for scheduled_event_id are correctly implemented with appropriate type checks.


133-135: Constructor updated

The constructor has been correctly updated to include the new property in its type annotations.

generated/GPBMetadata/Temporal/Api/Workflowservice/V1/Service.php (10)

21-21: Endpoint path updated for RegisterNamespace

The endpoint path for RegisterNamespace has been correctly updated to include API versioning.


21-21: Endpoint path updated for DescribeNamespace

The endpoint path for DescribeNamespace has been correctly updated to include API versioning.


21-21: Endpoint path updated for ListNamespaces

The endpoint path for ListNamespaces has been correctly updated to include API versioning.


21-21: Endpoint path updated for UpdateNamespace

The endpoint path for UpdateNamespace has been correctly updated to include API versioning.


21-21: Endpoint path updated for DeprecateNamespace

The endpoint path for DeprecateNamespace has been correctly updated to include API versioning.


21-21: Endpoint path updated for StartWorkflowExecution

The endpoint path for StartWorkflowExecution has been correctly updated to include API versioning.


21-21: Endpoint path updated for ExecuteMultiOperation

The endpoint path for ExecuteMultiOperation has been correctly updated to include API versioning.


21-21: Endpoint path updated for GetWorkflowExecutionHistory

The endpoint path for GetWorkflowExecutionHistory has been correctly updated to include API versioning.


21-21: Endpoint path updated for PollWorkflowTaskQueue

The endpoint path for PollWorkflowTaskQueue has been correctly updated to include API versioning.


21-21: Endpoint path updated for RespondWorkflowTaskCompleted

The endpoint path for RespondWorkflowTaskCompleted has been correctly updated to include API versioning.

generated/GPBMetadata/Temporal/Api/History/V1/Message.php (1)

32-32: LGTM! The proto file path string is correctly formatted.

The added proto file path string includes the necessary references to various protocol buffer files.

@roxblnfk roxblnfk merged commit 84ccecb into 1.x Aug 6, 2024
@roxblnfk roxblnfk deleted the update-dtos branch August 6, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant