Skip to content

πŸ› [storage-resize-images] onStart hook not implementedΒ #2545

@tad3j

Description

@tad3j

[REQUIRED] Step 2: Describe your configuration

  • Extension name: storage-resize-images`
  • Extension version: 0.2.10
  • Configuration values (redact info where appropriate):
    • firebaseextensions.v1beta.function/location=us-central1
    • IMG_BUCKET="${param:PROJECT_ID}.firebasestorage.app"
    • INCLUDE_PATH_LIST=/users/images/profile
    • RESIZED_IMAGES_PATH=
    • MAKE_PUBLIC=true
    • IMAGE_TYPE=webp
    • IMG_SIZES=180x180,80x80,40x40
    • IS_ANIMATED=false
    • CONTENT_FILTER_LEVEL=
    • DELETE_ORIGINAL_FILE=true
    • FUNCTION_MEMORY=1024
    • REGENERATE_TOKEN=true
    • DO_BACKFILL=false
    • BACKFILL_BATCH_SIZE=0
    • ALLOWED_EVENT_TYPES=firebase.extensions.storage-resize-images.v1.onStart
    • EVENTARC_CHANNEL="projects/${param:PROJECT_ID}/locations/us-central1/channels/firebase"

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

  1. Install storage-resize-images extension to your project, and enable EventArc hooks so you get the hook under ALLOWED_EVENT_TYPES.

  2. Add a simple function to listen for resize event

const onImageResizeStarted = onCustomEventPublished(
  'firebase.extensions.storage-resize-images.v1.onStart',
  async (e) => {
    console.log('e', e);
  }
);
  1. Resize an image and check onImageResizeStarted logs
Expected result

Function onImageResizeStarted should be called.

Actual result

I see event emitted in EvenArch but I dont see any logs from this function. After searching for onStart I've found recordStartEventwhich is called by the plugins but storage-resize-images is not on list of calles. (other events like recordSuccessEvent are called from here).

export const recordStartEvent = async (data: string | object) => {

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions