Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Truncate execution error message only when size exceeds limit #533

Merged
merged 8 commits into from
Mar 6, 2023
Merged

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Mar 6, 2023

TL;DR

FlyteAdmin panics when fetching a failed workflow On flyteConsole

{"json":{},"level":"fatal","msg":"panic-ed for request: [workflow_execution_id:\u003cproject:\"flytesnacks\" 
domain:\"development\" name:\"fe8b97db1a638438181a\" \u003e limit:10000 sort_by:\u003ckey:\"created_at\" 
direction:ASCENDING \u003e ] with err: runtime error: slice bounds out of range [:100] with length 17 with Stack: 
goroutine 2580 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:24 
+0x65\ngithub.com/flyteorg/flyteadmin/pkg/rpc/adminservice.(*AdminService).interceptPanic(0xc001db8000, 
{0x2c094d0, 0xc004129f20}, {0x2bf7f00?, 
0xc003e6d030})\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/rpc/adminservice/base.go:59 +0x85\npanic({0x2505d20,
 0xc00114e900})\n\t/usr/local/go/src/runtime/panic.go:838 
+0x207\ngithub.com/flyteorg/flyteadmin/pkg/repositories/transformers.FromNodeExecutionModel({{0x6b3, {0x5a03368, 
0xedb8b4159, 0x4004360}, {0x1390c618, 0xedb8b463b, 0x4004360}, 0x0}, {{{0xc00407ac70, 0xb}, ...}, ...}, ...}, 
...)\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/repositories/transformers/node_execution.go:289 
+0x3ed\ngithub.com/flyteorg/flyteadmin/pkg/manager/impl.(*NodeExecutionManager).transformNodeExecutionModel(_, 
{_, _}, {{0x6b3, {0x5a03368, 0xedb8b4159, 0x4004360}, {0x1390c618, 0xedb8b463b, 0x4004360}, ...}, ...}, 
...)\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/manager/impl/node_execution_manager.go:326 
+0x205\ngithub.com/flyteorg/flyteadmin/pkg/manager/impl.
(*NodeExecutionManager).transformNodeExecutionModelList(0x2710?, {0x2c094d0, 0xc004148210}, {0xc0040a2000, 
0x2, 0xc00412d790?})\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/manager/impl/node_execution_manager.go:337 
+0x216\ngithub.com/flyteorg/flyteadmin/pkg/manager/impl.(*NodeExecutionManager).listNodeExecutions(0xc0004188c0,
 {0x2c094d0, 0xc004148210}, {0xc004148240?, 0x3, 0x3}, {0x0?, 0x0?}, 0x2710, {0x0, ...}, 
...)\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/manager/impl/node_execution_manager.go:411 
+0x34d\ngithub.com/flyteorg/flyteadmin/pkg/manager/impl.
(*NodeExecutionManager).ListNodeExecutions(0xc0004188c0, {0x2c094d0, 0xc004129f20}, {0xc004146000, 0x2710, 
{0x0, 0x0}, {0x0, 0x0}, 0xc003e6f300, 
...})\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/manager/impl/node_execution_manager.go:455 
+0x37b\ngithub.com/flyteorg/flyteadmin/pkg/rpc/adminservice.
(*AdminService).ListNodeExecutions.func1()\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/rpc/adminservice/node_executi
on.go:60 +0xb6\ngithub.com/flyteorg/flytestdlib/promutils.StopWatch.Time({{0x7f4b4a00d3e8?, 0xc001928c00?}, 
0x81b220?}, 0xc000731920)\n\t/go/pkg/mod/github.com/flyteorg/[email protected]/promutils/scope.go:59 
+0xc2\ngithub.com/flyteorg/flyteadmin/pkg/rpc/adminservice/util.(*RequestMetrics).Time(...)\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/rpc/adminservice/util/metrics.go:33\ngithub.co
m/flyteorg/flyteadmin/pkg/rpc/adminservice.(*AdminService).ListNodeExecutions(0xc001db8000, {0x2c094d0?, 
0xc004129f20?}, 0xc004148090?)\n\t/go/src/github.com/flyteorg/flyteadmin/pkg/rpc/adminservice/node_execution.go:59 +0x169\ngithub.com/flyteorg/flyteidl/gen/pb-
go/flyteidl/service._AdminService_ListNodeExecutions_Handler.func1({0x2c094d0, 0xc004129f20}, {0x25a23a0?, 
0xc003e6d030})\n\t/go/pkg/mod/github.com/flyteorg/[email protected]/gen/pb-go/flyteidl/service/admin.pb.go:1492 
+0x7b\ngithub.com/grpc-ecosystem/go-grpc-prometheus.(*ServerMetrics).UnaryServerInterceptor.func1({0x2c094d0, 
0xc004129f20}, {0x25a23a0, 0xc003e6d030}, 0x7f4b4a19ac28?, 0xc0041440c0)\n\t/go/pkg/mod/github.com/grpc-
ecosystem/[email protected]/server_metrics.go:107 +0x87\ngithub.com/grpc-ecosystem/go-grpc-
middleware.ChainUnaryServer.func1.1.1({0x2c094d0?, 0xc004129f20?}, {0x25a23a0?, 
0xc003e6d030?})\n\t/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 
+0x3a\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1({0x2c094d0, 0xc004129f20}, 
{0x25a23a0, 0xc003e6d030}, 0xc00252eaf0?, 0x22d83e0?)\n\t/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-
[email protected]/chain.go:34 +0xbf\ngithub.com/flyteorg/flyteidl/gen/pb-
go/flyteidl/service._AdminService_ListNodeExecutions_Handler({0x266c740?, 0xc001db8000}, {0x2c094d0, 
0xc004129f20}, 0xc00193ad80, 0xc0005d37a0)\n\t/go/pkg/mod/github.com/flyteorg/[email protected]/gen/pb-
go/flyteidl/service/admin.pb.go:1494 +0x138\ngoogle.golang.org/grpc.(*Server).processUnaryRPC(0xc000640380, 
{0x2c11e20, 0xc0002411e0}, 0xc0000a0000, 0xc001d012c0, 0x3fe35e0, 
0x0)\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1283 +0xcfd\ngoogle.golang.org/grpc.
(*Server).handleStream(0xc000640380, {0x2c11e20, 0xc0002411e0}, 0xc0000a0000, 
0x0)\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1620 +0xa1b\ngoogle.golang.org/grpc.
(*Server).serveStreams.func1.2()\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:922 +0x98\ncreated by 
google.golang.org/grpc.(*Server).serveStreams.func1\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:920 
+0x28a\n","ts":"2023-03-06T17:24:12Z"}

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

