Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move stack metadata related to terramate.stack #380

Merged
merged 13 commits into from
Jun 7, 2022

Conversation

katcipis
Copy link
Contributor

@katcipis katcipis commented Jun 3, 2022

Moving stack metadata to "terramate.stack". The old metadata is being kept for now to avoid breaking anything. New metadata:

  • terramate.name -> terramate.stack.name
  • terramate.description -> terramate.stack.description
  • terramate.path -> terramate.stack.path.absolute

New metadata will be added on a future PR.

@katcipis katcipis requested a review from i4ki June 3, 2022 12:57
@katcipis katcipis self-assigned this Jun 3, 2022
@katcipis katcipis marked this pull request as ready for review June 3, 2022 12:57
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #380 (289d661) into main (aaebe3b) will decrease coverage by 0.04%.
The diff coverage is 75.55%.

@@            Coverage Diff             @@
##             main     #380      +/-   ##
==========================================
- Coverage   69.34%   69.30%   -0.05%     
==========================================
  Files          37       37              
  Lines        7281     7300      +19     
==========================================
+ Hits         5049     5059      +10     
- Misses       1975     1981       +6     
- Partials      257      260       +3     
Flag Coverage Δ
tests 69.30% <75.55%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/terramate/cli/cli.go 5.54% <0.00%> (ø)
stack/eval.go 72.72% <65.21%> (-10.61%) ⬇️
hcl/eval/eval.go 84.81% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaebe3b...289d661. Read the comment docs.

ctyObject := cty.Object(ctyTypes)
ctyVal, err := gocty.ToCtyValue(m, ctyObject)
ctyVal, err := gocty.ToCtyValue(values, ctyObject)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm torn if we shouldn't just panic here. The conversion always uses terramate evaluated things (or built by ourselves some other way), so feels like a bug/critical thing going on that could be panicked (would simplify a lot the error handling around this). WDYT @i4ki ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think makes sense, as this a controlled namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will improve this on a follow up PR.

@katcipis katcipis changed the title feat: move metadata related to stack feat: move stack metadata related to terramate.stack Jun 5, 2022
Copy link
Contributor

@i4ki i4ki left a comment

Choose a reason for hiding this comment

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

lgtm

@katcipis katcipis merged commit 2358a7b into main Jun 7, 2022
@katcipis katcipis deleted the katcipis-move-metadata-stack branch June 7, 2022 12:11
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.

None yet

2 participants