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

[runtime] Support for storageSize, storageType, zone, and subZone #78

Merged
merged 6 commits into from
Aug 29, 2024

Conversation

ssmirr
Copy link
Contributor

@ssmirr ssmirr commented Aug 27, 2024

Allows for leveraging the lower-level features of the platform to customize the scheduling and storage of runtimes, such as Besu and IPFS.

Signed-off-by: Samim Mirhosseini <ssmirr@users.noreply.github.com>
Signed-off-by: Samim Mirhosseini <ssmirr@users.noreply.github.com>
@ssmirr
Copy link
Contributor Author

ssmirr commented Aug 27, 2024

Noticed the CI build is failing, but unlikely to be related to this specific PR as there seems to be a few other failures before this build.

Current findings are:

  • that the expected API calls made by the provider are different depending on the version of terraform CLI installed
  • the build is passing for locally (macOS) with terraform v1.8.5 however same terraform version is currently failing in this PR because expected and actual API calls are different
  • I'm able to reproduce the failure locally by running tests in act's Docker containers (simply running $ act in this repo) so one possibility might be a difference in Linux vs. macOS releases of terraform (?)

I will keep looking and update here if I find something more interesting by tonight

Signed-off-by: hfuss <hayden.fuss@kaleido.io>
…rver

Signed-off-by: hfuss <hayden.fuss@kaleido.io>
@onelapahead
Copy link
Contributor

#79 helped rule out what was going on with the tests - it was broken due to the missing terraform CLI install in the workflow.

But the resource / tests had a few bugs in the optional vs computed logic for the storage related fields which are optional for the user, and are only relevant for certain runtime types.

I updated the test to manage a runtime with a specified zone, storage type, and storage size for now. Additional tests for non-storage runtimes and zone defaulting would be helpful in the future.

@onelapahead onelapahead changed the title supporting storageSize, storageType, zone, and subZone for runtime [runtime] Support for storageSize, storageType, zone, and subZone Aug 29, 2024
@@ -52,7 +56,11 @@ type RuntimeAPIModel struct {
EnvironmentMemberID string `json:"environmentMemberId,omitempty"`
Status string `json:"status,omitempty"`
Deleted bool `json:"deleted,omitempty"`
Stopped bool `json:"stopped,omitempty"`
Stopped bool `json:"stopped"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Our API should always returns this, so if its false we still want it in serialized JSON responses. Otherwise it was being omitted and the unit tests were broken.

@peterbroadhurst peterbroadhurst merged commit 216464d into v1.1 Aug 29, 2024
1 check passed
@peterbroadhurst peterbroadhurst deleted the runtime-storage branch August 29, 2024 11:30
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.

4 participants