magento2
magento2 copied to clipboard
Allow use of CIDR ranges in maintenance allow list
Description
The current maintenance mode allow IP list only permits individual addresses to be allowed to bypass maintenance mode. This pull request expands this to allow ranges in CIDR format.
Related Pull Requests
Fixed Issues
- Fixes https://github.com/magento/community-features/issues/233
Manual testing scenarios
- Enable maintenance mode with
php bin/magento maintenance:enable - Allow individual IP address, eg
php bin/magento maintenance:allow-ips --add 192.168.10.180 - Allow multiple individual IP addresses, eg
php bin/magento maintenance:allow-ips --add 192.168.10.170 192.168.10.190 - Allow range of IP addresses, eg
php bin/magento maintenance:allow-ips --add 192.168.10.160/27 - Allow IPv4 & IPv6 addresses, eg
php bin/magento maintenance:allow-ips --add 192.168.46.0/24 fd12:3456:789a:1::1/64
Questions or comments
None
Contribution checklist (*)
- [x] Pull request has a meaningful description of its purpose
- [x] All commits are accompanied by meaningful commit messages
- [x] All new or changed code is covered with unit/integration tests (if applicable)
- [x] All automated tests passed successfully (all builds are green)
Resolved issues:
- [x] resolves magento/magento2#37943: Allow use of CIDR ranges in maintenance allow list
Hi @fredden. Thank you for your contribution Here is some useful tips how you can test your changes using Magento test environment. Add the comment under your pull request to deploy test or vanilla Magento instance:
@magento give me test instance- deploy test instance based on PR changes@magento give me 2.4-develop instance- deploy vanilla Magento instance
:exclamation: Automated tests can be triggered manually with an appropriate comment:
@magento run all tests- run or re-run all required tests against the PR changes@magento run <test-build(s)>- run or re-run specific test build(s) For example:@magento run Unit Tests
<test-build(s)> is a comma-separated list of build names. Allowed build names are:
Database CompareFunctional Tests CEFunctional Tests EE,Functional Tests B2BIntegration TestsMagento Health IndexSample Data Tests CESample Data Tests EESample Data Tests B2BStatic TestsUnit TestsWebAPI Tests
You can find more information about the builds here
:information_source: Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.
For more details, please, review the Magento Contributor Guide documentation.
:warning: According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento import pull request to https://github.com/magento-tsg/magento2ce
@okorshenko the pull request successfully imported.
- Integration Tests are marked here as failed, but all the detail pages show green with no amber nor red.
- Static Tests & Unit Tests are failing due to a problems with the testing framework. How do I get the testing framework to read
composer.json?
In general - looks good. @engcom-Charlie could you help with failing unit & static tests? Seems like there some additional changes might be required for the b2b/ee versions.
@magento run Database Compare, Functional Tests B2B, Functional Tests EE
I've opened a pull request for Commerce and mentioned this in the "Related Pull Requests" section of both descriptions. This has worked on another pull request where changes to both were required, but isn't working here.
@magento run all tests
@fredden thx, usually we should rerun all tests after adding related pull request
@fredden seems like you created PR to wrong repo, you can find all used repos on the following page https://github.com/magento/magento2/runs/1367438381
I did run all tests. Please see this pull request where pull requests from exactly these same two repositories are linked correctly: https://github.com/magento/magento2/pull/28216/checks?check_run_id=1197882558 What's different / wrong here?
@fredden unfortunately I don't know. @sidolov @gabrieldagama could you help with linking related pull request?
@magento run all tests
Hi @ihor-sviziev, thank you for the review. ENGCOM-8444 has been created to process this Pull Request
@magento run all tests
@magento run all tests
@sidolov @sivaschenko @gabrieldagama could you provide info why tests are failing without build reports?
Hi @ihor-sviziev, @fredden
There are conflicts on the related PR magento/partners-magento2ee#407, the conflicts have to be resolved before running the tests.
Hi @fredden, Could you resolve conflicts on related EE repo?
@magento run Functional Tests B2B, Functional Tests EE
@magento run all tests
Hi @ihor-sviziev, thank you for the review. ENGCOM-8444 has been created to process this Pull Request
@ihor-sviziev this looks good. Can you update it for the latest development version so there is no merge conflict?
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.
Pull Requests are not mergeable to the mainline. Please merge the latest mainlines to your Pull Requests and restart the builds.
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.
@fredden any updates on this? It would be very useful to have this feature.
@MartynasKasp what would you like from me? I keep resolving the merge conflicts, but am otherwise waiting for Adobe to process this pull request.