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: removed default value for API DS, updated conditions for headers and apiformattype #14107

Merged
merged 4 commits into from
Jun 1, 2022

Conversation

AmanAgarwal041
Copy link
Contributor

@AmanAgarwal041 AmanAgarwal041 commented May 25, 2022

Description

Added changes :

  • Removed the default values for API datasource and made it to be empty.
  • Added conditions to update the content type of API when the method type is changed from one to another.
  • Updated the apiformattype to None when the method type is changed to GET and the content-type is not specifically defined and the body is also empty.

Fixes #11822
Fixes #14132

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manually

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Test coverage results 🧪

🔴 Total coverage has decreased
// Code coverage diff between base branch:release and head branch: fix/11822-default-content-type 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 56.7 (-0.01) 38.64 (-0.02) 36.22 (0) 56.95 (-0.01)
🔴 app/client/src/components/ads/MultiSwitch.tsx 40 (0) 50 (-7.14) 0 (0) 40 (0)
🔴 app/client/src/sagas/ApiPaneSagas.ts 16.36 (-0.23) 1.12 (-0.12) 8.7 (0) 17.89 (-0.34)
🟢 app/client/src/utils/WorkerUtil.ts 89.76 (0.78) 70.59 (0) 100 (0) 93.33 (0.95)
🔴 app/client/src/utils/autocomplete/TernServer.ts 52.71 (-0.23) 40.83 (-0.84) 36.21 (0) 56.74 (-0.25)

@vercel
Copy link

vercel bot commented May 25, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview May 30, 2022 at 8:38AM (UTC)

@github-actions github-actions bot added Actions Pod BE Coders Pod Issues related to users writing code to fetch and update data Bug Something isn't working Frontend This label marks the issue or pull request to reference client code Needs Triaging Needs attention from maintainers to triage Reopen labels May 25, 2022
@github-actions
Copy link

Unable to find test scripts. Please add necessary tests to the PR.

@AmanAgarwal041
Copy link
Contributor Author

/ok-to-test sha=beb5cb5

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2384920616.
Workflow: Appsmith External Integration Test Workflow.
Commit: beb5cb5.
PR: 14107.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2384920616.
Commit: beb5cb5.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
SELECT_CATEGORY
scripting 1110.72 686.96 857.23 704.91 688.32 704.91 809.63 22.58 20.19
painting 4.31 6.84 7.36 6.96 6.25 6.84 6.34 18.93 17.03
rendering 314.69 303.75 367.97 307.51 291.68 307.51 317.12 9.34 8.36
BIND_TABLE_DATA
scripting 2364.07 2302.69 2201.79 2825.51 2280.07 2302.69 2394.83 10.34 9.25
painting 26.82 27.14 21.37 10.15 25.11 25.11 22.12 31.96 28.62
rendering 734.19 748.86 963.35 712.44 744.92 744.92 780.75 13.20 11.81
CLICK_ON_TABLE_ROW
scripting 2049.66 1868.55 2158.58 1616.6 1528.64 1868.55 1844.41 14.67 13.13
painting 16.42 14.63 49.73 14.86 25.69 16.42 24.27 61.56 55.09
rendering 399 310.61 394.96 294.11 289.68 310.61 337.67 16.21 14.49
UPDATE_POST_TITLE
scripting 3145.18 2802.42 2816.95 2685.03 3976.35 2816.95 3085.19 17.07 15.27
painting 17.04 19.09 32.2 16.7 15.94 17.04 20.19 33.73 30.16
rendering 432.34 405.46 416.77 386.61 386.96 405.46 405.63 4.85 4.34
OPEN_MODAL
scripting 1434.65 1397.49 2864.8 1319.54 1216.84 1397.49 1646.66 41.66 37.26
painting 19.95 13.18 16.4 12.53 15.5 15.5 15.51 19.02 17.02
rendering 479.92 538.56 463 482.83 455.7 479.92 484 6.72 6.01
CLOSE_MODAL
scripting 728.48 690.33 826.59 807.43 866.37 807.43 783.84 9.24 8.27
painting 5.88 6.36 6.08 7.19 6.62 6.36 6.43 7.93 7.15
rendering 362.7 387.63 373.55 383.04 420.58 383.04 385.5 5.66 5.06
SELECT_WIDGET_MENU_OPEN
scripting 1509.92 1495.34 1508.34 1456.56 1425.31 1495.34 1479.09 2.50 2.24
painting 7.86 10.38 6.99 15.14 7.51 7.86 9.58 35.18 31.52
rendering 548.33 537.85 526 541.74 521.37 537.85 535.06 2.09 1.87
SELECT_WIDGET_SELECT_OPTION
scripting 270.58 246.55 238.66 224.19 184.96 238.66 232.99 13.60 12.16
painting 2.76 2.25 4.56 3.26 9.59 3.26 4.48 66.52 59.60
rendering 17.1 15.12 17.04 16.48 15.07 16.48 16.16 6.19 5.57

