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(panic): gracefully handle if we can't find a Release #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NeilHanlon
Copy link
Member

Sometimes upstream pushes a commit without %{dist} in Release, which has a side effect of breaking Peridot/srpmproc due to Peridot trying to extract information based on the tag, and the tag not having this information.

This change adds error handling for this situation

@resf-prow
Copy link
Contributor

resf-prow bot commented Jun 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: NeilHanlon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@resf-prow resf-prow bot added the approved label Jun 25, 2024
@NeilHanlon
Copy link
Member Author

n.b. -- we should also remove the tag when this happens.

@NeilHanlon
Copy link
Member Author

2024/06/25 02:11:58 ERROR Activity panic. Namespace default TaskQueue pb-abb2efee-ebb4-4f12-9aa1-b312a43170b7-import WorkerID 7@pb-abb2efee-ebb4-4f12-9aa1-b312a43170b7-import@ WorkflowID abb2efee-ebb4-4f12-9aa1-b312a43170b7 RunID c47917bc-8f0a-4138-b3c8-14a6164267c4 ActivityType UpstreamDistGitActivity Attempt 5 PanicError runtime error: invalid memory address or nil pointer dereference PanicStack activity for pb-abb2efee-ebb4-4f12-9aa1-b312a43170b7-import [panic]:
peridot.resf.org/peridot/builder/v1/workflow.(*Controller).srpmprocToImportRevisions(0xc000a12210?, 0xc000068c00, {0xc001b7a6b0, 0x8}, 0xc00088a3c0, 0x0)
	peridot/builder/v1/workflow/import.go:1024 +0x1a8
peridot.resf.org/peridot/builder/v1/workflow.(*Controller).UpstreamDistGitActivity(0xc000a12210, {0x2b528f8?, 0xc001ba4270?}, 0xc001ba4210)
	peridot/builder/v1/workflow/import.go:1164 +0xaa5
reflect.Value.call({0x20ea400?, 0xc0005e37e0?, 0x30?}, {0x24baa92, 0x4}, {0xc001ba42a0, 0x2, 0xc001ba42a0?})
	GOROOT/src/reflect/value.go:596 +0xca6
reflect.Value.Call({0x20ea400?, 0xc0005e37e0?, 0x2a?}, {0xc001ba42a0?, 0x30?, 0x7f6492174f48?})
	GOROOT/src/reflect/value.go:380 +0xb9
peridot.resf.org/vendor/go.temporal.io/sdk/internal.executeFunction({0x20ea400, 0xc0005e37e0}, {0xc00060c900, 0x2, 0x20a6820?})
	vendor/go.temporal.io/sdk/internal/internal_worker.go:1543 +0x26b
peridot.resf.org/vendor/go.temporal.io/sdk/internal.executeFunctionWithContext({0x2b528f8, 0xc001ba4270}, {0x20ea400, 0xc0005e37e0}, {0xc000b28a30, 0x1, 0x1})
	vendor/go.temporal.io/sdk/internal/internal_worker.go:1527 +0x1ae
peridot.resf.org/vendor/go.temporal.io/sdk/internal.(*activityEnvironmentInterceptor).ExecuteActivity(0xc001374280, {0x2b529a0?, 0xc0004189a0?}, 0xc000bdcee8)
	vendor/go.temporal.io/sdk/internal/internal_activity.go:362 +0x67
peridot.resf.org/vendor/go.temporal.io/sdk/internal.(*activityExecutor).ExecuteWithActualArgs(0xc0002cd2c0, {0x2b529a0, 0xc0004189a0}, {0xc000b28a30, 0x1, 0x1})
	vendor/go.temporal.io/sdk/internal/internal_worker.go:798 +0x148
peridot.resf.org/vendor/go.temporal.io/sdk/internal.(*activityExecutor).Execute(0xc0002cd2c0, {0x2b529a0, 0xc0004189a0}, 0xc000c0a4f8)
	vendor/go.temporal.io/sdk/internal/internal_worker.go:784 +0x139
peridot.resf.org/vendor/go.temporal.io/sdk/internal.(*activityTaskHandlerImpl).Execute(0xc000ca6540, {0xc00005206a, 0x2e}, 0xc00087e4d0)
	vendor/go.temporal.io/sdk/internal/internal_task_handlers.go:1823 +0x922
peridot.resf.org/vendor/go.temporal.io/sdk/internal.(*activityTaskPoller).ProcessTask(0xc0005a5580, {0x1f80ae0, 0xc000b2a6a0})

@NeilHanlon NeilHanlon requested a review from mstg July 25, 2024 12:52
Sometimes upstream pushes a commit without %{dist} in Release, which has
a side effect of breaking Peridot/srpmproc due to Peridot trying to
extract information based on the tag, and the tag not having this
information.

This change adds error handling for this situation
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @NeilHanlon and the rest of your teammates on Graphite Graphite

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

Successfully merging this pull request may close these issues.

1 participant