Skip to content

Conversation

ctrombley
Copy link
Collaborator

Description

This PR updates the stacks domain models to match new serializer being used by the API.

Testing plan

Integration tests should cover it.

Output from tests

❯ envchain local gotestsum --format=testname -- -v -run TestStack
PASS TestStackConfigurationList/with_pagination_options (0.15s)
PASS TestStackConfigurationList (10.11s)
PASS TestStackConfigurationCreateUploadAndRead (3.60s)
PASS TestStackConfigurationSummaryList/Successful_empty_list (0.11s)
PASS TestStackConfigurationSummaryList/Successful_multiple_config_summary_list (0.11s)
PASS TestStackConfigurationSummaryList/Unsuccessful_list (0.00s)
PASS TestStackConfigurationSummaryList (10.88s)
PASS TestStackDeploymentGroupsList/List_with_valid_stack_configuration_ID (0.41s)
PASS TestStackDeploymentGroupsList/List_with_invalid_stack_configuration_ID (0.00s)
PASS TestStackDeploymentGroupsList/List_with_pagination (0.23s)
PASS TestStackDeploymentGroupsList (17.79s)
PASS TestStackDeploymentGroupsRead/Read_with_valid_ID (0.10s)
PASS TestStackDeploymentGroupsRead/Read_with_invalid_ID (0.00s)
PASS TestStackDeploymentGroupsRead (16.04s)
PASS TestStackDeploymentGroupsApproveAllPlans/Approving_all_plans (0.15s)
PASS TestStackDeploymentGroupsApproveAllPlans (17.88s)
PASS TestStackDeploymentGroupsRerun/No_deployments_specified_for_rerun (0.00s)
PASS TestStackDeploymentGroupsRerun/Rerun_with_invalid_ID (0.00s)
PASS TestStackDeploymentGroupsRerun (26.17s)
PASS TestStackDeploymentGroupSummaryList/Successful_multiple_deployment_group_summary_list (0.15s)
PASS TestStackDeploymentGroupSummaryList/Unsuccessful_list (0.00s)
PASS TestStackDeploymentGroupSummaryList (38.00s)
PASS TestStackDeploymentRunsList/List_without_options (0.71s)
PASS TestStackDeploymentRunsList/List_with_pagination (0.71s)
PASS TestStackDeploymentRunsList (18.99s)
PASS TestStackDeploymentRunsRead/Read_with_valid_ID (0.11s)
PASS TestStackDeploymentRunsRead/Read_with_invalid_ID (0.55s)
PASS TestStackDeploymentRunsRead (44.75s)
PASS TestStackDeploymentRunsApproveAllPlans/Approve_all_plans (0.17s)
PASS TestStackDeploymentRunsApproveAllPlans (19.94s)
SKIP TestStackDeploymentRunsCancel/cancel_deployment_run (0.00s)
PASS TestStackDeploymentRunsCancel (23.18s)
PASS TestStackDeploymentStepsList/List_with_invalid_stack_deployment_run_ID (0.20s)
PASS TestStackDeploymentStepsList/List_without_options (0.53s)
PASS TestStackDeploymentStepsList/List_with_pagination (0.56s)
PASS TestStackDeploymentStepsList (22.05s)
PASS TestStackDeploymentStepsRead/Read_with_valid_ID (0.11s)
PASS TestStackDeploymentStepsRead/Read_with_invalid_ID (0.36s)
PASS TestStackDeploymentStepsRead (19.36s)
PASS TestStackDeploymentStepsAdvance/Advance_with_valid_ID (0.49s)
PASS TestStackDeploymentStepsAdvance/Advance_with_invalid_ID (0.34s)
PASS TestStackDeploymentStepsAdvance (26.10s)
PASS TestStackCreateAndList/List_without_options (0.20s)
PASS TestStackCreateAndList/List_with_name_filter (0.33s)
PASS TestStackCreateAndList/List_with_project_filter (0.43s)
PASS TestStackCreateAndList/List_with_pagination (0.45s)
PASS TestStackCreateAndList/List_with_sort_options (0.57s)
PASS TestStackCreateAndList (5.86s)
PASS TestStackReadUpdateDelete (7.32s)
PASS TestStackRemoveVCSBacking (5.79s)
PASS TestStackReadUpdateForceDelete (7.73s)
PASS TestStackConverged (24.08s)
PASS .

=== Skipped
=== SKIP: . TestStackDeploymentRunsCancel/cancel_deployment_run (0.00s)
    stack_deployment_runs_integration_test.go:231:
    --- SKIP: TestStackDeploymentRunsCancel/cancel_deployment_run (0.00s)

DONE 52 tests, 1 skipped in 368.109s

@ctrombley ctrombley self-assigned this Sep 15, 2025
@ctrombley ctrombley requested a review from a team as a code owner September 15, 2025 23:19
Copy link

Changelog Warning

Please add a changelog entry to CHANGELOG.md for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.

@ctrombley ctrombley changed the title Wip cleanup Update stacks resources with upstream serializer changes Sep 15, 2025
@ctrombley ctrombley changed the title Update stacks resources with upstream serializer changes Update stacks resources to match upstream serializer changes Sep 15, 2025
CreatedAt *time.Time `jsonapi:"attr,created-at,iso8601"`

// Relationships
StackDeploymentStep *StackConfiguration `jsonapi:"relation,stack-deployment-step"`
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be *StackDeploymentStep

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! Thanks

@@ -92,26 +78,6 @@ func (s stackDeploymentRuns) Read(ctx context.Context, stackDeploymentRunID stri

return &run, nil
}

func (s stackDeploymentRuns) ReadWithOptions(ctx context.Context, stackDeploymentRunID string, options *StackDeploymentRunReadOptions) (*StackDeploymentRun, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

May I ask why this has been removed?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 I believe we make use of in the Stacks CLI

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was under the impression that all of the "Include" params had been removed, and Include was the only option in this struct. Is that incorrect?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like Includes are being handled in the controller/serializer now. Maybe an intermediate state of the API you had in mind?

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