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

[Internal] Generate models with correctly computed annotations #4316

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

rauchy
Copy link
Contributor

@rauchy rauchy commented Dec 12, 2024

Changes

In this PR, we've tackled an issue with our plugin framework models. Previously, fields that were meant to be computed were mistakenly generated with "computed,optional" annotations instead of just "computed."
Also, if any fields were indicated as having effective values, the effective fields also ended up with the wrong "computed,optional" tag rather than the correct "computed." We've regenerated the models to correct these annotations.

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

@rauchy rauchy requested review from a team as code owners December 12, 2024 12:49
@rauchy rauchy requested review from mgyucht and removed request for a team December 12, 2024 12:49
@rauchy rauchy temporarily deployed to test-trigger-is December 12, 2024 12:49 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 12, 2024 12:49 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 12, 2024 14:47 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 12, 2024 14:48 — with GitHub Actions Inactive
@rauchy rauchy force-pushed the deco-24178-correct-tfsdk-computed-annotations branch from f266d69 to f937d0b Compare December 12, 2024 14:50
@rauchy rauchy temporarily deployed to test-trigger-is December 12, 2024 14:50 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 12, 2024 14:50 — with GitHub Actions Inactive
@rauchy rauchy force-pushed the deco-24178-correct-tfsdk-computed-annotations branch from f937d0b to 86e7b5a Compare December 13, 2024 08:51
@rauchy rauchy temporarily deployed to test-trigger-is December 13, 2024 08:51 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 13, 2024 08:52 — with GitHub Actions Inactive
@rauchy rauchy force-pushed the deco-24178-correct-tfsdk-computed-annotations branch from 86e7b5a to 142688e Compare December 13, 2024 10:00
@rauchy rauchy temporarily deployed to test-trigger-is December 13, 2024 10:00 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 13, 2024 10:00 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 13, 2024 10:12 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 13, 2024 10:12 — with GitHub Actions Inactive
@rauchy rauchy force-pushed the deco-24178-correct-tfsdk-computed-annotations branch from 6fc5a49 to 4255937 Compare December 13, 2024 11:31
@rauchy rauchy temporarily deployed to test-trigger-is December 13, 2024 11:31 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is December 13, 2024 11:31 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/12314865729

Copy link
Contributor

@mgyucht mgyucht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question.

// The deployment artifacts for an app.
DeploymentArtifacts types.Object `tfsdk:"deployment_artifacts" tf:"optional,object"`
DeploymentArtifacts types.Object `tfsdk:"deployment_artifacts" tf:"computed,object"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was optional before but now is computed non-optional. Is that expected?

@rauchy rauchy temporarily deployed to test-trigger-is December 16, 2024 10:18 — with GitHub Actions Inactive
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 4316
  • Commit SHA: f53cacde725eb619cd0c80f09c9c3d71b798bc2a

Checks will be approved automatically on success.

@rauchy rauchy temporarily deployed to test-trigger-is December 16, 2024 10:19 — with GitHub Actions Inactive
@rauchy rauchy enabled auto-merge December 16, 2024 10:26
@rauchy rauchy disabled auto-merge December 16, 2024 14:27
@rauchy rauchy enabled auto-merge December 16, 2024 14:27
@rauchy rauchy disabled auto-merge December 16, 2024 16:53
@rauchy rauchy merged commit f716018 into main Dec 16, 2024
11 checks passed
@rauchy rauchy deleted the deco-24178-correct-tfsdk-computed-annotations branch December 16, 2024 16:53
hectorcast-db added a commit that referenced this pull request Dec 18, 2024
### New Features and Improvements

 * Allow to use GCP SA in `databricks_credential` (storage only) ([#4302](#4302)).

### Bug Fixes

 * Bump Golang x/crypto to 0.31 ([#4319](#4319)).

### Internal Changes

 * Generate models with correctly computed annotations ([#4316](#4316)).
 * Update Go SDK to 0.54.0 ([#4328](#4328)).

### Dependency Updates

 * Bump github.com/hashicorp/terraform-plugin-framework-validators from 0.15.0 to 0.16.0 ([#4320](#4320)).

### Exporter

 * Correctly handle DB-managed UC objects ([#4323](#4323)).
 * Emit WSFS/UC files from `parameters` in the jobs ([#4318](#4318)).
 * Improve support of `databricks_model_serving` ([#4324](#4324)).
 * add support for `databricks_credential` ([#4292](#4292)).
 * export `databricks_repo` for Git Folders outside of `/Repos` ([#4308](#4308)).
hectorcast-db added a commit that referenced this pull request Dec 18, 2024
 * Allow to use GCP SA in `databricks_credential` (storage only) ([#4302](#4302)).

 * Bump Golang x/crypto to 0.31 ([#4319](#4319)).

 * Generate models with correctly computed annotations ([#4316](#4316)).
 * Update Go SDK to 0.54.0 ([#4328](#4328)).

 * Bump github.com/hashicorp/terraform-plugin-framework-validators from 0.15.0 to 0.16.0 ([#4320](#4320)).

 * Correctly handle DB-managed UC objects ([#4323](#4323)).
 * Emit WSFS/UC files from `parameters` in the jobs ([#4318](#4318)).
 * Improve support of `databricks_model_serving` ([#4324](#4324)).
 * add support for `databricks_credential` ([#4292](#4292)).
 * export `databricks_repo` for Git Folders outside of `/Repos` ([#4308](#4308)).
github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2024
### New Features and Improvements

* Allow to use GCP SA in `databricks_credential` (storage only)
([#4302](#4302)).
 * Support for databricks_credential in databricks_workspace_binding


### Bug Fixes

* Bump Golang x/crypto to 0.31
([#4319](#4319)).


### Internal Changes

* Generate models with correctly computed annotations
([#4316](#4316)).
* Update Go SDK to 0.54.0
([#4328](#4328)).


### Dependency Updates

* Bump github.com/hashicorp/terraform-plugin-framework-validators from
0.15.0 to 0.16.0
([#4320](#4320)).


### Exporter

* Correctly handle DB-managed UC objects
([#4323](#4323)).
* Emit WSFS/UC files from `parameters` in the jobs
([#4318](#4318)).
* Improve support of `databricks_model_serving`
([#4324](#4324)).
* add support for `databricks_credential`
([#4292](#4292)).
* export `databricks_repo` for Git Folders outside of `/Repos`
([#4308](#4308)).
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

Successfully merging this pull request may close these issues.

3 participants