@AmanAgarwal041
Copy link
Contributor Author

/ok-to-test sha=535fc95

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2404237281.
Workflow: Appsmith External Integration Test Workflow.
Commit: 535fc95.
PR: 14107.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2404237281.
Commit: 535fc95.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
SELECT_CATEGORY
scripting 735.69 1988.09 723.52 624.07 1969.58 735.69 1208.19 58.34 52.18
painting 4.76 7.28 5.6 5.7 4.26 5.6 5.52 20.83 18.66
rendering 353.42 301.99 296.02 286.82 300.85 300.85 307.82 8.50 7.61
BIND_TABLE_DATA
scripting 2213.03 2317.33 2234.02 2328.37 2147.06 2234.02 2247.96 3.36 3.01
painting 12.68 25.11 18.15 30.31 24.09 24.09 22.07 30.81 27.55
rendering 734.28 832.42 695.38 817.11 1096.96 817.11 835.23 18.80 16.81
CLICK_ON_TABLE_ROW
scripting 1782.56 1495.84 1764.43 1606.86 3376.76 1764.43 2005.29 38.68 34.60
painting 14.18 10.78 20.66 13.43 39.63 14.18 19.74 59.27 52.99
rendering 315.57 293.34 309.02 305.73 935.58 309.02 431.85 65.23 58.35
UPDATE_POST_TITLE
scripting 3254.18 2552.75 3525.8 2541.27 3765.97 3254.18 3127.99 17.92 16.03
painting 30.53 28.19 13.76 22.08 23.29 23.29 23.57 27.54 24.61
rendering 413.36 385.46 379.52 377.99 539.41 385.46 419.15 16.40 14.67
OPEN_MODAL
scripting 1203.7 1120.78 2288.41 1227.35 1603.11 1227.35 1488.67 32.52 29.09
painting 10.72 11.97 10.55 14.35 15.8 11.97 12.68 18.22 16.32
rendering 450.67 435.86 437.21 475.63 573.91 450.67 474.66 12.16 10.88
CLOSE_MODAL
scripting 685.26 770.77 752.15 779.75 859.27 770.77 769.44 8.11 7.25
painting 5.79 5.64 5.23 7.6 7.37 5.79 6.33 17.06 15.32
rendering 368.05 376.87 360.75 372.67 456.9 372.67 387.05 10.21 9.13
SELECT_WIDGET_MENU_OPEN
scripting 1479.05 1636.73 1499.93 1584.93 1397.39 1499.93 1519.61 6.15 5.50
painting 15.19 11.26 10.21 8.7 15.3 11.26 12.13 24.57 22.01
rendering 570.16 576.79 582.57 569.29 512.43 570.16 562.25 5.05 4.51
SELECT_WIDGET_SELECT_OPTION
scripting 259.01 300.88 231.32 243.62 273.6 259.01 261.69 10.35 9.26
painting 2.97 5.54 4.37 7.26 7.26 5.54 5.48 33.94 30.47
rendering 17.6 18.17 16.02 17.31 16.9 17.31 17.2 4.71 4.19

