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

Remove remove-ephemeral-resources.patch #5339

Merged
merged 3 commits into from
Mar 19, 2025

Conversation

guineveresaenger
Copy link
Contributor

This pull request combines new bridge functionality and an attribute traversal to automate omitting any of the kind of write-only and write-only-adjacent resources that a patch addressed previously.

While there's a bit of metadata tracking cruft due to the attribute traversal wanting build-time information, the schema itself has no changes.

Fixes #5231.

  • Remove Remove-ephemeral-resources.patch and reformat patches
  • Traverse properties and filter write-only supporting ones, then Omit them
  • Using bridge-supported traversal implies some metadata tracking

@guineveresaenger guineveresaenger force-pushed the guin/remove-write-only-patch branch from a4343d5 to e21aa4e Compare March 18, 2025 22:35
@guineveresaenger guineveresaenger requested a review from a team March 18, 2025 22:37
Copy link

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.

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.31%. Comparing base (0d2dc2f) to head (e21aa4e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5339      +/-   ##
==========================================
- Coverage   24.36%   24.31%   -0.05%     
==========================================
  Files         364      364              
  Lines      145472   145577     +105     
==========================================
- Hits        35448    35401      -47     
- Misses     109925   110077     +152     
  Partials       99       99              

☔ View full report in Codecov by Sentry.
📢 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.

func(propertyVisitInfo tfbridge.PropertyVisitInfo) (tfbridge.PropertyVisitResult, error) {
schemaPath := propertyVisitInfo.SchemaPath()
if key, ok := schemaPath[len(schemaPath)-1].(walk.GetAttrStep); ok {
if strings.Contains(key.Name, "_wo_") || strings.HasSuffix(key.Name, "_wo") {
Copy link
Member

Choose a reason for hiding this comment

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

I like this, this seems reasonable. If we are worried that this will over-eagerly skip a property that does not need skipping, we can add a file with a checklist of removed properties, say (resource, SchemaPath) pairs and force PRs to change that, perhaps in a test.

@@ -1,1002 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: guineveresaenger <guinevere@pulumi.com>
Copy link
Member

Choose a reason for hiding this comment

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

Nice.

Copy link
Member

@t0yv0 t0yv0 left a comment

Choose a reason for hiding this comment

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

This LGTM.

@guineveresaenger guineveresaenger merged commit eb234ea into master Mar 19, 2025
23 checks passed
@guineveresaenger guineveresaenger deleted the guin/remove-write-only-patch branch March 19, 2025 17:11
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v6.73.0.

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.

PATCH 0085-Remove-ephemeral-resources.patch
3 participants