To reproduce
- Create a SendGrid integration with just an id (no API key) and reference it in a Job.
- Save and check it's appeared in the dashboard
- You'll notice that on the integrations page it says it requires action. Don't do anything there.
- Then go back to your code and add
apiKey: process.env.SENDGRID_API_KEY to the definition.
- Save so it syncs
When you go back to the dashboard and refresh, the integration is in the errored state still and is stuck. When you click it you go to a blank panel.
Solution
We need to set the setupStatus to "COMPLETE" when upserting LOCAL or AUTH_RESOLVER integration types.
TRI-1575