Skip to content

Redundant Commit Message Handling in BUCK Upload API #1926

Description

@jjl9807

The commit_message field is currently implemented in both the Manifest and Complete interfaces of the BUCK upload API. However, the value provided in the Manifest interface is effectively unused, as the Complete interface overwrites it when updating the session status.

Current Behavior

The Manifest interface accepts and stores commit_message in the session payload during status update, but this value has no downstream effect:

https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L708-L715

The Complete interface subsequently overwrites the commit_message field during its own status update, nullifying the Manifest-provided value:

https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L922-L934

https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L937-L945

Proposed Resolution

Retain commit_message exclusively in the Manifest interface and remove it from the Complete interface. This would:

  • Simplify the Complete endpoint to require no request body, functioning purely as a session-finalization notification.
  • Position the Manifest interface as the authoritative source for session metadata (including commit message).
  • Achieve clearer separation of concerns: Manifest defines session context; Complete triggers completion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions