Skip to content

Commit

Permalink
Migration guide restructuring (saleor#1366)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw authored Oct 28, 2024
1 parent c9253d1 commit 3ef868c
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/setup/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ No matter how you choose to install the software, you will need to upgrade it fr

5. Start the Celery workers again.

For instructions specific to upgrading between particular versions, see the [upgrade guides](upgrade-guides/3-20-to-3-21.mdx).
For instructions specific to upgrading between particular versions, see the [upgrade guides](/upgrade-guides/core/3-20-to-3-21.mdx).

## Upgrading with zero-downtime

Expand Down
9 changes: 0 additions & 9 deletions docs/upgrade-guides/3-16-to-3-17.mdx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Upgrading From 3.15 To 3.16
sidebar_position: 7
sidebar_position: 6
---

## `customerIpAddress` field
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
---
title: Migrating From NOTIFY_USER To Dedicated Events
sidebar_label: Migrating from NOTIFY_USER
title: Upgrading From 3.16 To 3.17
sidebar_position: 5
---

:::info
To follow the zero-downtime strategy when upgrading to 3.17, **It is recommended to first migrate to at least 3.16.2** and turn on the Celery worker to process all data migrations asynchronously.
Otherwise, you will need to downtime your solution to ensure correct data migration.
:::

## Migrating from NOTIFY_USER

Starting from Saleor 3.16, the `NOTIFY_USER` webhook event will be deprecated. If your app uses this webhook, you should migrate to dedicated webhook events. The following is a list of webhook events that replace specific notifications. All webhook events that replace `NOTIFY_USER` support [subscription queries](developer/extending/webhooks/subscription-webhook-payloads.mdx#custom-payloads), which allow you to define the payload you want to receive for your notifications.

The table below shows sub-types of `NOTIFY_USER` events (represented as the `notify_event` field in the legacy payloads), their GraphQL subscription replacements, and the Saleor version in which they were or will be introduced.
Expand Down Expand Up @@ -32,7 +39,7 @@ The table below shows sub-types of `NOTIFY_USER` events (represented as the `not

To migrate to new events, you need to create new webhooks in Saleor and provide subscription queries for the events you want to receive.

## Payload changes
### Payload changes

Some fields that were available in the `NOTIFY_USER` payload are not available in subscription payloads of the new events:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Upgrading From 3.17 To 3.18
sidebar_position: 9
sidebar_position: 4
---

:::info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Upgrading From 3.18 To 3.19
sidebar_position: 10
sidebar_position: 3
---

:::info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Upgrading From 3.19 To 3.20
sidebar_position: 11
sidebar_position: 2
---

:::info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Upgrading From 3.20 To 3.21
sidebar_position: 12
sidebar_position: 1
---

:::info
Expand Down
5 changes: 5 additions & 0 deletions docs/upgrade-guides/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Upgrade Guides
---

You can find the upgrade guides here, which list the necessary steps for upgrading to the new version.
3 changes: 3 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { selfHosting } = require("./sidebars/self-hosting");
const { extending } = require("./sidebars/extending");
const { graphqlSidebar } = require("./sidebars/graphql");
const { cloudSidebar } = require("./sidebars/cloud");
const { upgradeGuidesSidebar } = require("./sidebars/upgrade-guides");

const backToHome = {
type: "ref",
Expand Down Expand Up @@ -76,6 +77,7 @@ module.exports = {
title("Additional Resources"),
ref("setup/overview", "Self-hosting", "selfHost"),
ref("developer/community/contributing", "Community", "community"),
ref("upgrade-guides/index", "Upgrade Guides", "guides"),
],
concepts: [backToHome, ...coreConcepts],
appStore: [backToHome, ...appStore],
Expand All @@ -92,4 +94,5 @@ module.exports = {
selfHosting: [backToHome, ...selfHosting],
community: [backToHome, ...community],
cloud: [backToHome, ...cloudSidebar],
upgrade: [backToHome, ...upgradeGuidesSidebar],
};
6 changes: 0 additions & 6 deletions sidebars/self-hosting.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,4 @@ export const selfHosting = [
title("Storing Files"),
"setup/media-gcs",
"setup/media-s3",

title("Upgrade Guides"),
{
type: "autogenerated",
dirName: "upgrade-guides",
},
];
11 changes: 11 additions & 0 deletions sidebars/upgrade-guides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { title, chapterTitle, hr } = require("./utils");

export const upgradeGuidesSidebar = [
chapterTitle("upgrade-guides/index", "Upgrade Guides", "guides"),
hr(),
title("Saleor Core"),
{
type: "autogenerated",
dirName: "upgrade-guides/core",
},
];
1 change: 1 addition & 0 deletions src/css/components/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
.menu__link--wrapper {
display: flex;
align-items: center;
font-feature-settings: "tnum";
}
.menu__link--title {
display: flex;
Expand Down
8 changes: 8 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,14 @@
{
"source": "/developer/extending/apps/quickstart/(.*)",
"destination": "eveloper/extending/apps/overview"
},
{
"source": "/upgrade-guides/:name(3-15-to-3-16|3-16-to-1-17|3-17-to-3-18|3-18-to-3-19|3-20-to-3-21)",
"destination": "/upgrade-guides/core/:name"
},
{
"source": "/upgrade-guides/notify-user-deprecation",
"destination": "/upgrade-guides/core/3-16-to-3-17"
}
]
}

0 comments on commit 3ef868c

Please sign in to comment.