Skip to content

Preserve spec-form aliases on components - #581

Merged
iwahbe merged 1 commit into
masterfrom
iwahbe/fix-provider-alias-component
Aug 25, 2026
Merged

Preserve spec-form aliases on components#581
iwahbe merged 1 commit into
masterfrom
iwahbe/fix-provider-alias-component

Conversation

@iwahbe

@iwahbe iwahbe commented Aug 25, 2026

Copy link
Copy Markdown
Member

Fixes #543.

pulumi-go-provider v1.6.0 (pulumi/pulumi-go-provider#574) changes ConstructRequest.Aliases from []resource.URN to []resource.Alias, so spec-form aliases (name, type, project, stack, parent, noParent) are no longer silently dropped before they reach the language host. This PR upgrades to v1.6.0 and forwards the full alias on the component's own registration by replacing aliasURNsToProto with aliasesToProto, mirroring the run-side conversion in server.go.

No child-alias propagation is needed: once the component itself matches its old resource via the alias, the engine's step generator multiplies parent aliases onto children (generateAliases/inheritedChildAlias), so the component's children are preserved as well.

Un-parks the provider-alias-component conformance test, which passes both runs.

Fixes #543.

pulumi-go-provider v1.6.0 (pulumi/pulumi-go-provider#574) changes
ConstructRequest.Aliases from []resource.URN to []resource.Alias, so
spec-form aliases (name, type, project, stack, parent, noParent) are no
longer silently dropped before they reach the language host. Forward
the full alias on the component's own registration by replacing
aliasURNsToProto with aliasesToProto, mirroring the run-side conversion
in server.go.

No child-alias propagation is needed: once the component itself matches
its old resource via the alias, the engine's step generator multiplies
parent aliases onto children (generateAliases/inheritedChildAlias), so
the component's children are preserved as well.

Un-parks the provider-alias-component conformance test, which passes
both runs.
@iwahbe
iwahbe requested a review from a team as a code owner August 25, 2026 10:17

@unblocked unblocked Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found.

About Unblocked

Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.

📖 Documentation — Learn more in our docs.

💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions.

👍 Give feedback — React to comments with 👍 or 👎 to help us improve.

⚙️ Customize — Adjust settings in your preferences.

time: 2026-08-25T10:17:19Z
custom:
Component: runtime
PR: "543"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The PR field should be the GitHub PR number that ships the change (581), not the issue number (543).

Suggested change
PR: "543"
PR: "581"

Based on CONTRIBUTING.md

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.31%. Comparing base (f9dda0a) to head (eb322b2).

Files with missing lines Patch % Lines
pkg/server/module_resource.go 72.22% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #581      +/-   ##
==========================================
+ Coverage   79.29%   79.31%   +0.01%     
==========================================
  Files          93       93              
  Lines       19502    19514      +12     
==========================================
+ Hits        15465    15478      +13     
+ Misses       2817     2815       -2     
- Partials     1220     1221       +1     

☔ 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 merged commit 4cffc79 into master Aug 25, 2026
18 of 19 checks passed
@iwahbe
iwahbe deleted the iwahbe/fix-provider-alias-component branch August 25, 2026 10:43
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.

Aliased components are recreated instead of preserved: component aliases are not propagated to children

1 participant