SumoLogic / sumologic-azure-function

A collection of Azure functions to collect data and send to Sumo Logic cloud service
Apache License 2.0
8 stars 26 forks source link

Build and package BlockBlobReader functions when tagging releases to support zip deployment #95

Closed bradleyjford closed 7 months ago

bradleyjford commented 7 months ago

We are unable to use App Service's source control sync for the build and deployment of the BlockBlobReader Azure Functions and instead are using zip-based deployments. We cannot use the source code artifacts produced when a GitHub release is created as these are missing the node_modules required at runtime.

It appears that .zip packages were previously created (blobreaderzipdeploy.json) but I am unable to find any packages other than the initial 1.0.0 versions.

This PR updates the npm-publish-github-packages.yml GitHub Actions workflow to automatically build and individually package the BlockBlobReader Azure Functions into .zip files that can be used when deploying via ZIP deploy. The additional step is based on the existing create_zip.sh script, however, instead of uploading the packages to an external service, they are added as additional GitHub release artifacts.

e.g. image

bradleyjford commented 7 months ago

Thanks for reviewing/merging @himanshu219. Would it be possible for a new tag to be pushed to trigger the workflow and generate the function packages?

himanshu219 commented 7 months ago

yes that's the plan , we identified a bug and will be incorporating a fix similar to https://github.com/SumoLogic/sumologic-azure-function/pull/96 in blob reader as well. Then we will release a new tag. If you want I can push a tag with candidate release (v4.1.0-rc) to unblock you guys.

bradleyjford commented 7 months ago

yes that's the plan , we identified a bug and will be incorporating a fix similar to https://github.com/SumoLogic/sumologic-azure-function/pull/96 in blob reader as well. Then we will release a new tag.

👍

If you want I can push a tag with candidate release (v4.1.0-rc) to unblock you guys.

That would be great, thanks.

himanshu219 commented 7 months ago

@bradleyjford we have published the tags https://github.com/SumoLogic/sumologic-azure-function/releases/tag/v4.1.0-rc Also fyi, github artifacts are preserved only for 90 days by default I was wondering whether you guys are using the github artifact url directly in the arm template or storing the zip files somewhere else and then using it's url.

bradleyjford commented 6 months ago

@himanshu219 I believe the 90 day retention applies only to workflow artifacts that this is using to pass the packages between steps. When the release is created, these packages are attached/re-uploaded as assets. I believe these assets get retained indefinitely (I haven't been able to find anything that suggests otherwise).

For example, see this release; the assets in this release were created in Jan 2023 and still available for download.

We are currently referencing zip files in the ARM template.

himanshu219 commented 6 months ago

Thanks for clarification! we can then use the same artifact url for our zip templates also.

bradleyjford commented 5 months ago

@himanshu219 Do you have an ETA for a non-RC release package?

himanshu219 commented 4 months ago

@bradleyjford we have released 4.1.0