Skip to content

Commit

Permalink
hide cpu and memory app events from activity feed (#3763)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored Oct 8, 2023
1 parent 353cfbe commit 7ec5ba4
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ const ActivityFeed: React.FC<Props> = ({ appName, deploymentTargetId, currentClu

// remove this filter when https://linear.app/porter/issue/POR-1676/disable-porter-agent-code-for-cpu-alerts is resolved
const isNotFilteredAppEvent = (event: PorterAppEvent) => {
return !(event.type === "APP_EVENT" && event.metadata?.short_summary?.includes("non-zero exit code"));
return !(event.type === "APP_EVENT" &&
(
event.metadata?.short_summary?.includes("requesting more memory than is available")
|| event.metadata?.short_summary?.includes("requesting more CPU than is available")
|| event.metadata?.short_summary?.includes("non-zero exit code")
)
);
}

const { data: eventFetchData, isLoading: isEventFetchLoading, isRefetching } = useQuery(
Expand Down

0 comments on commit 7ec5ba4

Please sign in to comment.