Skip to content

fix: adapt to meshstack returning 200 instead of 403 - #6

Open
nroi wants to merge 5 commits into
mainfrom
feature/CU-123ymg9utgq
Open

nroi wants to merge 5 commits into
mainfrom
feature/CU-123ymg9utgq

Conversation

@nroi

@nroi nroi commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

related PRs:

meshcloud/terraform-provider-meshstack#310
https://github.com/meshcloud/meshfed-release/pull/10980

  • fix: report whether meshStack redacted a definition or a version
  • fix: marshal an implementation without a variant to an error, not a panic
  • refactor: keep the redaction flag on the definition status only
  • fix: infer a variant type with an error instead of a panic

nroi and others added 3 commits September 21, 2026 16:23
meshStack answers a request for a building block definition of another
workspace with 200 instead of 403 (meshcloud/meshfed-release#10980), and
redacts the response instead. Both status objects now carry the flag that
says so, so the Terraform provider can keep its workaround for a
definition it may only consume.

CU-123ymg9utgq

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…anic

A redacted version comes back from meshStack without an implementation
variant and without a usage count. Marshalling it panicked inside the
type inference and crashed the caller; MarshalJSON now returns the error,
and the usage count is nullable.

CU-123ymg9utgq

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
meshStack marks the definition, and a caller that reads the mark never
reaches the versions, so the flag on the version status had no reader.

CU-123ymg9utgq

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@meshcloud-gh-actions

meshcloud-gh-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on 0cc1fca16d7fe7c1584021fe616db6e72be73b10.

Scope Coverage
Unit tests 55.2%
Acceptance tests 15.1%
Combined 55.5%
Uncovered functions
client/api_key.go:44: newApiKeyClient 0.0%
client/api_key.go:48: meshApiKeyClient.Create 0.0%
client/api_key.go:52: meshApiKeyClient.Read 0.0%
client/api_key.go:56: meshApiKeyClient.Update 0.0%
client/api_key.go:60: meshApiKeyClient.Delete 0.0%
client/api_key_permissions.go:21: ApiKeyPermissions.AllCodes 0.0%
client/api_key_permissions.go:34: ApiKeyPermissions.WorkspaceCodes 0.0%
client/api_key_permissions.go:50: ApiKeyPermissions.MarkdownString 0.0%
client/api_key_permissions.go:226: AllApiKeyPermissions 0.0%
client/api_key_permissions.go:231: WorkspacePermissionCodes 0.0%
client/building_block_definition.go:72: MeshBuildingBlockDefinitionApprovalPolicies.NothingRequiresApproval 0.0%
client/building_block_definition.go:83: DisabledSchedule 0.0%
client/building_block_definition.go:90: MeshBuildingBlockDefinitionSchedule.IsDisabled 0.0%
client/building_block_definition.go:95: MeshBuildingBlockDefinitionSpec.HasNeutralPolicies 0.0%
client/building_block_definition.go:100: MeshBuildingBlockDefinitionSpec.WithNeutralPolicies 0.0%
client/building_block_definition.go:140: newBuildingBlockDefinitionClient 0.0%
client/building_block_definition.go:154: meshBuildingBlockDefinitionClient.List 0.0%
client/building_block_definition.go:161: meshBuildingBlockDefinitionClient.Read 0.0%
client/building_block_definition.go:165: meshBuildingBlockDefinitionClient.Create 0.0%
client/building_block_definition.go:169: meshBuildingBlockDefinitionClient.Update 0.0%
client/building_block_definition.go:173: meshBuildingBlockDefinitionClient.Delete 0.0%
client/building_block_definition_version.go:100: TagInputTargetsFor 0.0%
client/building_block_definition_version.go:235: newBuildingBlockDefinitionVersionClient 0.0%
client/building_block_definition_version.go:245: meshBuildingBlockDefinitionVersionClient.List 0.0%
client/building_block_definition_version.go:251: meshBuildingBlockDefinitionVersionClient.Create 0.0%
... and 197 more

covdata func names a method without its receiver, so an entry can belong to an implementation nothing selects rather than to a function the tests never reached. Open the file and line before reading one as a coverage gap.

nroi added a commit to meshcloud/terraform-provider-meshstack that referenced this pull request Sep 21, 2026
The client changes this branch needs live in that pull request, and the
provider's own CI builds without the go.work that the acceptance lane
writes, so it needs a version that carries them. The pseudo-version is
interim: swap it for the release that follows the merge of that pull
request before this branch merges.

CU-123ymg9utgq

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
nroi added a commit to meshcloud/terraform-provider-meshstack that referenced this pull request Sep 22, 2026
The client changes this branch needs live in that pull request, and the
provider's own CI builds without the go.work that the acceptance lane
writes, so it needs a version that carries them. The pseudo-version is
interim: swap it for the release that follows the merge of that pull
request before this branch merges.

CU-123ymg9utgq

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
nroi added a commit to meshcloud/terraform-provider-meshstack that referenced this pull request Sep 22, 2026
The client changes this branch needs live in that pull request, and the
provider's own CI builds without the go.work that the acceptance lane
writes, so it needs a version that carries them. The pseudo-version is
interim: swap it for the release that follows the merge of that pull
request before this branch merges.

CU-123ymg9utgq

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@nroi
nroi force-pushed the feature/CU-123ymg9utgq branch from 5ea0bdc to 656b6f0 Compare September 22, 2026 08:33
The building block implementation and the integration config both derive
their type from the one variant that is set. Both copies of that logic
panicked when no variant or several variants were set, which user
configuration and redacted API responses can both produce. A shared
helper now returns an error, exposed as InferType on both types, and
MarshalJSON reports it. The integration config only infers its type when
none is set, because the built-in integrations come with a type but no
variant.

CU-123ymg9utgq

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@nroi
nroi force-pushed the feature/CU-123ymg9utgq branch from 656b6f0 to d6063d0 Compare September 22, 2026 08:37
@nroi
nroi force-pushed the feature/CU-123ymg9utgq branch from d6063d0 to 0cc1fca Compare September 22, 2026 08:41
@nroi
nroi marked this pull request as ready for review September 22, 2026 09:29
@nroi nroi changed the title feature/CU 123ymg9utgq fix: adapt to meshstack returning 200 instead of 403 Sep 22, 2026
@nroi
nroi requested a review from grubmeshi September 22, 2026 11:01
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.

1 participant