PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.75k stars 5.27k forks source link

[BUG] in Submit an app UI, custom fields from submitting one app are cached over to the next one. #9146

Open sergio-eliot-rodriguez opened 9 months ago

sergio-eliot-rodriguez commented 9 months ago

Describe the bug When you submit an app "A" with custom fields X, if you submit an app "B" after you click OK on "are you sure you want to submit app A" dialog, then when you try to submit app "B", the submit an app ui will complain about custom field "X" not being defined.

To Reproduce Steps to reproduce the behavior:

  1. Go to Submit an App UI
  2. Name the app with any name of your choice, define a custom field "X" and a test request
  3. Submit the app
  4. In the "Are you sure you want to submit app..." dialog, click OK
  5. You are taken back to the initial point of Submit an App UI
  6. Fill the submit app with a different name of the step 2), define a custom field "Y" and a test request
  7. Click the "Test" button
  8. Notice that test dialog complains about "X" custom field not being defined. Error thrown states Custom fields X is not a valid field for app

Expected behavior Test request for the app from step 6) should have been run properly because the only custom field defined was the custom field "Y" of step 6. The error message is about the custom field in step 2), but this app was already submitted (step 4)

A clear and concise description of what you expected to happen. App from step 6) should run the test request with the custom fields defined in steps 6) Custom fields from the previous step 2 should have been removed, not persisted, when submitting the new app (flow starting in step 5 with a different app) Screenshots image

The test dialog throws a Custom fields X is not a valid field for app error, despite not beign used in the app definition.

Desktop (please complete the following information):

Additional context You can work around by defining the custom field in the error ("X" in the example), however the OP approving the app will need to remove custom field X because it is not meant for the app in question.

Another work around is to log out of PD and log back in so that the custom fields from previously submitted app are erased from caché. Alternatively, one can always open up a browser in InCognito mode, login to PD and submit an app seamlessly.

You can use i.e. for test request in the flow, Woovi for app A and Zamzar for App B, which offer simple test request to config and whose details are in 1pw.

when flagging and reproducing the issue, i submitted test_apps_for_bug_flagging_app_001 and test_apps_for_bug_flagging_app_002 to reproduce and show the bug. perhaps internally there are logs about the change in state of each app

sergio-eliot-rodriguez commented 2 months ago

I've been stumbled upon this issue other times since flagging this issue. However, for API Key based apps, we are shipping directly to the martketplace, without a review so it is important this bug is solved so that unnecessary custom fields from previous sessions are published to an app.

Here I recorded a video with the bug https://sergio_eliot-hotmail.tinytake.com/msc/OTcyODMzNl8yMzM2NTE3NQ

in a first session, Leadoku is submitted with a custom field analytics_code then, in a second session Teamcamp is setup with an api_key custom field. when testing, the submit an app form complains about an analytics_code, which was defined in the previous session for Leadoku, but analytics_code should have been erased from custom fields object when Leadoku was submitted and should have shown in the posterior Teamcamp app.