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

Bug: Triggers' EventGrid subscriptions are not re-created #707

Open
sherman89 opened this issue Jan 1, 2025 · 0 comments
Open

Bug: Triggers' EventGrid subscriptions are not re-created #707

sherman89 opened this issue Jan 1, 2025 · 0 comments

Comments

@sherman89
Copy link

sherman89 commented Jan 1, 2025

I ran into an issue where I deleted my existing storage account (which include all EventGrid subscriptions) but when I ran my Azure Data Factory CI/CD pipeline the subscriptions were not recreated.

When I renamed all of my triggers and ran the devops pipeline again, I saw the subscriptions again in my storage account page under "Events".

This seems like a bug to me because ARM templates deployment scripts should always bring the resource to the correct state no matter how much it is fiddled with in the portal.

I got a hunch that this was the issue when I saw this in the "Disable Triggers" step logs:

Comparing 'XXX' trigger payload
No change detected in 'XXX' trigger payload

Then I went to check the documentation (here & here) and saw this:

Use the PrePostDeploymentScript.Ver2.ps1 if you would like to turn off/ on only the triggers that have been modified instead of turning all triggers off/ on during CI/CD.

But it's not true! There is no V1 and V2, there is only one PrePostDeploymentScript.ps1 and the contents match the V2 one in Github (except for some tiny irrelevant changes) so the documentation has to be updated to reflect this.

There is no way to turn off/on all triggers, only modified ones. I'm not sure if this would even fix the problem since I don't know if it would re-create the event subscriptions, but I think it should?

I'm using version 1.0.2 of @microsoft/azure-data-factory-utilities

I think some solutions/improvements here would be:

  • Easiest: add "Re-create triggers" parameter to force re-creating triggers. Then we can pass it from the Azure DevOps pipeline in situations like this, but leave it off by default.
  • Best?: Ensure that event subscriptions exist when running deployment script, and if not, create them. The script was responsible for creating them in the first place, so it should also ensure they're there.

It's quite common (and good practice) to destroy all resources then create them again using deployment scripts to test that the devops pipeline is working correctly.

Thanks! 🙂

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

No branches or pull requests

1 participant