Skip to content

Add STACKIT tests - #652

Merged
tormath1 merged 1 commit into
flatcar:mainfrom
stackitcloud:stackit
Dec 11, 2025
Merged

Add STACKIT tests#652
tormath1 merged 1 commit into
flatcar:mainfrom
stackitcloud:stackit

Conversation

@robinschneider

Copy link
Copy Markdown
Member

Tests for new provider STACKIT

Add tests for new provider STACKIT
STACKIT now has it's own oem image and does not yet have any tests.

How to use

make vendor && make build

./bin/ore stackit create-image --stackit-service-account-key-path "/home/ubuntu/.stackit/credentials.json" --stackit-project-id $STACKIT_PROJECT_ID -d

./bin/kola spawn --platform stackit --stackit-service-account-key-path "/home/ubuntu/.stackit/credentials.json" --stackit-project-id $STACKIT_PROJECT_ID --stackit-image $STACKIT_IMAGE_ID -d

Testing done

This is a work in progress PR and does not yet fully work

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@robinschneider

Copy link
Copy Markdown
Member Author

I am not sure how to get the image ID i set with --stackit-image into CreateServer function of cmd/platform/api/stackit/api.go

@tormath1

Copy link
Copy Markdown
Contributor

I am not sure how to get the image ID i set with --stackit-image into CreateServer function of cmd/platform/api/stackit/api.go

@robinschneider to provide the image ID to the CreateServer you need to add an option, let's say:

// cmd/kola/options.go
sv(&kola.STACKITOptions.ImageID, "stackit-image-id", "", "STACKIT image ID to deploy")

Then from the CreateServer function, you can access it through:

// platform/api/stackit/api.go
type API struct {
        ...
        opts *Options 
}

type Options struct {
	*platform.Options
        ...
}

func (a *API) CreateServer(ctx context.Context, name iaas.CreateServerPayloadGetNameAttributeType, networkId iaas.CreateServerNetworkingGetNetworkIdAttributeType, keypairName iaas.CreateServerPayloadGetKeypairNameAttributeType, userData iaas.CreateServerPayloadGetUserDataAttributeType) (*Server, error) {
...
        ID := a.opts.ImageID

@robinschneider
robinschneider marked this pull request as ready for review October 22, 2025 13:58
@robinschneider
robinschneider requested a review from a team as a code owner October 22, 2025 13:58

@tormath1 tormath1 left a comment

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.

Thanks a lot, that's impressive: diving into Mantle codebase is not something easy, most of the comments are questions / nit-picks.

You might need to vendor the STACKIT dependencies go mod vendor.

Comment thread cmd/kola/options.go Outdated
Comment thread platform/api/stackit/api.go Outdated
Comment thread platform/api/stackit/api.go Outdated
Comment thread platform/api/stackit/api.go Outdated
Comment thread platform/api/stackit/api.go Outdated
Comment thread platform/machine/stackit/cluster.go Outdated
Comment thread platform/machine/stackit/cluster.go Outdated
Comment thread platform/machine/stackit/flight.go Outdated
Comment thread platform/machine/stackit/machine.go Outdated
Comment thread platform/machine/stackit/machine.go Outdated
Comment thread go.mod Outdated
Comment thread kola/harness.go Outdated
Comment thread platform/machine/stackit/machine.go Outdated
Comment thread platform/machine/stackit/cluster.go Outdated
Comment thread platform/machine/stackit/cluster.go Outdated

@tormath1 tormath1 left a comment

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.

Thanks a lot for this huge contribution.

@tormath1 tormath1 left a comment

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 has been tested for ARM64 and AMD64. Thanks for the additional fixes. For the record, we still see some random error 500 with IP deletion but this does not impact the CI run for now, the IP is actually deleted (at least we don't see it on the portal) and can be revisited later.

Feel free to rebase on main to fix a small dependency conflict and squash all your commits. Thanks again!

Signed-off-by: Robin Schneider <robin.schneider@stackit.cloud>
@tormath1
tormath1 merged commit bed79eb into flatcar:main Dec 11, 2025
2 of 3 checks passed
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