Skip to content

Commit 4adf1c3

Browse files
authored
Revert "(local) Add C# SDK (Pulumi.Esc.Sdk) (#118)"
This reverts commit db21f73.
1 parent db21f73 commit 4adf1c3

File tree

97 files changed

+2
-26641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+2
-26641
lines changed

.github/workflows/stage-publish-sdk.yml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -126,37 +126,3 @@ jobs:
126126
"${{ github.workspace }}/sdk/python/bin/dist/*"
127127
--skip-existing
128128
--verbose
129-
130-
publish-csharp-sdk:
131-
runs-on: ubuntu-latest
132-
name: publish-csharp-sdk
133-
steps:
134-
- name: Fetch secrets from ESC
135-
id: esc-secrets
136-
uses: pulumi/esc-action@v1
137-
- name: Checkout Repo
138-
uses: actions/checkout@v4
139-
- name: Setup .NET
140-
uses: actions/setup-dotnet@v4
141-
with:
142-
dotnet-version: '6.0.x'
143-
- id: version
144-
name: Set SDK Version
145-
uses: pulumi/provider-version-action@v1
146-
- name: Generate SDKs
147-
uses: ./.github/actions/generate_sdk
148-
env:
149-
VERSION: ${{ inputs.version }}
150-
PULUMI_VERSION: ${{ inputs.version }}
151-
- name: Build C# SDK
152-
run: make build_csharp
153-
- name: Pack NuGet
154-
run: |
155-
cd sdk/csharp/Pulumi.Esc.Sdk
156-
dotnet pack -c Release -o nupkg /p:Version=${{ steps.version.outputs.version }}
157-
- name: Publish NuGet
158-
run: |
159-
dotnet nuget push sdk/csharp/Pulumi.Esc.Sdk/nupkg/*.nupkg \
160-
--api-key "${NUGET_PUBLISH_KEY}" \
161-
--source https://api.nuget.org/v3/index.json \
162-
--skip-duplicate

.github/workflows/stage-test.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,3 @@ jobs:
9797
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
9898
- name: Test with pytest
9999
run: make test_python
100-
test_csharp:
101-
name: Test C#
102-
runs-on: ubuntu-latest
103-
needs: test_python
104-
steps:
105-
- name: Fetch secrets from ESC
106-
id: esc-secrets
107-
uses: pulumi/esc-action@v1
108-
- name: Checkout Repo
109-
uses: actions/checkout@v2
110-
with:
111-
ref: ${{ inputs.commit-ref }}
112-
- name: Setup .NET
113-
uses: actions/setup-dotnet@v4
114-
with:
115-
dotnet-version: '6.0.x'
116-
- name: Test
117-
run: make test_csharp

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,3 @@ sdk/typescript/node_modules/*
3939
sdk/typescript/bin/*
4040
sdk/python/bin/*
4141
sdk/python/go.mod
42-
43-
# C# / .NET
44-
sdk/csharp/**/bin/
45-
sdk/csharp/**/obj/

CHANGELOG_PENDING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
### Improvements
22

