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

Resolves #46 Support authoring multi-language components in .NET #275

Conversation

algompluecker
Copy link
Contributor

No description provided.

@algompluecker algompluecker requested a review from a team as a code owner June 6, 2024 13:40
@algompluecker algompluecker marked this pull request as draft June 6, 2024 13:43
@algompluecker algompluecker force-pushed the martinp/issue46-support-multi-lanugage-components branch from 63407a1 to 485382f Compare June 6, 2024 13:49
@algompluecker algompluecker changed the title Support authoring multi-language components in .NET Fixes #46 Support authoring multi-language components in .NET Jun 6, 2024
@algompluecker algompluecker changed the title Fixes #46 Support authoring multi-language components in .NET Resolves #46 Support authoring multi-language components in .NET Jun 6, 2024
Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

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

We'll definitely want an integration test for this.

sdk/Pulumi/Provider/PropertyDependencies.cs Outdated Show resolved Hide resolved
sdk/Pulumi/Provider/Provider.cs Outdated Show resolved Hide resolved
sdk/Pulumi/Provider/Provider.cs Outdated Show resolved Hide resolved
@algompluecker
Copy link
Contributor Author

algompluecker commented Jun 7, 2024

I have done some refactoring in order to prepare integration tests in another PR: PR 277

@algompluecker
Copy link
Contributor Author

I have implemented integration tests now. Please have a look.

@algompluecker algompluecker marked this pull request as ready for review June 21, 2024 07:16
…rt-multi-lanugage-components

# Conflicts:
#	sdk/Pulumi.Tests/Provider/ProviderServerTestHost.cs
…rt-multi-lanugage-components

# Conflicts:
#	sdk/Pulumi.Tests/Resources/CustomTimeoutsTests.cs
#	sdk/Pulumi/Resources/CustomTimeouts.cs
@algompluecker
Copy link
Contributor Author

Hi,

I have finalized this PR. Integration tests have been added and are passing.
We have done an internal code review and applied required fixes.

@Frassle @Zaid-Ajaj can you please do a final review?

I can't wait to see this being shipped :)

Frassle added a commit that referenced this pull request Sep 5, 2024
Noticed while reviewing
#275. We called this helper
`Marshal` but it's actually `Unmarshalling` a PropertyValue from it's
wire encoding.
@@ -10,7 +10,7 @@ internal interface IDeploymentInternal : IDeployment
string? GetConfig(string fullKey);
bool IsConfigSecret(string fullKey);

Stack Stack { get; set; }
Stack? Stack { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

Really? Shouldn't we always have a stack

Copy link
Contributor

Choose a reason for hiding this comment

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

Not with MLCs, I remember having to do the same when I built the PoC

Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure this will lead to issue where Parent isn't explicitly set. That's something I've tried to and failed so far to fix in the engine so we need SDKs to be correct here.

sdk/Pulumi/Provider/Provider.cs Outdated Show resolved Hide resolved
sdk/Pulumi/Provider/Provider.cs Outdated Show resolved Hide resolved
sdk/Pulumi/Provider/Provider.cs Outdated Show resolved Hide resolved

namespace Pulumi.Experimental.Provider;

public class ComponentResourceProviderBase : Provider
Copy link
Member

Choose a reason for hiding this comment

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

I think this could just get merged into Provider. There are cases of providers that support Custom and Component resources, there's no need to make components require a different base class for that.

Copy link
Member

Choose a reason for hiding this comment

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

These serializer changes look like
A) They could go to their own PR
B) Should have tests in sdk/Pulumi.Tests/Provider/PropertyValueTests.cs to match

@@ -0,0 +1,7 @@
namespace Pulumi;

internal interface IDeploymentBuilder
Copy link
Member

Choose a reason for hiding this comment

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

I think its worth pulling this IDeploymentBuilder change into it's own PR and seeing if it makes sense to optionally expose it to non-service tests as well.

…rt-multi-lanugage-components

# Conflicts:
#	sdk/Pulumi/Provider/Provider.cs
github-merge-queue bot pushed a commit that referenced this pull request Sep 9, 2024
Idea taken from #275, where
there were even more cases of translating CheckFailure objects.

But this is a small clean change to pull in by itself.
@algompluecker
Copy link
Contributor Author

Hi @Frassle @Zaid-Ajaj I have resolved all the points as discussed in the meetings. Please double check and resolve the remaining open discussions if you agree they are solved.
I think we should be good to merge this now!

@Frassle
Copy link
Member

Frassle commented Sep 13, 2024

I think the test failures are real issues due to the changes in RunInlineAsync. It's not handling exceptions exactly the same as before.

@Frassle
Copy link
Member

Frassle commented Sep 13, 2024

It might be worth trying to do the change to generic in it's own smaller PR.

@Frassle Frassle added this pull request to the merge queue Sep 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Sep 16, 2024
@Frassle Frassle added this pull request to the merge queue Sep 16, 2024
Merged via the queue into pulumi:main with commit b6400f1 Sep 16, 2024
17 checks passed
@pulumi-bot
Copy link

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

9 participants