Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
- **Feature:** New model struct `EnvironmentStatus`, added as `Status` field to `Environment` and `CreateEnvironmentPayload` models
- **Feature:** Add `InternalUrl` field to `ApplicationSummary` and `RuntimeStatus` models
- **Feature:** Add `InternalPort` field to `Network` model
- **Bugfix:** Handle application failed status in create and update waiters.
- **Bugfix:** Handle application none status in create and updated waiters.
- `secretsmanager`:
- [v0.19.2](services/secretsmanager/CHANGELOG.md#v0192)
- **Dependencies:** Bump STACKIT SDK core module from `v0.27.0` to `v0.27.1`
Expand Down
2 changes: 2 additions & 0 deletions services/sca/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- **Feature:** Add `Status` field to `Environment` and `CreateEnvironmentPayload` models
- **Feature:** Add `InternalUrl` field to `ApplicationSummary` and `RuntimeStatus` models
- **Feature:** Add `InternalPort` field to `Network` model
- **Bugfix:** Handle application failed status in create and update waiters.
- **Bugfix:** Handle application none status in create and updated waiters.

## v0.1.0
- **New:** SDK module for STACKIT Container Applications (SCA) service.
Expand Down
7 changes: 3 additions & 4 deletions services/sca/v1alphaapi/wait/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ func createOrUpdateApplicationWaitHandler(ctx context.Context, a sca.DefaultAPI,
waitConfig := wait.WaiterHelper[sca.Application, sca.CurrentStatus]{
FetchInstance: a.GetApplication(ctx, projectID, environmentID, applicationID).Execute,
GetState: getApplicationState,
ActiveState: []sca.CurrentStatus{sca.CURRENTSTATUS_CURRENT_STATUS_RUNNING, sca.CURRENTSTATUS_CURRENT_STATUS_IDLE},
// There is an issue where the API reports a transient FAILED status during the startup of applications.
// It will be solved before the beta.
// ErrorState: []sca.CurrentStatus{sca.CURRENTSTATUS_CURRENT_STATUS_FAILED},
// CURRENT_STATUS_NONE implies that the application is stopped, so its active without instances
ActiveState: []sca.CurrentStatus{sca.CURRENTSTATUS_CURRENT_STATUS_RUNNING, sca.CURRENTSTATUS_CURRENT_STATUS_IDLE, sca.CURRENTSTATUS_CURRENT_STATUS_NONE},
ErrorState: []sca.CurrentStatus{sca.CURRENTSTATUS_CURRENT_STATUS_FAILED},
}
handler := wait.New(waitConfig.Wait())
handler.SetTimeout(45 * time.Minute)
Expand Down
7 changes: 7 additions & 0 deletions services/sca/v1alphaapi/wait/wait_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ func TestCreateOrUpdateApplicationWaitHandler(t *testing.T) {
getFails: false,
},
},
{
desc: "application_stopped_succeeded",
mockSettings: mockSettings{
resourceState: sca.CURRENTSTATUS_CURRENT_STATUS_NONE,
getFails: false,
},
},
{
desc: "get_fails",
mockSettings: mockSettings{
Expand Down