Skip to content

feat: instantiate resource infrastructure classes asynchronously within the base class of each resource - #122

Merged
jianzs merged 5 commits into
pluto-lang:mainfrom
jianzs:create-ins-by-factory-class
Jan 11, 2024
Merged

jianzs merged 5 commits into
pluto-lang:mainfrom
jianzs:create-ins-by-factory-class

Conversation

@jianzs

@jianzs jianzs commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

re #106

2. What is the scope of this PR (e.g. component or file name):

  • SDK
  • Generator
  • Simulator Adapter

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

Within the Infra SDK, abstract classes are established for each kind of resource. These encompass a static method named createInstance, which is utilized to instantiate the suitable implementation class depending on the platform and engine. This approach proves to be more intuitive compared to the preceding Registry method. But this approach cannot be implemented for the Client SDK.

Moreover, by leveraging lazy loading techniques, we're able to cut down on the library's initialization time.

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

@jianzs jianzs added generator Generator adapter Adapter sdk Client SDK and Infra SDK labels Jan 11, 2024
@changeset-bot

changeset-bot Bot commented Jan 11, 2024 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 62a0009

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@plutolang/simulator-adapter Patch
@plutolang/static-generator Patch
@plutolang/pulumi-adapter Patch
@plutolang/pluto-infra Patch
@plutolang/pluto Patch
@plutolang/base Patch
@plutolang/cli Patch
@plutolang/static-deducer Patch
@plutolang/graphviz-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adapter Adapter generator Generator sdk Client SDK and Infra SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant