Skip to content

Migrate DeploymentSettings to infer - #835

Draft
iwahbe wants to merge 2 commits into
mainfrom
iwahbe/migrate-deployment-settings
Draft

Migrate DeploymentSettings to infer#835
iwahbe wants to merge 2 commits into
mainfrom
iwahbe/migrate-deployment-settings

Conversation

@iwahbe

@iwahbe iwahbe commented May 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Migrates the DeploymentSettings resource from the manual gRPC framework to the infer framework.
  • Regenerates SDKs from the updated schema (Node.js, Python, Go, .NET, Java).

Notes

  • All nested types (DeploymentSettingsGithub, DeploymentSettingsVcs, OperationContextOptions, OperationContextOIDC, AWSOIDCConfiguration, GCPOIDCConfiguration, AzureOIDCConfiguration) keep their original schema tokens via SetToken, so the public surface is unchanged.
  • Secret handling is simplified relative to the legacy dual plaintext/cipher dance: inputs hold plaintext (provider:"secret"), and Read falls back to the previously-known plaintext when the API returns ciphertext, so refresh on an unchanged secret does not appear to drift.
  • The Check method normalizes the AWS OIDC duration field to the canonical 1h0m0s form, matching the legacy behavior.

Test plan

  • make provider (schema regen)
  • make build_sdks
  • go test ./... in provider/pkg
  • make lint (provider, sdk, examples)
  • CI integration tests

@github-actions

Copy link
Copy Markdown
Contributor

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

@codecov

codecov Bot commented May 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 38.98678% with 277 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.47%. Comparing base (060bb9a) to head (9cff04b).

Files with missing lines Patch % Lines
provider/pkg/resources/deployment_settings.go 38.85% 265 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #835      +/-   ##
==========================================
+ Coverage   53.93%   55.47%   +1.53%     
==========================================
  Files          82       82              
  Lines        9537     9379     -158     
==========================================
+ Hits         5144     5203      +59     
+ Misses       3946     3736     -210     
+ Partials      447      440       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@iwahbe

iwahbe commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Metabase confirms that a __inputs migration isn't necessary.

@iwahbe
iwahbe force-pushed the iwahbe/migrate-deployment-settings branch 2 times, most recently from 494fb7a to 137eab6 Compare June 9, 2026 16:25
Replaces the manual `PulumiServiceDeploymentSettingsResource` implementation
with an infer-based resource.

The nested types (executor/source/git/github/vcs/operation/oidc/cache) are
re-declared as Go structs. SetToken is used on each nested type so the public
schema token names remain stable (`DeploymentSettingsGithub`,
`DeploymentSettingsVcs`, `OperationContextOptions`, `OperationContextOIDC`,
`AWSOIDCConfiguration`, `GCPOIDCConfiguration`, `AzureOIDCConfiguration`).

Secret values are surfaced via `provider:"secret"` field tags. The legacy
dual plaintext/cipher dance is replaced by a simpler model: inputs hold the
user-supplied plaintext, and on Read we fall back to the previously-known
plaintext (preserving infer's intent that input drift detection remains
meaningful when the API only returns ciphertext). `sourceContext.git.gitAuth`
is write-only — Pulumi Cloud does not echo it on read — so Read preserves the
previously-declared gitAuth instead of reconstructing it, preventing a
spurious `sourceContext` diff on refresh.

The Check method normalizes AWS OIDC `duration` strings to the canonical
`XhYmZs` form, matching the legacy behavior.

SDKs regenerated from the updated schema.
@iwahbe
iwahbe force-pushed the iwahbe/migrate-deployment-settings branch from 137eab6 to 9cff04b Compare June 10, 2026 08:30
@iwahbe iwahbe added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact/no-changelog-required This issue doesn't require a CHANGELOG update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant