Skip to content

feat: model experiments wait handler#7800

Open
paul-sffrth wants to merge 8 commits into
stackitcloud:mainfrom
paul-sffrth:feature/mexp-wait-handler
Open

feat: model experiments wait handler#7800
paul-sffrth wants to merge 8 commits into
stackitcloud:mainfrom
paul-sffrth:feature/mexp-wait-handler

Conversation

@paul-sffrth

@paul-sffrth paul-sffrth commented Jun 10, 2026

Copy link
Copy Markdown
Member

Description

Wait handlers for model experiments

Checklist

  • Issue was linked above
  • No generated code was adjusted manually (check comments in file header)
  • Changelogs
    • Changelog in the root directory was adjusted (see here)
    • Changelog(s) of the service(s) were adjusted (see e.g. here)
  • VERSION file(s) of the service(s) were adjusted
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@paul-sffrth paul-sffrth requested a review from a team as a code owner June 10, 2026 11:21
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait_test.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go
@GokceGK

GokceGK commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution.

Notice.txt is not part of this PR, but I just recognized a point in there.

Can you please change the first line to

STACKIT Model Experiments SDK for Go

Comment thread examples/modelexperiments/modelexperiments.go
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread examples/modelexperiments/modelexperiments.go Outdated
Comment thread services/modelexperiments/v1api/wait/wait.go Outdated
GokceGK
GokceGK previously approved these changes Jun 18, 2026
@GokceGK GokceGK requested a review from a team June 18, 2026 09:00
if err != nil {
log.Fatalf("[Model Experiments] Error when calling `CreateInstance`: %v\n", err)
}
log.Printf("[Model Experiments] Triggered creation of Model Experiments Instance with ID: \"%s\".\n", createInstanceResp.Instance.Id)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick

Suggested change
log.Printf("[Model Experiments] Triggered creation of Model Experiments Instance with ID: \"%s\".\n", createInstanceResp.Instance.Id)
log.Printf("[Model Experiments] Triggered creation of Model Experiments Instance with ID: %q.\n", createInstanceResp.Instance.Id)

if err != nil {
log.Fatalf("[Model Experiments] Error when waiting for creation: %v\n", err)
}
log.Printf("[Model Experiments] Model Experiments Instance \"%s\" has been successfully created.\n", createInstanceResp.Instance.Id)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.Printf("[Model Experiments] Model Experiments Instance \"%s\" has been successfully created.\n", createInstanceResp.Instance.Id)
log.Printf("[Model Experiments] Model Experiments Instance %q has been successfully created.\n", createInstanceResp.Instance.Id)

if err != nil {
log.Fatalf("[Model Experiments] Error when calling `GetInstance`: %v\n", err)
}
log.Printf("[Model Experiments] Retrieved Model Experiments Instance with ID: \"%s\" and display name: \"%s\"\n", getInstanceResp.Instance.Id, getInstanceResp.Instance.Name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.Printf("[Model Experiments] Retrieved Model Experiments Instance with ID: \"%s\" and display name: \"%s\"\n", getInstanceResp.Instance.Id, getInstanceResp.Instance.Name)
log.Printf("[Model Experiments] Retrieved Model Experiments Instance with ID: %q and display name: %q\n", getInstanceResp.Instance.Id, getInstanceResp.Instance.Name)

if err != nil {
log.Fatalf("[Model Experiments] Error when calling `PartialUpdateInstance`: %v\n", err)
}
log.Printf("[Model Experiments] Updated Model Experiments Instance with ID: \"%s\" and display name: \"%s\"\n", partialUpdateInstanceResp.Instance.Id, partialUpdateInstanceResp.Instance.Name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.Printf("[Model Experiments] Updated Model Experiments Instance with ID: \"%s\" and display name: \"%s\"\n", partialUpdateInstanceResp.Instance.Id, partialUpdateInstanceResp.Instance.Name)
log.Printf("[Model Experiments] Updated Model Experiments Instance with ID: %q and display name: %q\n", partialUpdateInstanceResp.Instance.Id, partialUpdateInstanceResp.Instance.Name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

replace it also in all following prints

Comment on lines +13 to +18
const (
INSTANCESTATE_ACTIVE = "active"
INSTANCESTATE_IMPAIRED = "impaired"

TOKENSTATE_ACTIVE = "active"
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const (
INSTANCESTATE_ACTIVE = "active"
INSTANCESTATE_IMPAIRED = "impaired"
TOKENSTATE_ACTIVE = "active"
)

These aren't used at all and should be removed

Comment on lines +48 to +49
},
DeleteHttpErrorStatusCodes: []int{http.StatusNotFound},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ErrorState is missing

Suggested change
},
DeleteHttpErrorStatusCodes: []int{http.StatusNotFound},
},
ErrorState: []modelexperiments.InstanceState{modelexperiments.INSTANCESTATE_IMPAIRED},
DeleteHttpErrorStatusCodes: []int{http.StatusNotFound},

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.

3 participants