3-
- Add C# SDK with generated client, hand-written wrappers (EscClient, EscAuth, ValueMapper,
4-
EnvironmentDefinitionSerializer), and xUnit tests
5-
63
- Support proxy environment variables in Python SDK
74
[#108](https://github.com/pulumi/esc-sdk/pull/108)
85

CONTRIBUTING.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@ To build the autogenerated API clients, run:
1717
make generate_sdks
1818
```
1919

20-
Additionally, ESC SDK provides wrapper clients for TypeScript/JavaScript, Python, Go, and C#. To build these packages, run:
20+
Additionally, ESC SDK provides wrapper clients for TypeScript/JavaScript, Python, and Go. To build these packages, run:
2121

2222
```shell
2323
make build_typescript
2424
make build_python
2525
make build_go
26-
make build_csharp
2726
```
2827

29-
The C# SDK requires the .NET 6.0 SDK or later.
30-
3128
### Running tests
3229

3330
First, make sure to set the following environment variables:
@@ -46,8 +43,6 @@ Now you can run the tests for the different sdks:
4643
make test_typescript
4744
make test_python
4845
make test_go
49-
make test_csharp # Unit tests only
50-
make test_csharp_integration # E2E tests (requires env vars above)
5146
```
5247

5348
## Submitting a Pull Request

Makefile

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -74,32 +74,5 @@ generate_ts_client_sdk:
7474
generate_python_client_sdk:
7575
PYTHON_POST_PROCESS_FILE="/usr/local/bin/yapf -i" openapi-generator-cli generate -i ./sdk/swagger.yaml -p packageName=pulumi_esc_sdk,httpUserAgent=esc-sdk/python/${VERSION},packageVersion=${PYTHON_SDK_VERSION} -t ./sdk/templates/python -g python -o ./sdk/python --git-repo-id esc --git-user-id pulumi
7676

77-
.PHONY: generate_csharp_client_sdk
78-
generate_csharp_client_sdk:
79-
openapi-generator-cli generate \
80-
-i ./sdk/swagger.yaml \
81-
-g csharp \
82-
--library generichost \
83-
--additional-properties packageName=Pulumi.Esc.Sdk \
84-
--additional-properties targetFramework=net6.0 \
85-
--additional-properties nullableReferenceTypes=true \
86-
--additional-properties validatable=true \
87-
--additional-properties hideGenerationTimestamp=false \
88-
--additional-properties sourceFolder=. \
89-
--additional-properties httpUserAgent=esc-sdk/csharp/${VERSION} \
90-
-t ./sdk/templates/csharp \
91-
-o ./sdk/csharp \
92-
--git-repo-id esc \
93-
--git-user-id pulumi
94-
95-
build_csharp::
96-
cd sdk/csharp/Pulumi.Esc.Sdk && dotnet build
97-
98-
test_csharp::
99-
cd sdk/csharp && dotnet test --filter "Category!=Integration"
100-
101-
test_csharp_integration::
102-
cd sdk/csharp && dotnet test --filter "Category=Integration"
103-
10477
.phony: generate_sdks
105-
generate_sdks:: generate_go_client_sdk generate_ts_client_sdk generate_python_client_sdk generate_csharp_client_sdk
78+
generate_sdks:: generate_go_client_sdk generate_ts_client_sdk generate_python_client_sdk

README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,34 +45,8 @@ go get github.com/pulumi/esc-sdk/sdk
4545

4646
[Go examples](https://www.pulumi.com/docs/esc/development/languages-sdks/go/)
4747

48-
### C#/.NET
49-
50-
```shell
51-
dotnet add package Pulumi.Esc.Sdk
52-
```
53-
54-
#### Quick Example
55-
56-
```csharp
57-
using Pulumi.Esc.Sdk;
58-
59-
// Create a client using default credentials (PULUMI_ACCESS_TOKEN or CLI login)
60-
using var client = EscClient.CreateDefault();
61-
62-
// Or provide credentials explicitly
63-
// using var client = EscClient.Create("pul-abc123");
64-
65-
// Open and read an environment
66-
var (env, values) = await client.OpenAndReadEnvironmentAsync("myorg", "myproject", "dev");
67-
Console.WriteLine(values["dbConnectionString"]);
68-
69-
// Get the environment definition as parsed YAML
70-
var definition = await client.GetEnvironmentAsync("myorg", "myproject", "dev");
71-
```
72-
7348
## API Reference Documentation
7449

7550
* [TypeScript/JavaScript](https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/esc-sdk/)
7651
* [Python](https://www.pulumi.com/docs/reference/pkg/python/pulumi_esc_sdk/)
7752
* [Go](https://pkg.go.dev/github.com/pulumi/esc-sdk/sdk/go)
78-
* C# — API docs coming soon

sdk/csharp/.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

sdk/csharp/.openapi-generator-ignore

Lines changed: 0 additions & 46 deletions
This file was deleted.

sdk/csharp/.openapi-generator/FILES

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)