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

Update redirects.md #44

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

dannystaple
Copy link

Purpose of this pull request

This pull request (PR):

  • Fixes the redirect paths indentation.
  • Add a warning note about the defaults being changed breaking ece-tools URLs scenario.

Affected pages

  • ...

Links to Commerce code

  • ...

Fit the paths indentation.
Add a warning note about the defaults being changed breaking ece-tools URLs scenario.
@jeff-matthews jeff-matthews added the editorial Small changes and typos label Aug 9, 2024
Copy link
Contributor

@jhadobe jhadobe left a comment

Choose a reason for hiding this comment

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

@dannystaple Please sign the Adobe CLA.

help/cloud-guide/routes/redirects.md Outdated Show resolved Hide resolved
Co-authored-by: Jared Hoover <98363870+jhadobe@users.noreply.github.com>
@dannystaple
Copy link
Author

@dannystaple Please sign the Adobe CLA.

I have now signed the CLA.

Comment on lines +33 to +41
>[!NOTE]
>
>If the `http://{default}/:` type is not set to `upstream`, `ece-tools` can encounter issues configuring URL routes in `core_config_data` tables.
>
>```yaml
>http://{default}/:
> type: upstream
>```

Copy link
Contributor

Choose a reason for hiding this comment

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

@dannystaple I've been unable to confirm this internally. If you revert this change, I can merge the updates to the indentation.

Copy link
Author

Choose a reason for hiding this comment

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

This change is relating to how the routing table ends up in the steps called by https://github.com/magento/ece-tools/blob/2002.1/src/Step/Deploy/InstallUpdate/ConfigUpdate/Urls.php.

In UrlManager, https://github.com/magento/ece-tools/blob/2002.1/src/Util/UrlManager.php, it tries to read the initial URL as primary. However, https://github.com/magento/ece-tools/blob/2002.1/src/Util/UrlManager.php#L84 will skip a URL if it's type is not upstream.

If the primary is not this default, then the execute function in https://github.com/magento/ece-tools/blob/2002.1/src/Step/Deploy/InstallUpdate/ConfigUpdate/Urls/Database.php will potentially find no URL's, or try to work with a subdomain, and then does not call updateUrl in line 81 correctly. You would then not have environment URLs in the database after a deployment (unless you updated them previously).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Small changes and typos
Projects
Status: 🛠 Changes Requested
Development

Successfully merging this pull request may close these issues.

3 participants