unable to perform CD using github actions for MLops

jose_db_aws
New Contributor III

Hi, 

I am new to databricks and MLOPS as well. I am trying out the databricks asset bundles mlops tutorial at https://docs.databricks.com/en/dev-tools/bundles/mlops-stacks.html

my cloud account is using AWS. I had asked to setup FS and Model Registry in UC. I had also asked for CICD setup using github actions. Everything is setup nicely. I have a local repo. I also have a remote github repo. I also have databricks workspace. 

My file structure looks like the following.

jose_db_aws_0-1721042139398.png

My DB workspace File structure is :

jose_db_aws_0-1721043189198.png

 

When I run "databricks bundle validate -t staging" from my local terminal it seems to output correctly as below.

jose_db_aws_1-1721042263883.png

However, this is also part of the CD workflow as shown in "mbs_db_mlops-bundle-cd-staging.yml" file in the earlier image above. I have setup github secrets for this DB workspace as well.

The CD workflow in github actions fails at "databricks bundle validate -t staging" when I push the "main" branch to remote. 

jose_db_aws_2-1721042559490.png

It works locally but not from github actions. How do I fix this? I want this to pass. 

 

 

 

jose_db_aws
New Contributor III

The problem was with the secrets at github actions were different from the Personal access token that I had set as my environment variable, DATABRICKS_TOKEN locally. After I copied this over the github's STAGING_WORKSPACE_TOKEN it is able to run the jobs.

View solution in original post