image

Tracking Issue

NA

Follow-up issue

NA

pingsutw added 7 commits March 4, 2023 12:53
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #533 (70d1309) into master (9508833) will increase coverage by 1.55%.
The diff coverage is 100.00%.

❗ Current head 70d1309 differs from pull request most recent head 2e7f90d. Consider uploading reports for the commit 2e7f90d to get more accurate results

@@            Coverage Diff             @@
##           master     #533      +/-   ##
==========================================
+ Coverage   60.09%   61.65%   +1.55%     
==========================================
  Files         169      169              
  Lines       15092    12417    -2675     
==========================================
- Hits         9070     7656    -1414     
+ Misses       5221     3960    -1261     
  Partials      801      801              
Flag Coverage Δ
unittests ?

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

Impacted Files Coverage Δ
pkg/repositories/transformers/execution.go 82.68% <100.00%> (+2.82%) ⬆️
pkg/repositories/transformers/node_execution.go 73.54% <100.00%> (+3.10%) ⬆️
pkg/repositories/transformers/task_execution.go 74.91% <100.00%> (+2.53%) ⬆️
...ync/notifications/implementations/aws_processor.go 65.67% <0.00%> (-3.47%) ⬇️
pkg/rpc/adminservice/util/metrics.go 69.69% <0.00%> (-2.81%) ⬇️
...ync/notifications/implementations/gcp_processor.go 65.85% <0.00%> (-2.15%) ⬇️
auth/authzserver/token.go 58.82% <0.00%> (-2.05%) ⬇️
pkg/manager/impl/executions/queues.go 90.38% <0.00%> (-1.68%) ⬇️
.../notifications/implementations/sendgrid_emailer.go 71.79% <0.00%> (-1.68%) ⬇️
auth/authzserver/authorize.go 20.63% <0.00%> (-1.46%) ⬇️
... and 148 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Kevin Su <[email protected]>
Copy link
Contributor

@katrogan katrogan left a comment

Choose a reason for hiding this comment

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

thank you!

@pingsutw pingsutw merged commit 326ca45 into master Mar 6, 2023
@pingsutw pingsutw deleted the nit branch March 6, 2023 19:29
eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* Bump propeller

Signed-off-by: Kevin Su <[email protected]>

* Fixed slice bounds out of range

Signed-off-by: Kevin Su <[email protected]>

* Fixed slice bounds out of range

Signed-off-by: Kevin Su <[email protected]>

* update go.mod

Signed-off-by: Kevin Su <[email protected]>

* update go.mod

Signed-off-by: Kevin Su <[email protected]>

* update

Signed-off-by: Kevin Su <[email protected]>

* Add tests

Signed-off-by: Kevin Su <[email protected]>

* lint

Signed-off-by: Kevin Su <[email protected]>

---------

Signed-off-by: Kevin Su <[email protected]>
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.

2 participants