Skip to content

feat(mexp): Onboarding Modelexperiments#1547

Open
paul-sffrth wants to merge 30 commits into
stackitcloud:mainfrom
paul-sffrth:feat/mlflow
Open

feat(mexp): Onboarding Modelexperiments#1547
paul-sffrth wants to merge 30 commits into
stackitcloud:mainfrom
paul-sffrth:feat/mlflow

Conversation

@paul-sffrth

Copy link
Copy Markdown
Member

Description

This is the onboarding PR for integration STACKIT Modelexperiments into the STACKIT Terraform Provider.

It adds for customer the ability to:

  • Create, Read, Update and Delete Modelexperiments Instances
  • Create, Read, Update and Delete Mdelexperiments Instance Tokens

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • 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 29, 2026 09:24
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

@github-actions github-actions Bot added the Stale PR is marked as stale due to inactivity. label Jul 8, 2026
@Fyusel Fyusel removed the Stale PR is marked as stale due to inactivity. label Jul 8, 2026
labels = {
label = "Example label"
}
} No newline at end of file

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.

Please add import examples as well please.

Note: There is (since yesterday) a separate file which contains an import example which is handled by the terraform doc generation (e.g. have a look at the import-by-string.id.tf files in the examples folders).

@@ -0,0 +1,13 @@
AI Model Experiment Instance Resource schema.

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.

This description.md doubles the ##Example Usage in the resulting doc.

// Schema defines the schema for the resource.
func (i *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
Description: markdownDescription,

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.

Here the main description should be present instead of a doubled ##Example Usage

@@ -0,0 +1,604 @@
package instance

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.

datasource is missing

@@ -0,0 +1,21 @@
AI Model Experiment Instance Token Resource schema.

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.

same here: results in a doubled ##Example Usage

TOKENSTATE_INACTIVE = "inactive"
)

//go:generate mockgen -destination=./mock/serviceenablement.go -package=mock_serviceenablement github.com/stackitcloud/stackit-sdk-go/services/serviceenablement/v2api DefaultAPI

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.

please remove this line

func inputInstanceConfig(instanceName, instanceDescription, token_name, token_description string) string {
return fmt.Sprintf(`
%s

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.

We are using a different structure here (e.g. have a look at dremio testdata folder):

  • tf files include the configuration
  • in the acc_test.go the config values are set
  • there is a min and a max test (min = all required parameters/fields are set, max = all are set to one possible value)

resource.TestCheckResourceAttrSet("stackit_modelexperiments_token.token", "token"),
resource.TestCheckResourceAttrSet("stackit_modelexperiments_token.token", "valid_until"),
),
},

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.

datasource test and import test missing

model.State = types.StringValue(string(waitResp.Token.State))
}

mapValue, diags := types.MapValueFrom(ctx, types.StringType, token.Labels)

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.

There is a MapLabels() function in the utils package

return fmt.Errorf("instance id not present")
}

mapValue, diags := types.MapValueFrom(ctx, types.StringType, instance.Labels)

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.

There is a MapLabels() function in the utils package

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