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

Marked colab notebook execution tests that rely on dataform as min_version beta #13003

Merged
merged 2 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mmv1/products/colab/NotebookExecution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ examples:
ignore_read_extra:
- direct_notebook_source.0.content
- name: 'colab_notebook_execution_full'
min_version: beta
primary_resource_id: 'notebook-execution'
vars:
notebook_execution_job_id: 'colab-notebook-execution'
Expand All @@ -54,6 +55,7 @@ examples:
project_id: 'PROJECT_NAME'
service_account: 'SERVICE_ACCT'
- name: 'colab_notebook_execution_dataform'
min_version: beta
primary_resource_id: 'notebook-execution'
primary_resource_name: 'fmt.Sprintf("tf-test-colab-notebook-execution%s", context["random_suffix"])'
bootstrap_iam:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
resource "google_colab_runtime_template" "my_runtime_template" {
provider = google-beta
name = "{{index $.Vars "runtime_template_name"}}"
display_name = "Runtime template"
location = "us-central1"
Expand All @@ -13,13 +14,15 @@ resource "google_colab_runtime_template" "my_runtime_template" {
}

resource "google_storage_bucket" "output_bucket" {
provider = google-beta
name = "{{index $.Vars "bucket"}}"
location = "US"
force_destroy = true
uniform_bucket_level_access = true
}

resource "google_secret_manager_secret" "secret" {
provider = google-beta
secret_id = "{{index $.Vars "secret"}}"

replication {
Expand All @@ -28,12 +31,14 @@ resource "google_secret_manager_secret" "secret" {
}

resource "google_secret_manager_secret_version" "secret_version" {
provider = google-beta
secret = google_secret_manager_secret.secret.id

secret_data = "secret-data"
}

resource "google_dataform_repository" "dataform_repository" {
provider = google-beta
name = "{{index $.Vars "dataform_repository"}}"
display_name = "dataform_repository"
npmrc_environment_variables_secret_version = google_secret_manager_secret_version.secret_version.id
Expand All @@ -58,6 +63,7 @@ resource "google_dataform_repository" "dataform_repository" {
}

resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" {
provider = google-beta
display_name = "Notebook execution Dataform"
location = "us-central1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
resource "google_colab_runtime_template" "my_runtime_template" {
provider = google-beta
name = "{{index $.Vars "runtime_template_name"}}"
display_name = "Runtime template"
location = "us-central1"
Expand All @@ -13,13 +14,15 @@ resource "google_colab_runtime_template" "my_runtime_template" {
}

resource "google_storage_bucket" "output_bucket" {
provider = google-beta
name = "{{index $.Vars "bucket"}}"
location = "US"
force_destroy = true
uniform_bucket_level_access = true
}

resource "google_storage_bucket_object" "notebook" {
provider = google-beta
name = "hello_world.ipynb"
bucket = google_storage_bucket.output_bucket.name
content = <<EOF
Expand Down Expand Up @@ -61,6 +64,7 @@ resource "google_storage_bucket_object" "notebook" {
}

resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" {
provider = google-beta
notebook_execution_job_id = "{{index $.Vars "notebook_execution_job_id"}}"
display_name = "Notebook execution full"
location = "us-central1"
Expand Down
Loading