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

[BUG] Blob Triggers processed blobs on dev server #1412

Open
vijaystroup opened this issue Jan 29, 2024 · 2 comments
Open

[BUG] Blob Triggers processed blobs on dev server #1412

vijaystroup opened this issue Jan 29, 2024 · 2 comments
Assignees

Comments

@vijaystroup
Copy link

vijaystroup commented Jan 29, 2024

Investigative information

Please provide the following:
  • Timestamp: n/a
  • Function App name: n/a
  • Function name(s) (as appropriate): n/a
  • Core Tools version: 4.0.5455

Repro steps

Provide the steps required to reproduce the problem:
@bp.blob_trigger(
    arg_name='audio',
    path='{x}.wav',
    connection='AzureWebJobsStorage',
)
def trigger(audio: func.InputStream):
    print(audio.name)

func start

Expected behavior

Provide a description of the expected behavior.

The remote, hosted instance of the function app on Azure has already triggered this function for a specific uploaded blob. When I then start the local, dev server, it then again gets triggered as though it has never seen it when it was already processed by the live function app.
The expected function is that it does not get triggered since it was already processed by the live function app.

Actual behavior

Provide a description of the actual behavior observed.

Triggers a function for each blob that was uploaded and processed by the live function, that the local server did not process. This is also true of when the live server and local server are both running: the trigger will run twice (which is to be expected, but not the first part of ones that are already processed when the dev server is not running).

Known workarounds

Provide a description of any known workarounds.
@bp.blob_trigger(
    arg_name='audio',
    path='{x}.wav',
    connection='AzureWebJobsStorage',
)
def trigger(audio: func.InputStream):
    # for starting in dev mode, skip if already while dev server was offline
    if check_if_processed_dev(audio.name):
        return

    print(audio.name)

check_if_processed_dev will check the database to see if that file had already been processed in the functionality of my backend.

Contents of the requirements.txt file:

Provide the requirements.txt file to help us find out module related issues.
azure-functions==1.17.0
requests==2.31.0
azure-storage-blob==12.19.0
pyjwt[crypto]==2.8.0
azure-servicebus==7.11.4
azure-cosmos==4.5.1
pydantic==2.5.3
openai==1.4.0
pytz==2023.3.post1

Related information

Provide any related information

n/a

@vijaystroup vijaystroup changed the title [BUG] Bug Title [BUG] Blob Triggers processed blobs on dev server Jan 29, 2024
@bhagyshricompany bhagyshricompany self-assigned this Jan 30, 2024
@bhagyshricompany
Copy link

Thanks for reporting will check and update.

@bhagyshricompany
Copy link

@gavin-aguiar pls comment and validate.Thanks

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

No branches or pull requests

3 participants