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

Add k8s-ts-wait #1444

Closed
wants to merge 8 commits into from
Closed

Add k8s-ts-wait #1444

wants to merge 8 commits into from

Conversation

mnlumi
Copy link
Contributor

@mnlumi mnlumi commented Jun 27, 2023

@mnlumi mnlumi marked this pull request as draft June 27, 2023 15:29
@mnlumi
Copy link
Contributor Author

mnlumi commented Jun 27, 2023

Currently stuck on:

    error: Running program './examples/k8s-ts-wait/' failed with an unhandled exception:
    <ref *1> TypeError: Cannot read properties of undefined (reading 'status')
        at ./examples/k8s-ts-wait/index.ts:58:65
        at ./examples/k8s-ts-wait/node_modules/@pulumi/output.ts:398:31
        at Generator.next (<anonymous>)
        at ./examples/k8s-ts-wait/node_modules/@pulumi/pulumi/output.js:21:71
        at new Promise (<anonymous>)
        at __awaiter (./examples/k8s-ts-wait/node_modules/@pulumi/pulumi/output.js:17:12)
        at applyHelperAsync (./examples/k8s-ts-wait/node_modules/@pulumi/pulumi/output.js:239:12)
        at ./examples/k8s-ts-wait/node_modules/@pulumi/output.ts:310:13
        at processTicksAndRejections (node:internal/process/task_queues:95:5) {
      promise: Promise { <rejected> [Circular *1] }
    }

@mnlumi
Copy link
Contributor Author

mnlumi commented Jun 29, 2023

Currently stuck on:

    error: Running program './examples/k8s-ts-wait/' failed with an unhandled exception:
    <ref *1> TypeError: Cannot read properties of undefined (reading 'status')
        at ./examples/k8s-ts-wait/index.ts:58:65
        at ./examples/k8s-ts-wait/node_modules/@pulumi/output.ts:398:31
        at Generator.next (<anonymous>)
        at ./examples/k8s-ts-wait/node_modules/@pulumi/pulumi/output.js:21:71
        at new Promise (<anonymous>)
        at __awaiter (./examples/k8s-ts-wait/node_modules/@pulumi/pulumi/output.js:17:12)
        at applyHelperAsync (./examples/k8s-ts-wait/node_modules/@pulumi/pulumi/output.js:239:12)
        at ./examples/k8s-ts-wait/node_modules/@pulumi/output.ts:310:13
        at processTicksAndRejections (node:internal/process/task_queues:95:5) {
      promise: Promise { <rejected> [Circular *1] }
    }

Okay, this is actually expected on preview and runs successfully with pulumi up -f to skip the preview. I'd like to have a better experience on preview if possible.

@mnlumi
Copy link
Contributor Author

mnlumi commented Jun 30, 2023

Added an unknown return for preview so that preview will run, but if the code has already run, this will display a pending update on preview. This could be improved further by adding check on preview if jobmetadata already exists, then return that.

pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::k8s-ts-wait::pulumi:pulumi:Stack::k8s-ts-wait-dev]
    ~ kubernetes:batch/v1:Job: (update)
        [id=default/job2-f6810020]
        [urn=urn:pulumi:dev::k8s-ts-wait::kubernetes:batch/v1:Job::job2]
        [provider=urn:pulumi:dev::k8s-ts-wait::pulumi:providers:kubernetes::default_3_29_1::c61304c9-f7bd-4654-9c62-ca84d8db0e1b]
      ~ metadata: {
          ~ annotations: {
              ~ pulumi-waited-on-completion: "2023-06-30T14:05:41Z" => output<string>
            }
        }

@mnlumi mnlumi marked this pull request as ready for review November 7, 2023 19:58
@mnlumi
Copy link
Contributor Author

mnlumi commented Mar 22, 2024

Closing pull request as this has gone stale.

CC @lukehoban - Just an FYI since we worked on this together last year.

@mnlumi mnlumi closed this Mar 22, 2024
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.

None yet

1 participant