1 similar comment
@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2404237281.
Commit: 535fc95.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
SELECT_CATEGORY
scripting 735.69 1988.09 723.52 624.07 1969.58 735.69 1208.19 58.34 52.18
painting 4.76 7.28 5.6 5.7 4.26 5.6 5.52 20.83 18.66
rendering 353.42 301.99 296.02 286.82 300.85 300.85 307.82 8.50 7.61
BIND_TABLE_DATA
scripting 2213.03 2317.33 2234.02 2328.37 2147.06 2234.02 2247.96 3.36 3.01
painting 12.68 25.11 18.15 30.31 24.09 24.09 22.07 30.81 27.55
rendering 734.28 832.42 695.38 817.11 1096.96 817.11 835.23 18.80 16.81
CLICK_ON_TABLE_ROW
scripting 1782.56 1495.84 1764.43 1606.86 3376.76 1764.43 2005.29 38.68 34.60
painting 14.18 10.78 20.66 13.43 39.63 14.18 19.74 59.27 52.99
rendering 315.57 293.34 309.02 305.73 935.58 309.02 431.85 65.23 58.35
UPDATE_POST_TITLE
scripting 3254.18 2552.75 3525.8 2541.27 3765.97 3254.18 3127.99 17.92 16.03
painting 30.53 28.19 13.76 22.08 23.29 23.29 23.57 27.54 24.61
rendering 413.36 385.46 379.52 377.99 539.41 385.46 419.15 16.40 14.67
OPEN_MODAL
scripting 1203.7 1120.78 2288.41 1227.35 1603.11 1227.35 1488.67 32.52 29.09
painting 10.72 11.97 10.55 14.35 15.8 11.97 12.68 18.22 16.32
rendering 450.67 435.86 437.21 475.63 573.91 450.67 474.66 12.16 10.88
CLOSE_MODAL
scripting 685.26 770.77 752.15 779.75 859.27 770.77 769.44 8.11 7.25
painting 5.79 5.64 5.23 7.6 7.37 5.79 6.33 17.06 15.32
rendering 368.05 376.87 360.75 372.67 456.9 372.67 387.05 10.21 9.13
SELECT_WIDGET_MENU_OPEN
scripting 1479.05 1636.73 1499.93 1584.93 1397.39 1499.93 1519.61 6.15 5.50
painting 15.19 11.26 10.21 8.7 15.3 11.26 12.13 24.57 22.01
rendering 570.16 576.79 582.57 569.29 512.43 570.16 562.25 5.05 4.51
SELECT_WIDGET_SELECT_OPTION
scripting 259.01 300.88 231.32 243.62 273.6 259.01 261.69 10.35 9.26
painting 2.97 5.54 4.37 7.26 7.26 5.54 5.48 33.94 30.47
rendering 17.6 18.17 16.02 17.31 16.9 17.31 17.2 4.71 4.19

rashmi-rai
rashmi-rai previously approved these changes May 30, 2022
@github-actions github-actions bot added the Datasources Issues related to configuring datasource on appsmith label May 30, 2022
@AmanAgarwal041
Copy link
Contributor Author

/ok-to-test sha=c5b109c

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2407785136.
Workflow: Appsmith External Integration Test Workflow.
Commit: c5b109c.
PR: 14107.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2407785136.
Commit: c5b109c.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
SELECT_WIDGET_MENU_OPEN
scripting 2656.13 2537.1 2532.86 2467.14 2793.6 2537.1 2597.37 4.97 4.45
painting 23.1 13.67 20.6 21.66 22.28 21.66 20.26 18.76 16.78
rendering 1275.32 1176.79 1173.31 1174.41 1240.86 1176.79 1208.14 3.91 3.50
SELECT_WIDGET_SELECT_OPTION
scripting 425.03 395.82 410.99 425.98 422.88 422.88 416.14 3.09 2.76
painting 6.29 4.65 4.64 7.32 11.12 6.29 6.8 39.26 35.15
rendering 24.76 25.51 26.9 25.88 24.84 25.51 25.58 3.40 3.05

@yatinappsmith
Copy link
Contributor

@yatinappsmith yatinappsmith added the Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable label May 30, 2022
@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2407785136.
Commit: c5b109c.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
SELECT_WIDGET_MENU_OPEN
scripting 2656.13 2537.1 2532.86 2467.14 2793.6 2537.1 2597.37 4.97 4.45
painting 23.1 13.67 20.6 21.66 22.28 21.66 20.26 18.76 16.78
rendering 1275.32 1176.79 1173.31 1174.41 1240.86 1176.79 1208.14 3.91 3.50
SELECT_WIDGET_SELECT_OPTION
scripting 425.03 395.82 410.99 425.98 422.88 422.88 416.14 3.09 2.76
painting 6.29 4.65 4.64 7.32 11.12 6.29 6.8 39.26 35.15
rendering 24.76 25.51 26.9 25.88 24.84 25.51 25.58 3.40 3.05

@AmanAgarwal041 AmanAgarwal041 enabled auto-merge (squash) May 30, 2022 10:04
@AmanAgarwal041 AmanAgarwal041 merged commit 7aeaf75 into release Jun 1, 2022
@AmanAgarwal041 AmanAgarwal041 deleted the fix/11822-default-content-type branch June 1, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Coders Pod Issues related to users writing code to fetch and update data Bug Something isn't working Datasources Issues related to configuring datasource on appsmith Frontend This label marks the issue or pull request to reference client code Needs Triaging Needs attention from maintainers to triage Reopen Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable
Projects
None yet
4 participants