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

Fix topological sort to take into account defaultProvider. #652

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

brandonpollack23
Copy link
Contributor

@brandonpollack23 brandonpollack23 commented Sep 25, 2024

The topological sort will not sort default providers first as is, so
this adds in a check to detect it and not allow implicit providers to be
complete until the default provider is declared.

Handle multiple default providers for different packages.

Also added a test to test topological sort works correctly.

@brandonpollack23 brandonpollack23 requested a review from a team as a code owner September 25, 2024 06:36
@brandonpollack23 brandonpollack23 changed the title Bpollack/default provider sorting 604 Fix topological sort to take into account defaultProvider. Sep 25, 2024
@brandonpollack23 brandonpollack23 force-pushed the bpollack/default_provider_sorting_604 branch from 74643ed to 2266d11 Compare September 25, 2024 06:44
@brandonpollack23 brandonpollack23 force-pushed the bpollack/default_provider_sorting_604 branch 2 times, most recently from 937b4f1 to 6f23208 Compare September 25, 2024 07:46
@Frassle
Copy link
Member

Frassle commented Sep 25, 2024

sorry local tool messups, had to recreate PR

Copy the original description to the PR description. Put comments like that in comments, it doesn't need to merge to git history when we merge this.

The topological sort will not sort default providers first as is, so
this adds in a check to detect it and not allow implicit providers to be
complete until the default provider is declared.
Bug: #604

Remote-Ref: brandonpollack23/f91181f4
Also added a test to test topological sort works correctly.

       Bug: #643
Remote-Ref: brandonpollack23/e8219876
@brandonpollack23 brandonpollack23 force-pushed the bpollack/default_provider_sorting_604 branch from 6f23208 to 606229a Compare September 27, 2024 00:57
pkg/pulumiyaml/sort.go Outdated Show resolved Hide resolved
@brandonpollack23 brandonpollack23 merged commit d574b2b into main Sep 30, 2024
6 checks passed
@brandonpollack23 brandonpollack23 deleted the bpollack/default_provider_sorting_604 branch September 30, 2024 06:50
@justinvp
Copy link
Member

Does this fix #604?

FYI, for future reference, if you include Fixes #604 in the PR description, when the PR is merged, it will automatically close the linked issue.

@pulumi-bot
Copy link

This PR has been shipped in release v1.11.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.

4 participants