Skip to content

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Aug 6, 2025

Description

This PR modifies the console plugin to allow PATCH calls from dev tools. The request parsing logic is updated to support reading array bodies which is common with PATCH calls.

Issues Resolved

resolves: #10105
resolves: #2343

Screenshot

Screenshot 2025-08-06 at 5 12 20 PM

Testing the changes

Log into Dev Tools and call a PATCH api. For example: https://docs.opensearch.org/latest/security/access-control/api/#patch-role-mapping

Changelog

  • feat: Add support for PATCH in dev tools

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

github-actions bot commented Aug 6, 2025

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

@cwperks
Copy link
Member Author

cwperks commented Aug 6, 2025

Opening this in Draft as there is still some bugs, but as long as you make the request on the request line it works. Also found one issue where the patch has multiple elements in the list.

Fixed both issues.

Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.29%. Comparing base (5bd94df) to head (2ea3606).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/plugins/console/public/lib/row_parser.ts 84.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10361      +/-   ##
==========================================
+ Coverage   60.28%   60.29%   +0.01%     
==========================================
  Files        4454     4454              
  Lines      119245   119266      +21     
  Branches    19671    19679       +8     
==========================================
+ Hits        71888    71915      +27     
+ Misses      42372    42364       -8     
- Partials     4985     4987       +2     
Flag Coverage Δ
Linux_1 26.59% <ø> (ø)
Linux_2 38.82% <ø> (ø)
Linux_3 38.87% <85.71%> (+0.01%) ⬆️
Linux_4 32.90% <ø> (ø)
Windows_1 26.61% <ø> (?)
Windows_2 38.80% <ø> (ø)
Windows_3 38.87% <85.71%> (+0.01%) ⬆️
Windows_4 32.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Aug 7, 2025

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

cwperks added 2 commits August 7, 2025 10:23
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Copy link
Contributor

github-actions bot commented Aug 7, 2025

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As someone that has wished to create PATCH requests on the dev console, this is a huge win for our productivity - thanks for getting this done @cwperks

@kavilla kavilla linked an issue Aug 8, 2025 that may be closed by this pull request
@kavilla kavilla added the console label Aug 8, 2025
Copy link
Contributor

github-actions bot commented Aug 8, 2025

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

kavilla
kavilla previously approved these changes Aug 12, 2025
@kavilla
Copy link
Member

kavilla commented Aug 12, 2025

@cwperks do you have https://github.com/apps/opensearch-changeset-bot installed? that way to generate to changelog automatically?

@cwperks
Copy link
Member Author

cwperks commented Aug 12, 2025

@cwperks do you have https://github.com/apps/opensearch-changeset-bot installed? that way to generate to changelog automatically?

No, I don't have that installed. I will install it and update this PR.

@cwperks
Copy link
Member Author

cwperks commented Aug 12, 2025

@kavilla re-ran the failing changelog check

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cwperks This is a great addition!🎉

@cwperks
Copy link
Member Author

cwperks commented Aug 12, 2025

No, I don't have that installed. I will install it and update this PR.

I'll also submit a PR later today to update the CONTRIBUTING.md file to mention the bot and address #10044

@cwperks
Copy link
Member Author

cwperks commented Sep 12, 2025

@kavilla rebased this with main. Can you take another look at your earliest convenience?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] PATCH API calls are not supported in DevTools console Dev Tools should support PATCH method

6 participants