This repository was archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
MC-35509: Updated the software update guide module with the safe upgrade tool documentation #8314
Merged
Merged
Changes from all commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
141087a
Added SUT topics
danidelcar 281a7b8
Added dev topic for sut
danidelcar b312746
Added diagram workflow SUT
danidelcar 0b31ee8
Fixed issues
danidelcar 1fc73e4
Created use guide and divided install and welcome guide
danidelcar 15b32d2
Reviewed topic and fixed issues
danidelcar 28d9db4
Reviewed topic and fixed issues
danidelcar f46513e
Fixed url
danidelcar d4e85f5
Reviewed dev topic and fixed issues
danidelcar 77f4b67
fixed in toc url
danidelcar 0766442
Added sut tracking page and reorganized pages
danidelcar e2e9284
Reviewed topic sut tracking and added audience in welcome guide
danidelcar cf44e0f
Reviewed topics
danidelcar acd8b11
Reviewed topics and added page for SUT
danidelcar 14b789d
Fix linting issues
danidelcar 2218230
Fix linting issues
danidelcar 247e124
Fix linting issues 3
danidelcar 0a87e4d
Fix linting issues 4
danidelcar 097659d
Fix linting issues 5
danidelcar 0de2254
Fix linting issues
danidelcar 9d7846b
Fix linting issues
danidelcar 61f1033
Fix linting issues
danidelcar 0866cb8
Fix linting issues
danidelcar edf883b
Fix linting issues
danidelcar 1cd481f
Fix linting issues rule md30
danidelcar d95721e
Fix linting issues rule md30
danidelcar 6a206c8
Fix linting issues rule md06 & md36
danidelcar ee1d425
Fix linting issues rule md36
danidelcar ac4d76a
Added link to the sut section in the main software update guide topic
danidelcar 38d3cb6
Merge branch 'master' into MC-35509
danidelcar d8469cf
moved SUT section under guides to keep it versionless
danidelcar b640157
Added link to the sut section in the main 2.3 software update guide t…
danidelcar 35c8d74
moved sut folder and modified urls as per peer review
danidelcar e0f9ebb
Added versionless:true to TOC as per peer review
danidelcar 7258e17
Modified files for sut after peer review
danidelcar 16877f8
Fixed linting issue MD029
danidelcar 8276b67
continue modifying files after peer review
danidelcar 843ea2d
continue modifying files after peer review - include H3 or H4 for exa…
danidelcar a3485b3
added links to composer and new relic
danidelcar e3b2184
added links to composer and new relic
danidelcar dda4583
fixed linting rule issues md009
danidelcar 46e8bfc
fixed topics after peer review
danidelcar c3873ed
fixed linting rule issues md029
danidelcar 36d1f09
Removed acronym from directory path
jeff-matthews 4228f33
Applied suggestions from initiall peer review
jeff-matthews f07d81e
Copy edited files that were not part of innitial peer review
jeff-matthews 2321601
Merge branch 'master' into MC-35509
danidelcar 19ee29a
reviewed topics and pages after discussion with ENG about SUT public …
danidelcar 73ae70a
Fixed linting issue MD029
danidelcar 562e83b
Added a banner in page-header.html
danidelcar 943e4a7
Added a banner in page-header.html
danidelcar 10e8699
Modified banner as ALPHA
danidelcar 982d204
Updated topic after peer review
danidelcar 65fdc67
Updated topic after peer review - continue
danidelcar 1920a30
Merge branch 'master' into MC-35509
danidelcar e98220f
Merge branch 'MC-35509' of github.com:magento/devdocs into MC-35509
danidelcar 607febf
Removed entry in TOC about tracking
danidelcar c1f33e0
Reviewed comments in PR
danidelcar 4f2ccf6
Merge branch 'master' into MC-35509
danidelcar d9866d3
Merge branch 'master' into MC-35509
danidelcar f27b5cb
Added memory limits as per technical review
danidelcar badffe5
Updated introduction with correct tool name from Ampersand
danidelcar da5580d
Updated information for memory limitations and complexity formula
danidelcar e640b8a
Merge branch 'master' into MC-35509
danidelcar ce1dca8
Fixed url in page-header html
danidelcar 1449b04
Fixed pages and toc with commerce-only banner
danidelcar a8d649f
Merge branch 'master' into MC-35509
danidelcar b07959d
Fixed toc with commerce-only banner
danidelcar 217d0bd
Merge branch 'MC-35509' of github.com:magento/devdocs into MC-35509
danidelcar 3c6305c
Merge branch 'master' into MC-35509
danidelcar 0a49934
Merge branch 'master' into MC-35509
danidelcar b12c6cb
Added changes as per MC-40435
danidelcar daab5f9
Merge branch 'master' into MC-35509
danidelcar 27130f5
Merge branch 'master' into MC-35509
danidelcar 977b4d6
Merge branch 'master' into MC-35509
danidelcar fdd6df3
Updated PR after product review
danidelcar f763b6b
Updated PR after linting review
danidelcar 6bc854f
Merge branch 'master' into MC-35509
danidelcar 74e69ef
Updated PR after product review
danidelcar 063ee58
Updated PR after product review - 2
danidelcar 90f6a18
Merge branch 'master' into MC-35509
danidelcar 6bd2b79
Updated PR after slack/email information requested by product
danidelcar 8696511
Updated PR after slack/email information requested by product
danidelcar be8c685
Updated PR after slack/email information requested by product
danidelcar da55255
Modified contact section
danidelcar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
group: software-update-guide | ||
title: Developer information | ||
ee_only: True | ||
functional_areas: | ||
- Upgrade | ||
--- | ||
|
||
This topic contains information for developers who want to know more technical information about the Magento Safe Upgrade Tool ALPHA (SUT). It is focused on developers who work closely with the Magento source code. You can use this knowledge to customize the SUT's components. | ||
|
||
## Magento API index integration | ||
|
||
Magento API index integration is an internal integration solution that comprehends a set of tools to explore Magento Extensions developed by Magento, an Adobe Company, Magento Partners and 3rd party vendors based on static code analysis. | ||
|
||
The integration with Magento API index is done through: | ||
|
||
`Sut\Domain\MRay\MRayInterface` | ||
|
||
It is implemented through the `config/services.yaml` file. Its value decides where the response of methods `api()` and `modules()` comes from. | ||
|
||
Edit this file to customize the response according to your installation. Just replace the value assigned to `Sut\Domain\MRay\MRayInterface`: | ||
|
||
### Example of a custom value | ||
|
||
`Sut\Domain\MRay\MRayInterface : "@sut_mray_mock"` | ||
|
||
In the previous example, the SUT uses `@sut_mray_mock` as the `MRayInterface` implementation. The responses from the `api()` and `modules()` methods come from the following files: | ||
|
||
* `dev/mray_mock_files/api.json` | ||
* `dev/mray_mock_files/modules.json` | ||
|
||
{:.bs-callout-info} | ||
When you make changes to the `services.yaml` file, delete the `var/cache/` folder to correctly apply them. | ||
|
||
## Unit testing | ||
|
||
To run the unit tests, execute one of the following commands: | ||
|
||
* `vendor/bin/phpunit tests/unit` | ||
* `vendor/bin/phpunit -c tests/unit/phpunit.xml.dist tests/unit` | ||
* `vendor/bin/phpunit -c tests/unit/phpunit.xml.dist --testsuite=unit-tests` | ||
|
||
## Integration testing | ||
|
||
To run the integration tests, execute one of the following commands: | ||
|
||
* `vendor/bin/phpunit -c tests/integration/phpunit.xml.dist tests/integration` | ||
* `vendor/bin/phpunit -c tests/integration/phpunit.xml.dist --testsuite=integration-tests` | ||
|
||
## Acceptance testing | ||
|
||
1. Before executing acceptance tests, you must set the Magento URL in the `phpunit` configuration file. | ||
1. Copy the default `tests/acceptance/phpunit.xml` file (without the .dist suffix). | ||
1. Change the `TESTS_BASE_URL` value to point to the Magento URL that you want to test. | ||
1. To run the acceptance tests, execute one of the following commands: | ||
|
||
* `vendor/bin/phpunit -c tests/acceptance/phpunit.xml tests/acceptance` | ||
* `vendor/bin/phpunit -c tests/acceptance/phpunit.xml --testsuite=acceptance-tests` | ||
|
||
## JS unit testing for GraphQL | ||
|
||
We used the [Jest](https://jestjs.io/docs/en/getting-started.html) framework to create these JS unit tests: | ||
|
||
{:.bs-callout-info} | ||
To run JS unit tests for GraphQL, you must have Node.js installed. | ||
|
||
### Node.js | ||
|
||
To install Node.js on your system, see the Node.js [documentation](https://nodejs.dev/learn/how-to-install-nodejs). | ||
|
||
The following instructions are for MacOS systems: | ||
|
||
1. Open a terminal and navigate to the `graphql-schema-compatibility/` directory. | ||
1. Install project dependencies: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
1. Run unit tests or `jest`: | ||
|
||
```bash | ||
npm run unit-test | ||
``` | ||
|
||
The tests are inside `graphql-schema-compatibility/test/js/unit`. | ||
|
||
The string schemas for testing are inside `dev/graphql_schemas`. | ||
|
||
## Complexity score | ||
|
||
The **complexity score** is a figure that indicates how difficult an upgrade from the current version to the new one might be. Lower numbers indicate easier upgrades. | ||
|
||
{:.bs-callout-info} | ||
Complexity scores range between 0 and ∞. | ||
|
||
This score is based on the results extracted from the analysis: | ||
|
||
* Number of issues identified | ||
* Severity of issues identified | ||
|
||
The SUT calculates this score according to the following formula: | ||
|
||
### Complexity score formula | ||
|
||
`Complexity Score = 2 * (# of errors) + 1 * (# of warnings)` | ||
|
||
{:.bs-callout-warning} | ||
These are absolute values. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
group: software-update-guide | ||
title: Install | ||
ee_only: True | ||
functional_areas: | ||
- Upgrade | ||
--- | ||
|
||
The Safe Upgrade Tool ALPHA (SUT) is a command line (CLI) tool that checks a Magento instance against a specific version by analyzing all the non-Magento modules installed on it. | ||
|
||
{:.bs-callout-warning} | ||
At the moment this is an ALPHA version with limited scope, available for all Magento Commerce merchants, only validating PHP Magento APIs and GraphQL schema. | ||
|
||
## Workflow | ||
|
||
The following diagram shows the expected workflow when running the SUT: | ||
|
||
 | ||
|
||
### Who is the SUT for? | ||
|
||
danidelcar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
The following use case describes the typical process for a Magento partner to upgrade a client's Magento instance: | ||
danidelcar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
danidelcar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
1. A partner's Software Engineer downloads the SUT package from the [Magento repository](https://repo.magento.com/) and executes it during the beta phase of the newest Magento release. | ||
1. The Software Engineer sees that there are several customized areas broken in the inventory and catalog modules and they also get a complexity score of X. See the [Developer information guide]({{site.baseurl}}/safe-upgrade-tool/developer.html) for more information on the complexity score. | ||
1. With this information, the Software Engineer is able to understand the complexity of the upgrade and is able to relay this information back to the partner's Account Manager. | ||
1. The Account Manager creates a timeline and cost for the Magento upgrade, which allows them to get their manager's approval. | ||
1. With their manager's approval, the Software Engineer works on the required code modifications to fix the broken modules. | ||
1. The Software Engineer runs the SUT tool one more time with a Magento pre-release to ensure there are no new issues and that their code changes fixed the problems found during the beta phase. | ||
1. Everything check’s out and the Software Engineer pushes the code to a staging environment where regression tests confirm all tests are green, which allows them to release the latest Magento version to production the same day that the Magento pre-release is released. | ||
|
||
 | ||
|
||
#### Contact SUT | ||
|
||
To connect with the SUT team: | ||
|
||
1. Contact us on the Engineering Slack channel [Magento Safe Upgrade Tool](https://magentocommeng.slack.com/archives/C019Y143U9F). | ||
1. Send us an email at [sut@adobe.com](mailto:sut@adobe.com). | ||
|
||
See the [Resources]({{site.baseurl}}/community/resources/resources.html) page for more information. | ||
|
||
## Prerequisites | ||
|
||
See [prerequisites]({{site.baseurl}}/safe-upgrade-tool/prerequisites.html) for more information. | ||
|
||
{:.bs-callout-info} | ||
You can run the SUT in any operating system. There is no requirement to run the SUT where your Magento instance is located. It is necessary for SUT to have access to the source code of the Magento instance. For example, you can install the SUT on one server and point it at your Magento installation on another server. | ||
|
||
danidelcar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
If you are running SUT against a Magento instance with large modules and files, the tool might require a high amount of RAM, at least 2GB RAM. | ||
|
||
### Recommended actions | ||
|
||
Magento best practice is not to have 2 modules with the same name, if this happens SUT will show a segmentation fault error in which case you have to analyze each module independently with the option `-m`: | ||
|
||
```bash | ||
bin/sut upgrade:check /(instance_path) --coming-version=2.4.1 -m /(module_path) | ||
``` | ||
|
||
If you get memory issues while executing SUT it is recommended to use the `-m` command to run the tool against a specific module. | ||
|
||
danidelcar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Install | ||
|
||
To install the SUT, you must install the necessary prerequisites: | ||
|
||
* Magento access keys | ||
* Composer | ||
* Node.js (only required to check GraphQL compatibility) | ||
|
||
Refer to the [SUT installation]({{site.baseurl}}/safe-upgrade-tool/install.html#install). | ||
|
||
### Magento access keys | ||
|
||
You must have [Magento access keys]({{site.baseurl}}/marketplace/sellers/profile-information.html#access-keys) to download and use the SUT. Add your Magento access keys to your `auth.json` file, which is located at `~/.composer` by default. | ||
|
||
{:.bs-callout-warning} | ||
Check your **COMPOSER_HOME** environment variable to see where the `auth.json` file is located. | ||
|
||
The **public key** corresponds to the _username_ whereas the **private key** is the _password_: | ||
|
||
### Example of Magento access keys | ||
|
||
```json | ||
"http-basic": { | ||
"repo.magento.com": { | ||
"username": "YOUR_MAGENTO_PUBLIC_KEY", | ||
"password": "YOUR_MAGENTO_PRIVATE_KEY" | ||
} | ||
}, | ||
``` | ||
|
||
### Composer | ||
|
||
Clone the [safe-upgrade-tool](https://github.com/magento-commerce/safe-upgrade-tool) repository and run `composer install` in your terminal to install dependencies. | ||
|
||
{:.bs-callout-warning} | ||
If the **Magento access keys** are not correctly configured, the SUT will not install and you will get errors when running the `composer install` command. | ||
|
||
### Node.js | ||
|
||
To install Node.js, see the Node.js [documentation](https://nodejs.dev/learn/how-to-install-nodejs). | ||
|
||
{:.bs-callout-info} | ||
Node.js is only a requirement to check GraphQL compatibility. | ||
|
||
## Third-party extensions | ||
|
||
Magento recommends that you contact your search engine vendor to determine whether your extension is fully compatible with Magento 2.4. | ||
danidelcar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
See [Run the tool]({{site.baseurl}}/safe-upgrade-tool/run.html) for information about executing the SUT tool. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
group: software-update-guide | ||
title: Introduction | ||
ee_only: True | ||
functional_areas: | ||
- Upgrade | ||
--- | ||
|
||
The Safe Upgrade Tool ALPHA (SUT) is a command line (CLI) tool that checks a Magento instance against a specific version by analyzing all the non-Magento modules installed in it. | ||
|
||
The SUT identifies potential problems that must be fixed in your custom code before attempting to upgrade to a newer version of Magento. | ||
danidelcar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The SUT returns a list of errors and warnings that you must address before upgrading to a new version of Magento. | ||
|
||
It is distributed as a Composer package with every release of a Magento version. See [Developer]({{site.baseurl}}/safe-upgrade-tool/developer.html) topic for more information. | ||
|
||
Refer to the [Install]({{site.baseurl}}/safe-upgrade-tool/install.html) for first steps with SUT. | ||
|
||
{:.bs-callout-warning} | ||
At the moment this is an ALPHA version with limited scope, available for all Magento Commerce merchants, only validating PHP Magento APIs and GraphQL schema. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
group: software-update-guide | ||
title: Prerequisites | ||
ee_only: True | ||
functional_areas: | ||
- Upgrade | ||
--- | ||
|
||
Running the Safe Upgrade Tool ALPHA (SUT) helps you identify what you must do **before** upgrading Magento. | ||
|
||
The minimum requirements to run the SUT are: | ||
|
||
| **Requirements** | **Constraints** | | ||
|----------------|-----------------| | ||
| PHP version| >= 7.3 | | ||
| Composer | none | | ||
| Node.js | An optional requirement. Only required to check GraphQL compatibility. | | ||
| Memory limitations | At least 2GB RAM | | ||
| Magento Access keys | none | | ||
| MC or Magento Open Source | none | | ||
{:style="table-layout:auto;"} | ||
|
||
You can run the SUT in any operating system. There is no requirement to run the SUT where your Magento instance is located. | ||
|
||
It is necessary for SUT to have access to the source code of the Magento instance. For example, you can install SUT on one server and point it at your Magento installation on another server. Refer to the [install]({{site.baseurl}}/safe-upgrade-tool/install.html#install) for more information. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.