Skip to content

fix(storage-resize-images): kit/extension parity – onCompletion event no longer carries the object name #3266

Open

Description

@IzaakGough

storage-resize-images kit/extension parity. Priority: high. A subscriber can't tell which upload finished.

Difference

  • Extension: onCompletion carries the 1st gen context, so data.context.resource.name is projects/_/buckets/<bucket>/objects/<path>.
  • Kit: data.context.resource is a plain string naming only the bucket, context.eventType differs and context.params is missing. Neither side sets a CloudEvent subject on this event.

The README says the events are unchanged.

Reproduced

Both sides published to the default channel and a capture function logged every event. A good jpeg produced onStart, onStartResize, onSuccess and onCompletion in the same order on both sides, with matching payloads for the first three. On the kit, data.context.resource.name on onCompletion is undefined.

Code

Resolution

Build context in the extension's shape, with resource.name from the object's bucket and name.

The fix intentionally leaves subject unset on onCompletion. The extension does not set it on this event either, so leaving it out keeps the two in parity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions