Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76052

Remove webservice_xmlrpc from core

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      Requirements

      1. Being able to install and upgrade.
      2. Being able to install a plugin (using git).
      3. Perform queries to database via some tool or CLI.

      1) Test normal upgrade to 4.1

      1. Create and install a fresh MOODLE_400_STABLE site.
      2. Go to Site Admin -> Search for "Enable web service" (enablewebservices). Enable the setting and save changes.
      3. Go to Site Admin -> Search for "Manage protocols" (webserviceprotocols). Enable all three protocols (rest, soap, xmlrpc) and save changes.
      4. Check out the master branch with the patch applied.

        git checkout master
        

      5. Start the upgrade process via the web.
      6. Verify that on the "Plugins check" page of the upgrade, you see that "xmlrpc" is going to be deleted.
      7. Complete the upgrade.
      8. Verify, with your favourite SQL tool, that "xmlrpc" isn't anymore in the webserviceprotocols setting. The query should show, only, and with any order, "rest,soap" (without the quotes):

        SELECT * FROM mdl_config WHERE name = 'webserviceprotocols'

      9. Go to Admin -> Plugins -> Plugins overview.
      10. *Verify" that "xmlrpc" isn't there any more.
      11. Go to Admin -> Users -> Permissions -> Capability overview.
      12. In the capability field, enter "rest:".
      13. Verify that you see: "webservice/rest:use: Use REST protocol".
      14. In the same capability field, enter "xmlrpc.
      15. Verify that there isn't any capability shown.
      16. Go to YOURSITE/admin/webservice/testclient.php.
      17. Verify that not error/warning happen.
      18. Verify that only SOAP and REST are shown in the protocol field.

      2) Verify that registration works.

      1. Using the same site that in test #1.
      2. Go to Admin -> General -> Registration
      3. Verify that you see "Your site is not yet registered." notification.
      4. Accept (check) the policy notice and click "Register your site". Then, one of:
        1. If your site is not public, verify that you see a message similar to this: "The hub cannot access your site at http://YOURSITE/path/to/moodle - The site must have a public URL!".
        2. If your site is public, verify that registration happens ok.
      5. In any of the 2 cases above, verify that there isn't any PHP warning or error related to the xmlrpc stuff that has been removed.

      3) Test upgrade with webservice_xmlrpc installed manually.

      1. Repeat steps 1-4 from test #1. Don't launch the web upgrade yet! (step #5 above)!!!
      2. In your dirroot, let's install the webservice_xmlrpc from git BEFORE starting the upgrade. Run:

         git clone https://github.com/moodlehq/moodle-webservice_xmlrpc.git webservice/xmlrpc

      3. Verify that now there is a webservice/xmlrpc directory in your site and that it contails files like version.php, lib.php and others.
      4. Start the upgrade process via web.
      5. Verify that on the "Plugins check" page of the upgrade, you see that "xmlrpc" is going to be updated to version >= 2022102600.
      6. Complete the upgrade.
      7. Verify, with your favourite SQL tool, that "xmlrpc" continues being in the webserviceprotocols setting. The query should show, with any order, "rest,xmlrpc,soap" (without the quotes):

        SELECT * FROM mdl_config WHERE name = 'webserviceprotocols'

      8. Go to Admin -> Plugins -> Plugins overview.
      9. *Verify" that "xmlrpc" continues there.
      10. Go to Admin -> Users -> Permissions -> Capability overview.
      11. In the capability field, enter "rest:".
      12. Verify that you see: "webservice/rest:use: Use REST protocol".
      13. In the same capability field, enter "xmlrpc.
      14. Verify that that you see: "webservice/xmlrpc:use: Use XML-RPC protocol".
      15. Go to YOURSITE/admin/webservice/testclient.php
      16. Verify that not error/warning happen.
      17. Verify that XML-RPC, SOAP and REST are shown in the protocol field.
      Show
      Requirements Being able to install and upgrade. Being able to install a plugin (using git). Perform queries to database via some tool or CLI. 1) Test normal upgrade to 4.1 Create and install a fresh MOODLE_400_STABLE site. Go to Site Admin -> Search for "Enable web service" (enablewebservices). Enable the setting and save changes. Go to Site Admin -> Search for "Manage protocols" (webserviceprotocols). Enable all three protocols (rest, soap, xmlrpc) and save changes. Check out the master branch with the patch applied. git checkout master Start the upgrade process via the web. Verify that on the "Plugins check" page of the upgrade, you see that "xmlrpc" is going to be deleted. Complete the upgrade. Verify , with your favourite SQL tool, that "xmlrpc" isn't anymore in the webserviceprotocols setting. The query should show, only, and with any order, " rest,soap " (without the quotes): SELECT * FROM mdl_config WHERE name = 'webserviceprotocols' Go to Admin -> Plugins -> Plugins overview. *Verify" that "xmlrpc" isn't there any more. Go to Admin -> Users -> Permissions -> Capability overview. In the capability field, enter " rest: ". Verify that you see: " webservice/rest:use: Use REST protocol ". In the same capability field, enter " xmlrpc . Verify that there isn't any capability shown. Go to YOURSITE/admin/webservice/testclient.php. Verify that not error/warning happen. Verify that only SOAP and REST are shown in the protocol field. 2) Verify that registration works. Using the same site that in test #1. Go to Admin -> General -> Registration Verify that you see "Your site is not yet registered." notification. Accept (check) the policy notice and click "Register your site". Then, one of: If your site is not public, verify that you see a message similar to this: "The hub cannot access your site at http://YOURSITE/path/to/moodle - The site must have a public URL!". If your site is public, verify that registration happens ok. In any of the 2 cases above, verify that there isn't any PHP warning or error related to the xmlrpc stuff that has been removed. 3) Test upgrade with webservice_xmlrpc installed manually. Repeat steps 1-4 from test #1. Don't launch the web upgrade yet! (step #5 above)!!! In your dirroot, let's install the webservice_xmlrpc from git BEFORE starting the upgrade. Run: git clone https://github.com/moodlehq/moodle-webservice_xmlrpc.git webservice/xmlrpc Verify that now there is a webservice/xmlrpc directory in your site and that it contails files like version.php , lib.php and others. Start the upgrade process via web. Verify that on the "Plugins check" page of the upgrade, you see that "xmlrpc" is going to be updated to version >= 2022102600. Complete the upgrade. Verify , with your favourite SQL tool, that "xmlrpc" continues being in the webserviceprotocols setting. The query should show, with any order, " rest,xmlrpc,soap " (without the quotes): SELECT * FROM mdl_config WHERE name = 'webserviceprotocols' Go to Admin -> Plugins -> Plugins overview. *Verify" that "xmlrpc" continues there. Go to Admin -> Users -> Permissions -> Capability overview. In the capability field, enter " rest: ". Verify that you see: " webservice/rest:use: Use REST protocol ". In the same capability field, enter " xmlrpc . Verify that that you see: " webservice/xmlrpc:use: Use XML-RPC protocol ". Go to YOURSITE/admin/webservice/testclient.php Verify that not error/warning happen. Verify that XML-RPC, SOAP and REST are shown in the protocol field.

      This is about to completely:

      1. Remove webservice_xmlrpc from core (this exact issue).
      2. Create a repository @ moodlehq with current version (for 4.1 and up). Keeping history (howto guide). But using this command to only extract master history, without tags and renaming to main:

        git filter-repo --subdirectory webservice/xmlrpc --refs master && git branch -m master main
        

      3. Add own environment.xml file to require the xmlrpc extension.
      4. Add basic license (gpl-3) and readme information.
      5. Bump version, add release (1.0) and requires 4.1.
      6. (WiP) Perform some exploratory testing with the protocol installed as plugin.
      7. Add it to the plugins database. (link)
      8. Look in docs to add information about its current status. Ensure that upgrade says it and to install it before upgrade to keep all the conf working.
      9. (none found): Verify if there is any MDLQA that should be removed that is testing this ws protocol.
      10. Close any remaining xmlrpc-webservice issue in the MDL tracker, pointing there to this issue (issues list).
      11. Once this is integrated, change the plugin GHA workflow to apply all the "TODOs" there (to point to upstream repo and branch).

        1. 1_MDL-76052.png
          1_MDL-76052.png
          107 kB
        2. 1.16.png
          1.16.png
          60 kB
        3. 1.3.png
          1.3.png
          75 kB
        4. 1.6.png
          1.6.png
          60 kB
        5. 1.8.png
          1.8.png
          24 kB
        6. 10_MDL-76052.png
          10_MDL-76052.png
          102 kB
        7. 11_MDL-76052.png
          11_MDL-76052.png
          56 kB
        8. 12_MDL-76052.png
          12_MDL-76052.png
          15 kB
        9. 13_MDL-76052.png
          13_MDL-76052.png
          60 kB
        10. 14_MDL-76052.png
          14_MDL-76052.png
          48 kB
        11. 15_MDL-76052.png
          15_MDL-76052.png
          55 kB
        12. 2_MDL-76052.png
          2_MDL-76052.png
          12 kB
        13. 2.3.png
          2.3.png
          27 kB
        14. 2.4.png
          2.4.png
          55 kB
        15. 3_MDL-76052.png
          3_MDL-76052.png
          81 kB
        16. 3.12.png
          3.12.png
          16 kB
        17. 3.14.png
          3.14.png
          22 kB
        18. 3.17.png
          3.17.png
          61 kB
        19. 3.3.png
          3.3.png
          8 kB
        20. 3.4.png
          3.4.png
          63 kB
        21. 3.5.png
          3.5.png
          67 kB
        22. 3.7.png
          3.7.png
          20 kB
        23. 3.9.png
          3.9.png
          9 kB
        24. 4_MDL-76052.png
          4_MDL-76052.png
          71 kB
        25. 5_MDL-76052.png
          5_MDL-76052.png
          68 kB
        26. 6_MDL-76052.png
          6_MDL-76052.png
          47 kB
        27. 7_MDL-76052.png
          7_MDL-76052.png
          65 kB
        28. 8_MDL-76052.png
          8_MDL-76052.png
          32 kB
        29. 9_MDL-76052.png
          9_MDL-76052.png
          45 kB

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Meirza Meirza
            Jun Pataleta Jun Pataleta
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 2 hours, 30 minutes
                2d 2h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.