As of r338, Functions is in Production Early Access. To request access, contact your Customer Success manager.
Read more in the Community thread here.
Changes to inputs or outputs
Adding, removing, or renaming inputs and outputs requires changes to app trigger actions that call the function.
Follow this process to change a function signature:
- Design the input and output structure carefully before you adopt the function widely.
- Inputs: When you create a function to create a new table record, consider all typical columns that the function should populate upon record creation, not just the columns for the first use case.
- Outputs: Common outputs you may build into a function include:
- Record IDs of table records that the function creates
- Operator-visible messages (set into a variable by the function logic)
- Notify all app builders before you make changes.
- Update the function systematically:
- Change the function.
- Test the function with the Test button using representative inputs.
- Test the function in one development app end-to-end.
- Update each app to map new inputs and outputs.
- As of r351, there is limited visibility regarding where a function is used (both which apps and where within an app). From an app's Versions tab, you can see what functions a version uses.
- For apps that use a function, click the View errors button in the app editor. A modal displays any function references in the app that are broken.
- Test each app in developer mode.
- Publish the apps.
Alternative approach for major changes
Create a new function with an updated signature and migrate apps gradually:
- Create a new function version with new inputs (for example, CreateSample_v2).
- Migrate high-priority apps to the new version.
- Migrate remaining apps over time.
- Deprecate and archive the old function version.
Change internal function logic
Changes to internal function logic (decision trees, calculations, table operations) do not break apps. However, you need to publish apps with a new version to associate the new function logic.
Follow this process:
- Update the function logic.
- Test the function with the Test button using representative inputs.
- Test the function in one development app end-to-end.
- Publish a new version of the apps to associate with the updated function.
- Monitor production apps for unexpected behavior.
Best practice: Use an approval workflow procedure for functions used in production apps.
Additional Resources
Did you find what you were looking for?
You can also head to community.tulip.co to post your question or see if others have solved a similar topic!
