Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

fix: address issue with computeclass tables not converting properly #2438

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

tylerslaton
Copy link
Contributor

This fixes an issue where acorn offerings computeclasses and kubectl get clustercomputeclasses would fail with the following error:

  ✗  ERROR:  template: :1:39: executing "" at <memoryToRange .Memory>: error calling memoryToRange: object passed is not a ComputeClassMemory struct

This was due to a recent change where the Memory struct on apiv1.ComputeClass and adminv1.ClusterComputeClass are now different. The fix is to check for both types and process them accordingly when converting values into a table.

Checklist

  • The title of this PR would make a good line in Acorn's Release Note's Changelog
  • The title of this PR ends with a link to the main issue being address in parentheses, like: This is a title (#1216). Here's an example
  • All relevant issues are referenced in the PR description. NOTE: don't use GitHub keywords that auto-close issues
  • Commits follow contributing guidance
  • Automated tests added to cover the changes. If tests couldn't be added, an explanation is provided in the Verification and Testing section
  • Changes to user-facing functionality, API, CLI, and upgrade impacts are clearly called out in PR description
  • PR has at least two approvals before merging (or a reasonable exception, like it's just a docs change)

pkg/cli/builder/table/funcs.go Outdated Show resolved Hide resolved
@cjellick
Copy link
Member

go ahead and merge. you addressed @grant Linville's comment and he's getting lunch. donnie approved. im good with you merging it

@cjellick cjellick dismissed g-linville’s stale review January 19, 2024 18:52

tyler addressed grants comment. im dismissing the review so he can merge...once its green

@tylerslaton tylerslaton merged commit 7083bc6 into acorn-io:main Jan 19, 2024
4 checks passed
@tylerslaton tylerslaton deleted the fix-cc-tables branch January 19, 2024 18:57
@tylerslaton
Copy link
Contributor Author

#2429

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants