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

fix: generate_file.context=root not handled in the safeguards. #1863

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

i4ki
Copy link
Contributor

@i4ki i4ki commented Sep 11, 2024

What this PR does / why we need it:

Fix the safeguard not triggering for generate_file.context == root case.

Which issue(s) this PR fixes:

none

Special notes for your reviewer:

Does this PR introduce a user-facing change?

yes, fixes a bug.

@i4ki i4ki requested a review from a team as a code owner September 11, 2024 23:56
Copy link

github-actions bot commented Sep 12, 2024

metric: time/op
CloudReadLines-4: old 1.02ms ± 4%: new 0.98ms ± 3%: delta: -3.85%
CloudReadLine-4: old 7.28ms ± 1%: new 7.30ms ± 1%: delta: 0.00%
ListFiles-4: old 80.7µs ± 1%: new 79.6µs ± 1%: delta: -1.44%
Generate-4: old 5.03s ± 1%: new 4.96s ± 2%: delta: -1.37%
GenerateRegex-4: old 3.33s ± 1%: new 3.27s ± 1%: delta: -1.70%
TokensForExpressionComplex-4: old 1.26ms ± 0%: new 1.25ms ± 0%: delta: -0.22%
TokensForExpressionPlainStringNoNewline-4: old 790ns ± 1%: new 790ns ± 0%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 23.9µs ± 1%: new 23.9µs ± 1%: delta: 0.00%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 1.45ms ± 0%: new 1.45ms ± 0%: delta: 0.00%
TokensForExpression-4: old 1.26ms ± 1%: new 1.26ms ± 0%: delta: 0.00%
PartialEvalComplex-4: old 521µs ± 1%: new 517µs ± 1%: delta: -0.80%
PartialEvalSmallString-4: old 3.81µs ± 1%: new 3.72µs ± 0%: delta: -2.19%
PartialEvalHugeString-4: old 1.92ms ± 1%: new 1.91ms ± 1%: delta: -0.45%
PartialEvalHugeInterpolatedString-4: old 4.75ms ± 1%: new 4.71ms ± 1%: delta: -0.86%
PartialEvalObject-4: old 24.8µs ± 1%: new 24.6µs ± 1%: delta: -1.09%
TmAllTrueLiteralList-4: old 620µs ± 1%: new 620µs ± 1%: delta: -0.14%
TmAllTrueFuncall-4: old 20.5µs ± 1%: new 20.2µs ± 1%: delta: -1.17%
TmAnyTrueLiteralList-4: old 4.87ms ± 1%: new 4.87ms ± 0%: delta: 0.00%
TmAnyTrueFuncall-4: old 20.8µs ± 0%: new 20.7µs ± 1%: delta: -0.42%
TmTernary-4: old 2.60µs ± 0%: new 2.56µs ± 0%: delta: -1.31%
TmTryUnknownFunc-4: old 2.29µs ± 1%: new 2.26µs ± 1%: delta: -1.03%
TmTryUnknownVariable-4: old 2.18µs ± 1%: new 2.17µs ± 1%: delta: -0.34%
TmTryUnknownObjectKey-4: old 2.50µs ± 1%: new 2.48µs ± 1%: delta: -0.84%
metric: alloc/op
CloudReadLines-4: old 3.12MB ± 0%: new 3.12MB ± 0%: delta: 0.00%
CloudReadLine-4: old 3.37MB ± 0%: new 3.37MB ± 0%: delta: 0.00%
ListFiles-4: old 23.3kB ± 0%: new 23.3kB ± 0%: delta: 0.01%
Generate-4: old 4.47GB ± 0%: new 4.47GB ± 0%: delta: 0.00%
GenerateRegex-4: old 1.84GB ± 0%: new 1.84GB ± 0%: delta: 0.00%
TokensForExpressionComplex-4: old 394kB ± 0%: new 394kB ± 0%: delta: -0.00%
TokensForExpressionPlainStringNoNewline-4: old 512B ± 0%: new 512B ± 0%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 12.5kB ± 0%: new 12.5kB ± 0%: delta: 0.00%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 395kB ± 0%: new 395kB ± 0%: delta: 0.00%
TokensForExpression-4: old 395kB ± 0%: new 394kB ± 0%: delta: 0.00%
PartialEvalComplex-4: old 338kB ± 0%: new 338kB ± 0%: delta: -0.00%
PartialEvalSmallString-4: old 1.74kB ± 0%: new 1.74kB ± 0%: delta: 0.00%
PartialEvalHugeString-4: old 196kB ± 0%: new 196kB ± 0%: delta: 0.00%
PartialEvalHugeInterpolatedString-4: old 4.05MB ± 0%: new 4.05MB ± 0%: delta: 0.00%
PartialEvalObject-4: old 17.2kB ± 0%: new 17.2kB ± 0%: delta: 0.00%
TmAllTrueLiteralList-4: old 321kB ± 0%: new 321kB ± 0%: delta: 0.00%
TmAllTrueFuncall-4: old 10.6kB ± 0%: new 10.6kB ± 0%: delta: 0.00%
TmAnyTrueLiteralList-4: old 2.09MB ± 0%: new 2.09MB ± 0%: delta: -0.00%
TmAnyTrueFuncall-4: old 10.7kB ± 0%: new 10.7kB ± 0%: delta: 0.00%
TmTernary-4: old 1.20kB ± 0%: new 1.20kB ± 0%: delta: 0.00%
TmTryUnknownFunc-4: old 784B ± 0%: new 784B ± 0%: delta: 0.00%
TmTryUnknownVariable-4: old 768B ± 0%: new 768B ± 0%: delta: 0.00%
TmTryUnknownObjectKey-4: old 952B ± 0%: new 952B ± 0%: delta: 0.00%
metric: allocs/op
CloudReadLines-4: old 5.54k ± 0%: new 5.54k ± 0%: delta: 0.00%
CloudReadLine-4: old 60.0k ± 0%: new 60.0k ± 0%: delta: 0.00%
ListFiles-4: old 321 ± 0%: new 321 ± 0%: delta: 0.00%
Generate-4: old 51.4M ± 0%: new 51.4M ± 0%: delta: 0.00%
GenerateRegex-4: old 36.8M ± 0%: new 36.8M ± 0%: delta: 0.00%
TokensForExpressionComplex-4: old 4.83k ± 0%: new 4.83k ± 0%: delta: 0.00%
TokensForExpressionPlainStringNoNewline-4: old 20.0 ± 0%: new 20.0 ± 0%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 227 ± 0%: new 227 ± 0%: delta: 0.00%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 3.19k ± 0%: new 3.19k ± 0%: delta: 0.00%
TokensForExpression-4: old 4.83k ± 0%: new 4.83k ± 0%: delta: 0.00%
PartialEvalComplex-4: old 3.48k ± 0%: new 3.48k ± 0%: delta: 0.00%
PartialEvalSmallString-4: old 23.0 ± 0%: new 23.0 ± 0%: delta: 0.00%
PartialEvalHugeString-4: old 35.0 ± 0%: new 35.0 ± 0%: delta: 0.00%
PartialEvalHugeInterpolatedString-4: old 23.1k ± 0%: new 23.1k ± 0%: delta: 0.00%
PartialEvalObject-4: old 152 ± 0%: new 152 ± 0%: delta: 0.00%
TmAllTrueLiteralList-4: old 5.94k ± 0%: new 5.94k ± 0%: delta: 0.00%
TmAllTrueFuncall-4: old 275 ± 0%: new 275 ± 0%: delta: 0.00%
TmAnyTrueLiteralList-4: old 59.6k ± 0%: new 59.6k ± 0%: delta: 0.00%
TmAnyTrueFuncall-4: old 277 ± 0%: new 277 ± 0%: delta: 0.00%
TmTernary-4: old 28.0 ± 0%: new 28.0 ± 0%: delta: 0.00%
TmTryUnknownFunc-4: old 21.0 ± 0%: new 21.0 ± 0%: delta: 0.00%
TmTryUnknownVariable-4: old 20.0 ± 0%: new 20.0 ± 0%: delta: 0.00%
TmTryUnknownObjectKey-4: old 23.0 ± 0%: new 23.0 ± 0%: delta: 0.00%

