Skip to content

Commit 38e4ea9

Browse files
authored
🟣 Release 5.0.0
Merge pull request #5988 from WRadoslaw/release/5.0.0
2 parents d8fac26 + 933998b commit 38e4ea9

File tree

9 files changed

+437
-338
lines changed

9 files changed

+437
-338
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [5.0.0] - 2024-03-13
9+
10+
### Added
11+
12+
- New types for Nara network release
13+
14+
### Fixed
15+
16+
- Logs during upload failure
17+
18+
### Changed
19+
20+
- Rolled back to previous version of Swiper due to loop issues
21+
822
## [4.15.2] - 2024-03-07
923

1024
### Added

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@
6767
"typescript": "^5.1.6"
6868
},
6969
"resolutions": {
70-
"@polkadot/api": "8.9.1",
71-
"@polkadot/keyring": "9.5.1",
72-
"@polkadot/types": "8.9.1",
73-
"@polkadot/util": "9.5.1",
74-
"@polkadot/util-crypto": "9.5.1",
70+
"@polkadot/api": "10.1.4",
71+
"@polkadot/keyring": "11.1.1",
72+
"@polkadot/types": "10.1.4",
73+
"@polkadot/util": "12.6.2",
74+
"@polkadot/util-crypto": "12.6.2",
7575
"@polkadot/networks": "9.5.1",
7676
"@polkadot/x-fetch": "9.5.1",
7777
"@polkadot/x-global": "9.5.1",

packages/atlas/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@joystream/atlas",
33
"description": "UI for consuming Joystream - a user governed video platform",
4-
"version": "4.15.2",
4+
"version": "5.0.0",
55
"license": "GPL-3.0",
66
"scripts": {
77
"start": "vite",
@@ -40,7 +40,7 @@
4040
"@hookform/resolvers": "^2.9.10",
4141
"@joystream/js": "^1.4.0",
4242
"@joystream/metadata-protobuf": "2.8.1",
43-
"@joystream/types": "2.1.0",
43+
"@joystream/types": "4.3.0",
4444
"@livesession/sdk": "^1.1.4",
4545
"@loadable/component": "^5.15.2",
4646
"@lottiefiles/react-lottie-player": "^3.5.0",
@@ -96,7 +96,7 @@
9696
"retry-axios": "^3.0.0",
9797
"scroll-lock": "^2.1.5",
9898
"subscriptions-transport-ws": "^0.11.0",
99-
"swiper": "11.0.4",
99+
"swiper": "^9.1.1",
100100
"twemoji": "^14.0.2",
101101
"use-draggable-scroll": "^0.1.0",
102102
"use-resize-observer": "^9.1.0",
@@ -128,7 +128,7 @@
128128
"@testing-library/jest-dom": "^5.16.5",
129129
"@testing-library/react": "^13.4.0",
130130
"@types/aos": "^3.0.4",
131-
"@types/bn.js": "^5.1.1",
131+
"@types/bn.js": "^5.1.5",
132132
"@types/crypto-js": "^4.1.1",
133133
"@types/js-yaml": "^4.0.5",
134134
"@types/loadable__component": "^5.13.4",

packages/atlas/src/.env

+6-6
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ VITE_DEVELOPMENT_FAUCET_URL=https://atlas-dev.joystream.org/member-faucet/regist
4646
VITE_DEVELOPMENT_YPP_FAUCET_URL=https://50.19.175.219.nip.io/memberships
4747

4848
# Experimental env URLs
49-
VITE_NEXT_ORION_AUTH_URL=
50-
VITE_NEXT_ORION_URL=https://atlas-next.joystream.org/orion/graphql
51-
VITE_NEXT_QUERY_NODE_SUBSCRIPTION_URL=wss://atlas-next.joystream.org/orion/graphql
52-
VITE_NEXT_NODE_URL=wss://atlas-next.joystream.org/ws-rpc
53-
VITE_NEXT_FAUCET_URL=https://atlas-next.joystream.org/member-faucet/register
54-
VITE_NEXT_YPP_FAUCET_URL=https://52.204.147.11.nip.io/membership
49+
VITE_NEXT_ORION_AUTH_URL=https://3.73.121.180.nip.io/api/v1
50+
VITE_NEXT_ORION_URL=https://3.73.121.180.nip.io/orion/graphql
51+
VITE_NEXT_QUERY_NODE_SUBSCRIPTION_URL=wss://3.73.121.180.nip.io/orion/graphql
52+
VITE_NEXT_NODE_URL=wss://3.73.121.180.nip.io/ws-rpc
53+
VITE_NEXT_FAUCET_URL=https://3.73.121.180.nip.io/member-faucet/register
54+
VITE_NEXT_YPP_FAUCET_URL=wss://3.73.121.180.nip.io/ws-rpc
5555

5656
# Local development env URLs
5757
VITE_LOCAL_ORION_AUTH_URL=http://localhost:4074/api/v1

packages/atlas/src/components/Carousel/Carousel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ReactNode } from 'react'
2+
import { Navigation, Pagination } from 'swiper'
23
import 'swiper/css'
3-
import { Navigation, Pagination } from 'swiper/modules'
44
import { SwiperProps, SwiperSlide } from 'swiper/react'
55
import { Swiper as SwiperType } from 'swiper/types'
66

packages/atlas/src/hooks/useGetAssetUrl.ts

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export const getSingleAssetUrl = async (
3434
dataObjectId: id,
3535
dataObjectType: type || undefined,
3636
resolvedUrl: distributionAssetUrl,
37+
// https://mrbovo.distributor.cc/distributor/api/v1/assets/48451 -> regexp match for https://mrbovo.distributor.cc
38+
distributorUrl: distributionAssetUrl.match(/https?:\/\/[^/]+/)?.[0] ?? undefined,
3739
}
3840
const [assetTestPromise, cleanup] = testAssetDownload(distributionAssetUrl, type, opts)
3941
const assetTestPromiseWithTimeout = withTimeout(

packages/atlas/src/providers/uploads/uploads.hooks.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const useStartFileUpload = () => {
180180

181181
// only retry on Axios error, otherwise code is to blame
182182
if (networkFailure) {
183-
UserEventsLogger.logDistributorError({ dataObjectId: asset.id, distributorId: uploadOperator.id }, e)
183+
UserEventsLogger.logUploadError({ dataObjectId: asset.id, storageOperatorId: uploadOperator.id }, e)
184184

185185
markStorageOperatorFailed(uploadOperator.id)
186186
const retry = opts?.retry ?? 0
@@ -199,8 +199,8 @@ export const useStartFileUpload = () => {
199199
{
200200
dataObjectId: asset.id,
201201
dataObjectType: asset.type,
202-
distributorId: uploadOperator.id,
203-
distributorUrl: uploadOperator.endpoint,
202+
storageOperatorId: uploadOperator.id,
203+
storageOperatorUrl: uploadOperator.endpoint,
204204
},
205205
e
206206
)

packages/atlas/src/utils/logs/asset.ts

+21-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ type DistributorEventDetails = {
1313
distributorUrl?: string | null
1414
}
1515

16+
type StorageOperatorEventDetails = {
17+
storageOperatorId?: string
18+
storageOperatorUrl?: string | null
19+
}
20+
1621
export type DistributorEventMetric = {
1722
initialResponseTime?: number
1823
fullResponseTime?: number
@@ -44,11 +49,15 @@ type UserLogEvent = {
4449
[x: string]: unknown
4550
}
4651

47-
export type DistributorEventEntry = {
52+
export type DataObjectEventEntry = {
4853
dataObjectId?: string | null
4954
dataObjectType?: DataObjectType['__typename'] | AssetType
5055
resolvedUrl?: string
51-
} & DistributorEventDetails
56+
}
57+
58+
export type StorageOperatorEventEntry = DataObjectEventEntry & StorageOperatorEventDetails
59+
60+
export type DistributorEventEntry = DataObjectEventEntry & DistributorEventDetails
5261

5362
type CodecInfo = {
5463
assetType: string | null
@@ -144,6 +153,15 @@ class _UserEventsLogger {
144153
this.addErrorEvent(event)
145154
}
146155

156+
logUploadError(entry: StorageOperatorEventEntry, error: Error) {
157+
const event: UserLogEvent = {
158+
type: 'distributor-response-error',
159+
...entry,
160+
error: error.message,
161+
}
162+
this.addErrorEvent(event)
163+
}
164+
147165
logDistributorResponseTimeout(entry: DistributorEventEntry) {
148166
const event: UserPerformanceEvent = {
149167
type: 'distributor-response-timeout',
@@ -177,7 +195,7 @@ class _UserEventsLogger {
177195
this.addErrorEvent(event)
178196
}
179197

180-
logAssetUploadFailedEvent(entry: DistributorEventEntry, error: Error) {
198+
logAssetUploadFailedEvent(entry: StorageOperatorEventEntry, error: Error) {
181199
const event: UserLogEvent = {
182200
type: 'asset-upload-failed',
183201
...entry,

0 commit comments

Comments
 (0)