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

🚀 Feature: Enable / Disable Functions from Console #6878

Open
2 tasks done
ItzNotABug opened this issue Oct 10, 2023 · 2 comments
Open
2 tasks done

🚀 Feature: Enable / Disable Functions from Console #6878

ItzNotABug opened this issue Oct 10, 2023 · 2 comments
Labels
product / console Console, UI and UX issues product / functions Fixes and upgrades for the Appwrite Functions.

Comments

@ItzNotABug
Copy link
Contributor

🔖 Feature description

This Server Side SDK for Functions has this param enabled on method functions.update(...) but the console does not have a UI component to toggle this behaviour.


On a side note, the docs say -

ENABLED boolean

Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.

This doesn't include info. if the Function will be triggered by Events or Cron or only by the Server Side SDKs with an API Key.

🎤 Pitch

As discussed about the usecase on Discord -

Usecase: A normal function is exposed to be used on production, receives events, requests and what not.

Now if you want to test another function that receives similar events, the one in production will be executed on test values / useless event data.

More discussion here.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@stnguyen90 stnguyen90 added product / functions Fixes and upgrades for the Appwrite Functions. product / console Console, UI and UX issues labels Oct 11, 2023
@stnguyen90
Copy link
Contributor

@ItzNotABug thanks for raising this issue! 🙏🏼

Now if you want to test another function that receives similar events, the one in production will be executed on test values / useless event data.

To prevent a function from executing on an event, I would recommend removing the events from the function.

@stnguyen90 stnguyen90 changed the title 🚀 Feature: [Console] Enable / Disable Functions from Console 🚀 Feature: Enable / Disable Functions from Console Oct 11, 2023
@ItzNotABug
Copy link
Contributor Author

@stnguyen90 That'd work if there's like one or two event. Not feasible if there are multiple sets of event attached to a Function.

Also it'd be a hassle to note down the events before removing them, so that correct events can be re-added later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product / console Console, UI and UX issues product / functions Fixes and upgrades for the Appwrite Functions.
Projects
None yet
Development

No branches or pull requests

2 participants