@i4ki i4ki force-pushed the i4k-fix-generate-file branch 2 times, most recently from 6d3cdd5 to 04fff39 Compare September 12, 2024 01:20
@i4ki i4ki force-pushed the i4k-fix-generate-file branch 3 times, most recently from 3f027d4 to 6a43ff7 Compare September 23, 2024 11:11
Copy link

github-actions bot commented Sep 23, 2024

Preview of ubuntu-focal/go1.21 tests in 6885a4e

🔍 View Details on Terramate Cloud

e2etests/core
generate

Copy link

github-actions bot commented Sep 23, 2024

Preview of macos-ventura/go1.21 tests in 6885a4e

🔍 View Details on Terramate Cloud

e2etests/core
generate

@i4ki i4ki force-pushed the i4k-fix-generate-file branch from 6a43ff7 to 2790244 Compare September 23, 2024 12:59
@i4ki i4ki force-pushed the i4k-fix-generate-file branch from 2790244 to 6885a4e Compare September 23, 2024 14:06
Copy link
Contributor

@soerenmartius soerenmartius left a comment

Choose a reason for hiding this comment

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

lgtm

@i4ki i4ki merged commit d3dbd2e into main Sep 23, 2024
6 checks passed
@i4ki i4ki deleted the i4k-fix-generate-file branch September 23, 2024 14:53
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