PipedreamHQ / PipedreamHQ/pipedream

[BUG] console.warn doesn't work on source components

Open
#2,217 1 comment 0 reactions 0 assignees View on GitHub
bug component ee tracked internally triaged
Dominant language
JavaScript
Stars
11.7k
Forks
5.8k
Avg merge
3d 10h
Merged PRs (30d)
102

Description

**Describe the bug**
messages streamed with `console.warn` aren't shown in the Logs tab under Pipedream UI's source page.

**To Reproduce**
In order to show the behavior, I will use a timer based source, that has an implementation of its `deploy` method. For reporting this issue. I selected Reddit's "New links by user". However, this issue seems to be manifested across any source component.
Steps to reproduce the behavior:
1. On your local development environment, modify any timer based source, with an implementation of the `deploy` method, to include the instructions `console.warn("This is a console.warn message");`, `console.log("This is a console.log message");`.
2. Deploy your modified source, using any props required by the source.
3. Go to Pipedream's UI and open up the source you just deployed. Once there, open the "Logs" tab.
4. Notice that the message "This is a console.warn message" was not logged. Only the message streamed with `console.log` is logged

**Expected behavior**
The message ""This is a console.warn message" that was streamed with `console.warn` appears under the source's "Logs" tab of the Pipedream UI, along with the message streamed with `console.log`

**Screenshots**
![image](https://user-images.githubusercontent.com/25184117/153289265-ba7a1eb0-0d9e-48f9-841b-08abeb6a0c0f.png)
![image](https://user-images.githubusercontent.com/25184117/153289284-a8f9fbb9-5454-4652-ac49-2a55aca7b112.png)

**Desktop (please complete the following information):**
- OS: Microsoft Windows 11 Home Single Language: 10.0.22000 N/A Build 22000
- Browser 1.35.100 Chromium: 98.0.4758.87 (Official Build) (64-bit)

**Smartphone (please complete the following information):**
Smartphone information doesn't apply, the issue was not tested using an Smartphone.

**Additional context**
I found this bug while tackling Maligun sources, specifically "new-bounce". Mailgun components are now being reviewed and corrected under this [Pull Request](https://github.com/PipedreamHQ/pipedream/pull/1291). There's a review comment about the code using to check an if condition related to a [Node.JS 14 feature](https://github.com/PipedreamHQ/pipedream/pull/2022#discussion_r781678367), which when testing depending on the input, the expected behavior is to log a message using `console.warn`. I didn't use this scenario to report he bug because when it comes to Mailgun, it is not an usual use case, and, in order to test, a custom payload needs to be prepared. To keep things easy, I expressed the bug in terms of just logging messages into source's Logs tab in Pipedream UI, separately from this context.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.