Skip to content

Commit

Permalink
🟣 Release 5.0.0
Browse files Browse the repository at this point in the history
Merge pull request #5988 from WRadoslaw/release/5.0.0
  • Loading branch information
WRadoslaw authored Mar 13, 2024
2 parents d8fac26 + 933998b commit 38e4ea9
Show file tree
Hide file tree
Showing 9 changed files with 437 additions and 338 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.0.0] - 2024-03-13

### Added

- New types for Nara network release

### Fixed

- Logs during upload failure

### Changed

- Rolled back to previous version of Swiper due to loop issues

## [4.15.2] - 2024-03-07

### Added
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@
"typescript": "^5.1.6"
},
"resolutions": {
"@polkadot/api": "8.9.1",
"@polkadot/keyring": "9.5.1",
"@polkadot/types": "8.9.1",
"@polkadot/util": "9.5.1",
"@polkadot/util-crypto": "9.5.1",
"@polkadot/api": "10.1.4",
"@polkadot/keyring": "11.1.1",
"@polkadot/types": "10.1.4",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@polkadot/networks": "9.5.1",
"@polkadot/x-fetch": "9.5.1",
"@polkadot/x-global": "9.5.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/atlas/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@joystream/atlas",
"description": "UI for consuming Joystream - a user governed video platform",
"version": "4.15.2",
"version": "5.0.0",
"license": "GPL-3.0",
"scripts": {
"start": "vite",
Expand Down Expand Up @@ -40,7 +40,7 @@
"@hookform/resolvers": "^2.9.10",
"@joystream/js": "^1.4.0",
"@joystream/metadata-protobuf": "2.8.1",
"@joystream/types": "2.1.0",
"@joystream/types": "4.3.0",
"@livesession/sdk": "^1.1.4",
"@loadable/component": "^5.15.2",
"@lottiefiles/react-lottie-player": "^3.5.0",
Expand Down Expand Up @@ -96,7 +96,7 @@
"retry-axios": "^3.0.0",
"scroll-lock": "^2.1.5",
"subscriptions-transport-ws": "^0.11.0",
"swiper": "11.0.4",
"swiper": "^9.1.1",
"twemoji": "^14.0.2",
"use-draggable-scroll": "^0.1.0",
"use-resize-observer": "^9.1.0",
Expand Down Expand Up @@ -128,7 +128,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/aos": "^3.0.4",
"@types/bn.js": "^5.1.1",
"@types/bn.js": "^5.1.5",
"@types/crypto-js": "^4.1.1",
"@types/js-yaml": "^4.0.5",
"@types/loadable__component": "^5.13.4",
Expand Down
12 changes: 6 additions & 6 deletions packages/atlas/src/.env
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ VITE_DEVELOPMENT_FAUCET_URL=https://atlas-dev.joystream.org/member-faucet/regist
VITE_DEVELOPMENT_YPP_FAUCET_URL=https://50.19.175.219.nip.io/memberships

# Experimental env URLs
VITE_NEXT_ORION_AUTH_URL=
VITE_NEXT_ORION_URL=https://atlas-next.joystream.org/orion/graphql
VITE_NEXT_QUERY_NODE_SUBSCRIPTION_URL=wss://atlas-next.joystream.org/orion/graphql
VITE_NEXT_NODE_URL=wss://atlas-next.joystream.org/ws-rpc
VITE_NEXT_FAUCET_URL=https://atlas-next.joystream.org/member-faucet/register
VITE_NEXT_YPP_FAUCET_URL=https://52.204.147.11.nip.io/membership
VITE_NEXT_ORION_AUTH_URL=https://3.73.121.180.nip.io/api/v1
VITE_NEXT_ORION_URL=https://3.73.121.180.nip.io/orion/graphql
VITE_NEXT_QUERY_NODE_SUBSCRIPTION_URL=wss://3.73.121.180.nip.io/orion/graphql
VITE_NEXT_NODE_URL=wss://3.73.121.180.nip.io/ws-rpc
VITE_NEXT_FAUCET_URL=https://3.73.121.180.nip.io/member-faucet/register
VITE_NEXT_YPP_FAUCET_URL=wss://3.73.121.180.nip.io/ws-rpc

# Local development env URLs
VITE_LOCAL_ORION_AUTH_URL=http://localhost:4074/api/v1
Expand Down
2 changes: 1 addition & 1 deletion packages/atlas/src/components/Carousel/Carousel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from 'react'
import { Navigation, Pagination } from 'swiper'
import 'swiper/css'
import { Navigation, Pagination } from 'swiper/modules'
import { SwiperProps, SwiperSlide } from 'swiper/react'
import { Swiper as SwiperType } from 'swiper/types'

Expand Down
2 changes: 2 additions & 0 deletions packages/atlas/src/hooks/useGetAssetUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export const getSingleAssetUrl = async (
dataObjectId: id,
dataObjectType: type || undefined,
resolvedUrl: distributionAssetUrl,
// https://mrbovo.distributor.cc/distributor/api/v1/assets/48451 -> regexp match for https://mrbovo.distributor.cc
distributorUrl: distributionAssetUrl.match(/https?:\/\/[^/]+/)?.[0] ?? undefined,
}
const [assetTestPromise, cleanup] = testAssetDownload(distributionAssetUrl, type, opts)
const assetTestPromiseWithTimeout = withTimeout(
Expand Down
6 changes: 3 additions & 3 deletions packages/atlas/src/providers/uploads/uploads.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export const useStartFileUpload = () => {

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

markStorageOperatorFailed(uploadOperator.id)
const retry = opts?.retry ?? 0
Expand All @@ -199,8 +199,8 @@ export const useStartFileUpload = () => {
{
dataObjectId: asset.id,
dataObjectType: asset.type,
distributorId: uploadOperator.id,
distributorUrl: uploadOperator.endpoint,
storageOperatorId: uploadOperator.id,
storageOperatorUrl: uploadOperator.endpoint,
},
e
)
Expand Down
24 changes: 21 additions & 3 deletions packages/atlas/src/utils/logs/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ type DistributorEventDetails = {
distributorUrl?: string | null
}

type StorageOperatorEventDetails = {
storageOperatorId?: string
storageOperatorUrl?: string | null
}

export type DistributorEventMetric = {
initialResponseTime?: number
fullResponseTime?: number
Expand Down Expand Up @@ -44,11 +49,15 @@ type UserLogEvent = {
[x: string]: unknown
}

export type DistributorEventEntry = {
export type DataObjectEventEntry = {
dataObjectId?: string | null
dataObjectType?: DataObjectType['__typename'] | AssetType
resolvedUrl?: string
} & DistributorEventDetails
}

export type StorageOperatorEventEntry = DataObjectEventEntry & StorageOperatorEventDetails

export type DistributorEventEntry = DataObjectEventEntry & DistributorEventDetails

type CodecInfo = {
assetType: string | null
Expand Down Expand Up @@ -144,6 +153,15 @@ class _UserEventsLogger {
this.addErrorEvent(event)
}

logUploadError(entry: StorageOperatorEventEntry, error: Error) {
const event: UserLogEvent = {
type: 'distributor-response-error',
...entry,
error: error.message,
}
this.addErrorEvent(event)
}

logDistributorResponseTimeout(entry: DistributorEventEntry) {
const event: UserPerformanceEvent = {
type: 'distributor-response-timeout',
Expand Down Expand Up @@ -177,7 +195,7 @@ class _UserEventsLogger {
this.addErrorEvent(event)
}

logAssetUploadFailedEvent(entry: DistributorEventEntry, error: Error) {
logAssetUploadFailedEvent(entry: StorageOperatorEventEntry, error: Error) {
const event: UserLogEvent = {
type: 'asset-upload-failed',
...entry,
Expand Down
Loading

0 comments on commit 38e4ea9

Please sign in to comment.