-
Notifications
You must be signed in to change notification settings - Fork 159
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
[MM-47629] Don't crash when a run channel has been deleted #1908
Conversation
webapp/src/components/backstage/playbook_runs/playbook_run/playbook_run.tsx
Show resolved
Hide resolved
} | ||
team, err := s.pluginAPI.Team.Get(channel.TeamId) | ||
team, err := s.pluginAPI.Team.Get(playbookRun.TeamID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the run teamID because the channel might not exist
@@ -1266,11 +1266,12 @@ func (s *PlaybookRunServiceImpl) GetPlaybookRunMetadata(playbookRunID string) (* | |||
// Get main channel details | |||
channel, err := s.pluginAPI.Channel.Get(playbookRun.ChannelID) | |||
if err != nil { | |||
return nil, errors.Wrapf(err, "failed to retrieve channel id '%s'", playbookRun.ChannelID) | |||
s.pluginAPI.Log.Warn("failed to retrieve channel id", "channel_id", playbookRun.ChannelID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is the main core change: considering that a missing channel is not a big deal and we can continue the process without it.
<LockOutlineIcon size={20}/> {formatMessage({defaultMessage: 'Private'})} | ||
</ItemDisabledContent> | ||
} | ||
<ChannelRow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the channel row to it's own component because we started to have a lot of conditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just two thoughts, but not blocking.
webapp/src/components/backstage/playbook_runs/playbook_run/playbook_run.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
webapp/src/components/backstage/playbook_runs/playbook_run/rhs_info_overview.tsx
Outdated
Show resolved
Hide resolved
…_info_overview.tsx Co-authored-by: Caleb Roseland <[email protected]>
Test server destroyed |
1 similar comment
Test server destroyed |
Test server creation failed. Review the error details here. |
Summary
This PR allows for a run page to be visited even if the associated channel has been removed.
Ticket Link
https://mattermost.atlassian.net/browse/MM-47629
Checklist
- [ ] Telemetry updated- [ ] Gated by experimental feature flag