Skip to content

chore: ignore errors during function app detachment#2645

Merged
tobiasdiez merged 1 commit intomainfrom
fix-deploy
Apr 8, 2025
Merged

chore: ignore errors during function app detachment#2645
tobiasdiez merged 1 commit intomainfrom
fix-deploy

Conversation

@tobiasdiez
Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

Not sure why, but sometimes detaching an function app fails:

 Detaching function app jabref-function-dev
Traceback (most recent call last):
  File "D:\a\JabRefOnline\JabRefOnline\.github\scripts\deploy.py", line 221, in <module>
    main(**vars(args))
    ~~~~^^^^^^^^^^^^^^
  File "D:\a\JabRefOnline\JabRefOnline\.github\scripts\deploy.py", line 181, in main
    web_client.static_sites.detach_user_provided_function_app_from_static_site_build(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        resource_group_name=GROUP_NAME,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        function_app_name=app.name,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\hostedtoolcache\windows\Python\3.13.2\x64\Lib\site-packages\azure\core\tracing\decorator.py", line 119, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "C:\hostedtoolcache\windows\Python\3.13.2\x64\Lib\site-packages\azure\mgmt\web\v2024_04_01\operations\_static_sites_operations.py", line 6173, in detach_user_provided_function_app_from_static_site_build
    map_error(status_code=response.status_code, response=response, error_map=error_map)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\hostedtoolcache\windows\Python\3.13.2\x64\Lib\site-packages\azure\core\exceptions.py", line 163, in map_error
    raise error
azure.core.exceptions.ResourceNotFoundError: Operation returned an invalid status 'Not Found'
Content: {"Code":"NotFound","Message":"Resource Not Found","Target":null,"Details":null,"Innererror":null}

In this case, just continue by trying to create a new function app (which then might still fail)

@tobiasdiez tobiasdiez merged commit 86a6ade into main Apr 8, 2025
4 of 5 checks passed
@tobiasdiez tobiasdiez deleted the fix-deploy branch April 8, 2025 11:37
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant