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

Make it possible to disable all functions in a function app except a few specified ones #9229

Open
jaltin opened this issue Apr 25, 2023 · 9 comments

Comments

@jaltin
Copy link

jaltin commented Apr 25, 2023

I have a c# function app that has over 30 functions.

I have the need to disable ALL functions EXCEPT one or a few specific functions that I want running.

An example of this is when I want to develop a new function in the function app, and I am running/testing the app locally. During this time I want to prevent all the other functions to fire off as it has undesired effects.

I know that there is the option to disable functions one by one in the local.settings.json file (https://learn.microsoft.com/en-us/azure/azure-functions/disable-function?tabs=portal#localsettingsjson) such as this:

{ "IsEncrypted": false, "Values": { "AzureWebJobs.HttpExample.Disabled": true } }

But this is not really a valid approach when there are many functions in the app (it becomes unmanageable).

What I would LOVE to see is the following:

  • An app wide setting "DISABLE_ALL_FUNCTIONS" that disables all the functions in the app
  • The possibility to then enable specific functions. We could use the [Functionname].Disabled?

It could look like this:

{ "IsEncrypted": false, "Values": { "DISABLE_ALL_FUNCTIONS": true "AzureWebJobs.HttpExample.Disabled": false, "AzureWebJobs.QueueExample.Disabled": false } }

@ghost ghost assigned satvu Apr 25, 2023
@satvu satvu removed their assignment Jun 5, 2023
@bhagyshricompany bhagyshricompany self-assigned this Aug 28, 2023
@bhagyshricompany
Copy link

Thanks for informing pls refer this link https://learn.microsoft.com/en-us/azure/azure-functions/disable-function?tabs=portal

@bhagyshricompany
Copy link

#2412 pls refer this link

@jaltin
Copy link
Author

jaltin commented Aug 29, 2023

Hi @bhagyshricompany,

Thanks for the links. However, it seems to me that those does not achieve what I suggested in the issue description.

@bhagyshricompany
Copy link

pls raise the support request on azure portal.Thanks

@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

If you are not the original author (jaltin) and believe this issue is not stale, please comment with /bot not-stale and I will not close it.

@jaltin
Copy link
Author

jaltin commented Sep 4, 2023

pls raise the support request on azure portal.Thanks

@bhagyshricompany what do you mean when you say I should raise a support request?

This is a suggestion for a new feature/functionality and i thought that was more appropriate to post here than a support request?

@bhagyshricompany
Copy link

I appreciated your contribution will add this for future release.

@campbellja
Copy link

Very interested in seeing this feature implementation through as my team needs to disable timer trigger functions within staging slots.

@qcnguyen
Copy link

qcnguyen commented Dec 28, 2023

this can be done with [Disable] Attribute in in-process mode, if you group the functions under 1 class , then put the [Disable] on the class level.
But in Isolated-worker mode, it doesn't have [Disable] Attribute, so we can't achieve the goal.
I have added the request in #9751

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

5 participants