Skip to content

Conversation

@MengLinMaker
Copy link

@MengLinMaker MengLinMaker commented Jan 26, 2026

Adding Image component for #6304:

  • Create image.ts component:
    • Initial creation
  • Refactor function.ts and fargate.ts to use image.ts
    • function.ts
    • fargate.ts
  • Test changes against sst examples:
    • examples/aws-task
    • examples/aws-python-container - only python uses container for Lambda function
  • Add docs

Although efforts has been made to preserve functionality. Some behaviors may change:

  • fargate.ts image name is changed. Can be preserved via transform.

@MengLinMaker
Copy link
Author

@vimtor the test in platform fails since bun lacks features from node, which are required for pulumi. I will use npm node for now. Though I believe pnpm will offer a better monorepo experience.

# Unhandled error between tests
-------------------------------
26 | // high-quality error messages.
27 | //
28 | // As a side-effect of importing this file, we must enable the --allow-natives-syntax V8 flag. This
29 | // is because we are using V8 intrinsics in order to implement this module.
30 | const v8 = __importStar(require("v8"));
31 | v8.setFlagsFromString("--allow-natives-syntax");
        ^
NotImplementedError: node:v8 setFlagsFromString is not yet implemented in Bun.
 code: "ERR_NOT_IMPLEMENTED"

      at /Users/menglinmaker/Documents/software-projects/open-source/sst/node_modules/@pulumi/pulumi/runtime/closure/v8.js:31:4
      at anonymous (unknown:1:1)
      at /Users/menglinmaker/Documents/software-projects/open-source/sst/node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:29:7
      at anonymous (unknown:1:1)
      at /Users/menglinmaker/Documents/software-projects/open-source/sst/node_modules/@pulumi/pulumi/runtime/closure/serializeClosure.js:61:78
      at anonymous (unknown:1:1)
      at /Users/menglinmaker/Documents/software-projects/open-source/sst/node_modules/@pulumi/pulumi/runtime/index.js:29:1

@vimtor
Copy link
Collaborator

vimtor commented Jan 26, 2026

hey @MengLinMaker no need to upgrade vitest or write tests for this feature

i'm working on a better testing setup. for the moment you can test the components against one of the local examples as described in the README

@MengLinMaker
Copy link
Author

AFAIK some sst examples are set to use latest version from npm. But we want to use the sst currently being changed...

Are you implying the local sst should be installed globally?

@MengLinMaker
Copy link
Author

MengLinMaker commented Jan 27, 2026

Ah thanks its in the root README #running-locally

Then sst diff against an empty AWS account for snapshots

@vimtor
Copy link
Collaborator

vimtor commented Jan 27, 2026

i usually do:

  1. clone the repo
  2. bun install
  3. go mod tidy
  4. cd platform && bun run build
  5. cd examples/<example> && bun install
  6. go run ../../cmd/sst dev (or deploy)

if you make changes you should run 4 and 6 again

@MengLinMaker MengLinMaker marked this pull request as ready for review January 29, 2026 21:03
@MengLinMaker
Copy link
Author

MengLinMaker commented Jan 29, 2026

Not quite ready to merge, but I'd like confirm that current changes are desired.

Refactoring fargate.ts and function.ts doesn't add anything new, just cleaner abstractions.

Adding ability to use input image directly into service.ts should be straight forward.

@MengLinMaker
Copy link
Author

Link issue #6304
Could also investigate #6369 after completion

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.

2 participants