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

Release v1.121.0 - staging → master #10563

Merged
merged 52 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
1c5e926
upcoming: [M3-8032] – Add Encrypted/Not Encrypted status to Node Pool…
dwiley-akamai May 23, 2024
98f7615
test: [M3-8060, M3-8061] - Cypress tests for Linode Create v2 flows (…
jdamore-linode May 23, 2024
f99456f
refactor: [M3-7382] - Use `object-storage/types` endpoint for pricing…
mjac0bs May 23, 2024
32f836a
fix: [M3-8042] - Firewall landing device request with -1 ID (#10509)
hana-linode May 23, 2024
819356b
feat: [M3-8016] - Add TagSelect to edit images drawer (#10466)
hkhalil-akamai May 23, 2024
d5e7bd9
fix: Linode Create v2 - UDFs (#10507)
bnussman-akamai May 23, 2024
7b2220e
test: [M3-7557] - remove console logs from e2e tests (#10506)
AzureLatte May 24, 2024
6524907
upcoming: [DI-18311] - Add CloudPulse feature flag and landing page t…
santoshp210 May 24, 2024
5bf015e
Delete accidentally committed testing error (#10514)
hkhalil-akamai May 24, 2024
432909f
feat: [M3-8099] - Improve Linode Clone Power Off based on initial dat…
mjac0bs May 24, 2024
b6c4094
test: [M3-6609] - Add Linode details page assertion for LISH via SSH …
AzureLatte May 28, 2024
60a108d
feat: [M3-8023] - Refactor Image Upload and Add Tags (#10484)
bnussman-akamai May 28, 2024
49b9a01
test: [DBAAS1-661] - Test automation for database resize (#10461)
sujai-git May 28, 2024
8c88ba9
Merge branch 'master' into develop
bnussman May 28, 2024
5a82040
fix: Cypress test creating an Image without a `cy-test` prefixed labe…
bnussman-akamai May 29, 2024
6f013a5
fix: [M3-8164] - regions length check (#10519)
cpathipa May 29, 2024
c849cfe
refactor: [M3-8128] - Query Key Factory for Support Tickets (#10496)
bnussman-akamai May 29, 2024
c9eca30
Merge branch 'master' into develop
bnussman May 29, 2024
c4b60ae
fix: [M3-7977] - Surface interface error in Linode Config dialog (#1…
mjac0bs May 29, 2024
1a1067b
upcoming: [DI-18311] - Adding CloudPulse section to Cloud Manager (#1…
santoshp210 May 30, 2024
5561201
refactor: [M3-6903] - Replace Select with Autocomplete in: volumes (#…
cpathipa May 30, 2024
1154b84
feat: [M3-7883] - Add search and alphabetical sorting to Switch Accou…
mjac0bs May 30, 2024
a07b432
refactor: [M3-7999] - Remove `recompose` - Part 1 (#10516)
bnussman-akamai May 30, 2024
df42a4a
fix: `EditRouteDrawer.test.tsx` unit test flake (#10526)
bnussman-akamai May 30, 2024
7a5f3b7
refactor: [M3-8130] - Query Key Factory for Databases (#10503)
bnussman-akamai May 30, 2024
cbb668a
fix: [M3-7717] - Fix leading whitespace in list of Linode and Nodebal…
mjac0bs May 31, 2024
0e2d367
fix: [M3-7592] - Fix misalignment of Cluster Summary at small desktop…
mjac0bs May 31, 2024
c022c12
test: [M3-8132] - Add Cypress integration test for email bounce banne…
AzureLatte May 31, 2024
cae54e8
feat: [OCA-1345] - June 10 2024 Marketplace Release (#10500)
tbaka-akamai Jun 3, 2024
8545f68
test: [M3-7784] - Cypress integration tests for Placement Group updat…
carrillo-erik Jun 3, 2024
894afd5
upcoming: [M3-7874] - Linode Create Refactor - Marketplace App Sectio…
bnussman-akamai Jun 3, 2024
c03915e
upcoming: [M3-8083] - Linode Create v2 - Disk Encryption (#10535)
bnussman-akamai Jun 3, 2024
5abec31
upcoming: [M3-8139, M3-8140, M3-8141] – Add warning notices re: non-e…
dwiley-akamai Jun 3, 2024
55c8101
refactor/upcoming: [M3-8116] - Event Messages - Part 1 (#10517)
abailly-akamai Jun 4, 2024
ae81ee3
fix: [M3-7718] - Stale assigned Firewall data displaying on Linode an…
mjac0bs Jun 4, 2024
e092248
upcoming: [M3-8014] - Update APIv4 and Validation packages based on I…
hkhalil-akamai Jun 4, 2024
bbbca9b
refactor: [M3-8071] - Rename Edge Regions to Distributed Regions (#10…
jaalah-akamai Jun 4, 2024
9e6474a
upcoming: [M3-8019] – Add Encrypted/Not Encrypted status to Linode De…
dwiley-akamai Jun 4, 2024
684c38c
test: [M3-8108, M3-8113] - Improve security of Linodes created by tes…
jdamore-linode Jun 5, 2024
c13f58e
change: [M3-8159] - Modify limited availability banner display logic …
abailly-akamai Jun 5, 2024
b78edb7
refactor: [M3-7437] - Query Key Factory for Security Questions and Pr…
bnussman-akamai Jun 5, 2024
d52ad40
change: [M3-6541] - eslint: consistent-type-imports (#10540)
abailly-akamai Jun 5, 2024
a0c4520
refactor: [M3-8183] - Clean up loading components (#10524)
hana-linode Jun 5, 2024
c2544d1
test: Improve unit test stability when running locally (#10278)
jdamore-linode Jun 5, 2024
7124a92
test: [M3-8013] - Upgrade to Cypress v13.11.0 (#10548)
jdamore-linode Jun 6, 2024
d4139ad
feat: [M3-7919] Add Fonoa tax id event notification on invalidation (…
jaalah-akamai Jun 6, 2024
9be18fc
Cloud version 1.121.0, API v4 version 0.119.0, and Validation version…
jaalah Jun 6, 2024
fee89b8
Update changelog from review
jaalah Jun 10, 2024
87e0fcb
upcoming: [M3-8218] - Obj fix for crashing accesskey page when releva…
cpathipa Jun 10, 2024
647d2d0
add edge renaming to changelog
hana-linode Jun 10, 2024
c765fcb
fix: [M3-8162] - Inability to create access keys due to incorrectly r…
cpathipa Jun 10, 2024
a995982
Merge pull request #10553 from linode/release-v1.121.0
cpathipa Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
73 changes: 73 additions & 0 deletions docs/development-guide/15-api-events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# API Events

In order to display Events, Cloud Manager polls the [account/events](https://www.linode.com/docs/api/account/#events-list) endpoint at a 16 second interval, or every 2 seconds if there are “in-progress” events.

In order to display these messages in the application (Notification Center, /events page), we compose messages according to the Event key (`EventAction`). Each key requires an entry and set of custom messages for each status (`EventStatus`), dictated by API specs. Not every Status is required for a given Action.

## Adding a new Action and Composing Messages

In order to add a new Action, one must add a new key to the read-only `EventActionKeys` constant array in the api-v4 package.
Once that's done, a related entry must be added to the `eventMessages` Event Map. In order to do so, the entry can either be added to an existing Event Factory or a new one. `eventMessages` is strictly typed, so the decision where to add the new Action will be clear. ex:

```Typescript
import { EventLink } from '../EventLink';

import type { PartialEventMap } from '../types';

export const linode: PartialEventMap<'linode'> = {
linode_addip: {
notification: (e) => (
<>
An IP address has been <strong>added</strong> to Linode{' '}
<EventLink event={e} to="entity" />.
</>
),
},
};
```

The convention to compose the message is as follows:
- Use the `<EventLink />` component for linking `entity` or `secondary_entity`. This component includes a lookup util to format the link `href` according to the feature.
- The bolding should only be applied to:
- the primary action: (ex: `<strong>created</strong>`)
- its correlated negation for negative actions (ex: `could <strong>not</strong> be <strong>created</strong>.`)
- The `message` should be also handled via the `<EventMessage message={e.message} />` in order to handle potential formatting from the API string (ticks to indicate code blocks).

## Displaying Events in snackbars

We can leverage the Event Message factories in order to display events in snackbars/toasts when a given action gets triggered via APIv4.

```Typescript
const { enqueueSnackbar } = useSnackbar();

try {
const successMessage = getEventMessage({
action: 'image_upload',
entity: {
label: 'Entity',
url: '/image/123',
},
status: 'notification',
});

const showToast = (variant: any) =>
enqueueSnackbar(successMessage, {
'success',
});
}, catch {
const failureMessage = getEventMessage({
action: 'image_upload',
// in this case we don't add an entity since we know we can't link to it
status: 'failed',
});

const showToast = (variant: any) =>
enqueueSnackbar(failureMessage, {
'error',
});
}
```

Both `action` and `status` are required. The `entity` and `secondary_entity` can optionally be passed to allow for linking. **Note**: it is possible the Event Message linking will be missing if the action status message expects either value but isn't not provided by the instance call.

If a corresponding status does not exist (ex: "failed"), it's encouraged to add it to the Action. Event if not triggered by the API, it can be useful to have a reusable Event Message to use through the App.
19 changes: 19 additions & 0 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## [2024-06-10] - v0.119.0


### Added:

- `tags` field in `Image` type ([#10466](https://github.com/linode/manager/pull/10466))
- New endpoint for `object-storage/types` ([#10468](https://github.com/linode/manager/pull/10468))
- `members` to `DatabaseInstance` and `Database` types ([#10503](https://github.com/linode/manager/pull/10503))
- New event `tax_id_invalid` for account tax id ([#10512](https://github.com/linode/manager/pull/10512))

### Changed:

- Update return type of `updateDatabase` to be `Database` ([#10503](https://github.com/linode/manager/pull/10503))
- Add lke_cluster_id to Linode interface ([#10537](https://github.com/linode/manager/pull/10537))

### Upcoming Features:

- Update images endpoints to reflect the image service API spec ([#10541](https://github.com/linode/manager/pull/10541))

## [2024-05-28] - v0.118.0


Expand Down
4 changes: 2 additions & 2 deletions packages/api-v4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linode/api-v4",
"version": "0.118.0",
"version": "0.119.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down Expand Up @@ -67,7 +67,7 @@
"lint-staged": "^13.2.2",
"prettier": "~2.2.1",
"tsup": "^7.2.0",
"vitest": "^1.0.1"
"vitest": "^1.3.1"
},
"lint-staged": {
"*.{ts,tsx,js}": [
Expand Down
Loading
Loading