I'm working on setting up a CI/CD pipeline that automatically updates the Release configuration in GCP Dataform by compiling dataform.json
whenever branches are merged into the main branch on GitHub. I'm encountering an issue where after the automated update, I cannot run executions within Dataform.
The documentation I've referenced includes:
- Release configurations in Dataform
- Compilation overrides in Dataform
- CompilationResult REST Resource
Using the following curl
command, I successfully create a new compilation result:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://dataform.googleapis.com/v1beta1/projects/my-project/locations/us-west1/repositories/my-repo/compilationResults" \
--data '{
"gitCommitish": "main",
}'
This command correctly informs me of the new compilation result name. I then use this output to patch my Release:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
--data '{
"gitCommitish": "main",
"releaseCompilationResult": "projects/my-project/locations/us-west1/repositories/my-repo/compilationResults/{{ NEW COMPILATION RESULT ID }}"
}' \
"https://dataform.googleapis.com/v1beta1/projects/my-project/locations/us-west1/repositories/my-repo/releaseConfigs/my-release-config"
While this process does update the target Release Config, I can no longer initiate runs in Dataform; the UI button for running actions becomes non-responsive. However, if I manually generate a new compilation, everything returns to normal, and I'm able to run executions again.
Here are my questions:
- What additional steps are required to ensure the Release config update allows for normal execution runs?
- Is there a specific part of the automated update process that differs from the manual process, which could be causing this issue?
Any insights or guidance would be greatly appreciated!