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

Improving WebServer Example #10111

Merged
merged 4 commits into from
Aug 13, 2024
Merged

Improving WebServer Example #10111

merged 4 commits into from
Aug 13, 2024

Conversation

mathertel
Copy link
Contributor

Fixing WebServer example.

Description of Change

  • Enable FAT and LittleFS filesystems as configured.
  • use new versions of RequestHandler::canHandle and RequestHandler::canUpload (old do not work anymore for uploads)
  • Tested with Arduino Nano ESP32

Tests scenarios

Arduino Nano ESP32 using arduino-esp version 3.0.4
Following the instructions in README

  • upload data files
  • view files
  • DELETE files handler

* Enable FAT and LittleFS filesystems as configured.
* use new versions of RequestHandler::canHandle and RequestHandler::canUpload
Copy link
Contributor

github-actions bot commented Aug 2, 2024

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Documentation changed accoring review comments.":
    • summary should not end with a period (full stop)
    • summary looks empty
    • type/action looks empty
  • the commit message "README.md changed accoring to review comments.":
    • summary should not end with a period (full stop)
    • summary looks empty
    • type/action looks empty
  • the commit message "Update Documentation":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update WebServer.ino":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 20 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

Messages
📖 You might consider squashing your 4 commits (simplifying branch history).

👋 Hello mathertel, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- Addressing info messages (📖) is strongly recommended; they're less critical but valuable.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against b57b35f

Copy link
Contributor

github-actions bot commented Aug 2, 2024

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S30‼️ +33K0.00‼️ +3.460⚠️ +1280.00⚠️ +0.30
ESP32S20‼️ +33K0.00‼️ +3.560⚠️ +1520.00⚠️ +0.40
ESP32C30‼️ +35K0.00‼️ +3.570⚠️ +1360.00⚠️ +0.39
ESP32C60‼️ +35K0.00‼️ +3.660⚠️ +1440.00⚠️ +0.36
ESP320‼️ +33K0.00‼️ +3.390⚠️ +2240.00⚠️ +0.49
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32C3ESP32C6ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
WebServer/examples/WebServer‼️ +33K⚠️ +128‼️ +33K⚠️ +152‼️ +35K⚠️ +136‼️ +35K⚠️ +144‼️ +33K⚠️ +224

Copy link
Contributor

github-actions bot commented Aug 2, 2024

Test Results

 56 files   -  83   56 suites   - 83   5m 6s ⏱️ - 1h 38m 3s
 21 tests  -   9   21 ✅  -   9  0 💤 ±0  0 ❌ ±0 
135 runs   - 168  135 ✅  - 168  0 💤 ±0  0 ❌ ±0 

Results for commit b57b35f. ± Comparison against base commit 70786dc.

This pull request removes 9 tests.
performance.coremark.test_coremark ‑ test_coremark
performance.fibonacci.test_fibonacci ‑ test_fibonacci
performance.psramspeed.test_psramspeed ‑ test_psramspeed
performance.ramspeed.test_ramspeed ‑ test_ramspeed
performance.superpi.test_superpi ‑ test_superpi
test_touch_errors
test_touch_interrtupt
test_touch_read
validation.periman.test_periman ‑ test_periman

♻️ This comment has been updated with latest results.

@me-no-dev
Copy link
Member

Please rename the PR to "Improving WebServer Example". The example is not broken.

@mathertel mathertel changed the title Fixing WebServer example. Improving WebServer Example Aug 4, 2024
@mathertel
Copy link
Contributor Author

renaming done.

The "old" handler canHandle(HTTPMethod , String) did not work for me when uploading files.
Switching to the "new" version canHandle(WebServer &, HTTPMethod , String ) fixed it.
Did not any further investigation.

@VojtechBartoska VojtechBartoska added the Type: Example Issue is related to specific example. label Aug 5, 2024
Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y left a comment

Choose a reason for hiding this comment

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

@mathertel PTAL on my comments.
I have tested the updated example and it works great with both SPIFFS and FATFS. Thank you for your effort making this improvement :)

libraries/WebServer/examples/WebServer/README.md Outdated Show resolved Hide resolved
libraries/WebServer/examples/WebServer/README.md Outdated Show resolved Hide resolved
libraries/WebServer/examples/WebServer/README.md Outdated Show resolved Hide resolved
@P-R-O-C-H-Y P-R-O-C-H-Y added the Resolution: Awaiting response Waiting for response of author label Aug 6, 2024
@mathertel
Copy link
Contributor Author

mathertel commented Aug 6, 2024

I'll change. Thanks for testing S2 and C6.

Copy link
Collaborator

@lucasssvaz lucasssvaz left a comment

Choose a reason for hiding this comment

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

LGTM besides what has already been mentioned

Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Pending Merge Pull Request is ready to be merged and removed Resolution: Awaiting response Waiting for response of author labels Aug 7, 2024
@me-no-dev me-no-dev merged commit 5b05a34 into espressif:master Aug 13, 2024
54 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Merge Pull Request is ready to be merged Type: Example Issue is related to specific example.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants