Skip to content

Set custom HTTP request header for reporting #67

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

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

andrewjl-mux
Copy link
Contributor

No description provided.

@andrewjl-mux andrewjl-mux requested a review from a team July 17, 2023 15:53
Copy link
Contributor

@cjpillsbury cjpillsbury left a comment

Choose a reason for hiding this comment

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

LGTM! 😎

@andrewjl-mux andrewjl-mux mentioned this pull request Jul 14, 2023
@andrewjl-mux andrewjl-mux force-pushed the ajlb/reporting-updates branch 2 times, most recently from d15711a to 04525e9 Compare July 17, 2023 18:02
Base automatically changed from ajlb/reporting-updates to project/input-standardization July 18, 2023 17:57
@andrewjl-mux andrewjl-mux force-pushed the ajlb/request-header branch from 3a58fa7 to 8fc8d59 Compare July 18, 2023 18:05
@andrewjl-mux andrewjl-mux changed the title Set custom HTTP request header for metrics Set custom HTTP request header for reporting Jul 18, 2023
@andrewjl-mux andrewjl-mux merged commit 986372f into project/input-standardization Jul 18, 2023
@andrewjl-mux andrewjl-mux deleted the ajlb/request-header branch July 18, 2023 18:06
andrewjl-mux added a commit that referenced this pull request Jul 20, 2023
Upload Input Inspection and Standardization 1 (#17)

Add scaffolding

Add initializers

Add internal and external state mapping

Remove duplicate status enum and add inline docs to external status

Add inline API docs to PHAsset-based MuxUpload constructor

Consolidate all `MuxUpload` options into a single struct `UploadOptions`

Declare asynchronous MuxUpload constructor in PHAsset extension

Place extension methods into dedicated directories

Polish inline API documentation

Add new API documentation and note the placeholder implementation

Add option variants as static members: defaults, disabled inputStandardization

Deprecate existing initializer, normally this API should be removed prior to GA, but since it was the only initializer exposed up to this point removing it would break everybody. Instead deprecate and remove at a later date.

Store all MuxUpload-related options in UploadInfo

Use correct starting byte parameter when restarting upload

Hardcode request options when exporting AVAsset from PhotosKit

chunkSize -> chunkSizeInBytes

Input standardization 2 (#41)

Maintain handle to canonical input asset inside UploadInput

If input standardized, standardized input URL is passed to UploadInfo
instead of the original input URL used for initializer

Note: SDK probably needs to re-export a high quality asset anyway so
possibly need a bridging status

Add dedicated internal initializer for MuxUpload error with unknown error code

Disable input standardization when running tests

Add inspection logic

Request local and remote assets

Status -> TransportStatus

Rely on input status in MuxUpload computed property getters

Expose progress from internal upload state if available

Track transport status inside of UploadInput

Transport status start time optional

Add TransportStatus docs

Inspect and check video track frame rate

Migrate tests for MuxUpload input result handler

Input standardization 3 (#46)

Standardize via export session

Back out outputURL construction into MuxUpload

Expose hook for client to cancel upload if standardization failed

Call cancellation hook if inspection fails. We're not sure if the input is standard or not so better to be safe
and confirm

Export based on maximum resolution set by client

Cleaner non standard input handler invocation (#57)

Add CustomStringConvertible conformance to maximum resolution (#56)

Update input state when upload is finished (#63)

Update input state when the upload succeeds or fails

Tweak input state definition, keep an error in the failed case and the success struct in the success case

NFC: remove some if let checks for the handler closure properties in MuxUpload and replace with ? operator. Keeps the existing logic.

Replace video file get with actual implementation (#64)

Reporting updates (#49)

Only mark upload as started if its ready

Add upload failed and input standardization events

Add standardization failure event handler to reporter

Add standardization success event handler to reporter

Rename method for upload success

Rename upload event to upload succeeded

Support dispatching multiple events at the same time

Naive non-thread safe implementation reporter networking

Change event type casing, individual files for events

Fix reporter test

Actually report upload failure

Read off file size

Use Date in events and serialize to ISO8601 string

Finangle duration and start time

Set correct version in correct place

Keep a session UUID

Route every request through one chokepoint

Upload failed test

Shared test encoder

Input standardization failed test

Input standardization succeeded test

Better organize expected json strings

Use a shared instance

Remove dupe file

Thread asset duration through inspection and standardization

Pass export error back

Include non standard input reasons

Workaround duration load pause

Avoid mutating while iterating when UploadManager makes delegate calls

Set custom HTTP request header for reporting (#67)

Remove Equatable and Hashable conformance from MuxUpload (#68)

Safe storage for MuxUpload (#71)

Intended to prevent a crash if MuxUpload is extended by the SDK client to conform to Equatable or Hashable protocols
cjpillsbury pushed a commit that referenced this pull request Jul 20, 2023
Upload Input Inspection and Standardization 1 (#17)

Add scaffolding

Add initializers

Add internal and external state mapping

Remove duplicate status enum and add inline docs to external status

Add inline API docs to PHAsset-based MuxUpload constructor

Consolidate all `MuxUpload` options into a single struct `UploadOptions`

Declare asynchronous MuxUpload constructor in PHAsset extension

Place extension methods into dedicated directories

Polish inline API documentation

Add new API documentation and note the placeholder implementation

Add option variants as static members: defaults, disabled inputStandardization

Deprecate existing initializer, normally this API should be removed prior to GA, but since it was the only initializer exposed up to this point removing it would break everybody. Instead deprecate and remove at a later date.

Store all MuxUpload-related options in UploadInfo

Use correct starting byte parameter when restarting upload

Hardcode request options when exporting AVAsset from PhotosKit

chunkSize -> chunkSizeInBytes

Input standardization 2 (#41)

Maintain handle to canonical input asset inside UploadInput

If input standardized, standardized input URL is passed to UploadInfo
instead of the original input URL used for initializer

Note: SDK probably needs to re-export a high quality asset anyway so
possibly need a bridging status

Add dedicated internal initializer for MuxUpload error with unknown error code

Disable input standardization when running tests

Add inspection logic

Request local and remote assets

Status -> TransportStatus

Rely on input status in MuxUpload computed property getters

Expose progress from internal upload state if available

Track transport status inside of UploadInput

Transport status start time optional

Add TransportStatus docs

Inspect and check video track frame rate

Migrate tests for MuxUpload input result handler

Input standardization 3 (#46)

Standardize via export session

Back out outputURL construction into MuxUpload

Expose hook for client to cancel upload if standardization failed

Call cancellation hook if inspection fails. We're not sure if the input is standard or not so better to be safe
and confirm

Export based on maximum resolution set by client

Cleaner non standard input handler invocation (#57)

Add CustomStringConvertible conformance to maximum resolution (#56)

Update input state when upload is finished (#63)

Update input state when the upload succeeds or fails

Tweak input state definition, keep an error in the failed case and the success struct in the success case

NFC: remove some if let checks for the handler closure properties in MuxUpload and replace with ? operator. Keeps the existing logic.

Replace video file get with actual implementation (#64)

Reporting updates (#49)

Only mark upload as started if its ready

Add upload failed and input standardization events

Add standardization failure event handler to reporter

Add standardization success event handler to reporter

Rename method for upload success

Rename upload event to upload succeeded

Support dispatching multiple events at the same time

Naive non-thread safe implementation reporter networking

Change event type casing, individual files for events

Fix reporter test

Actually report upload failure

Read off file size

Use Date in events and serialize to ISO8601 string

Finangle duration and start time

Set correct version in correct place

Keep a session UUID

Route every request through one chokepoint

Upload failed test

Shared test encoder

Input standardization failed test

Input standardization succeeded test

Better organize expected json strings

Use a shared instance

Remove dupe file

Thread asset duration through inspection and standardization

Pass export error back

Include non standard input reasons

Workaround duration load pause

Avoid mutating while iterating when UploadManager makes delegate calls

Set custom HTTP request header for reporting (#67)

Remove Equatable and Hashable conformance from MuxUpload (#68)

Safe storage for MuxUpload (#71)

Intended to prevent a crash if MuxUpload is extended by the SDK client to conform to Equatable or Hashable protocols
andrewjl-mux added a commit that referenced this pull request Jul 20, 2023
Upload Input Inspection and Standardization 1 (#17)

Add scaffolding

Add initializers

Add internal and external state mapping

Remove duplicate status enum and add inline docs to external status

Add inline API docs to PHAsset-based MuxUpload constructor

Consolidate all `MuxUpload` options into a single struct `UploadOptions`

Declare asynchronous MuxUpload constructor in PHAsset extension

Place extension methods into dedicated directories

Polish inline API documentation

Add new API documentation and note the placeholder implementation

Add option variants as static members: defaults, disabled inputStandardization

Deprecate existing initializer, normally this API should be removed prior to GA, but since it was the only initializer exposed up to this point removing it would break everybody. Instead deprecate and remove at a later date.

Store all MuxUpload-related options in UploadInfo

Use correct starting byte parameter when restarting upload

Hardcode request options when exporting AVAsset from PhotosKit

chunkSize -> chunkSizeInBytes

Input standardization 2 (#41)

Maintain handle to canonical input asset inside UploadInput

If input standardized, standardized input URL is passed to UploadInfo
instead of the original input URL used for initializer

Note: SDK probably needs to re-export a high quality asset anyway so
possibly need a bridging status

Add dedicated internal initializer for MuxUpload error with unknown error code

Disable input standardization when running tests

Add inspection logic

Request local and remote assets

Status -> TransportStatus

Rely on input status in MuxUpload computed property getters

Expose progress from internal upload state if available

Track transport status inside of UploadInput

Transport status start time optional

Add TransportStatus docs

Inspect and check video track frame rate

Migrate tests for MuxUpload input result handler

Input standardization 3 (#46)

Standardize via export session

Back out outputURL construction into MuxUpload

Expose hook for client to cancel upload if standardization failed

Call cancellation hook if inspection fails. We're not sure if the input is standard or not so better to be safe
and confirm

Export based on maximum resolution set by client

Cleaner non standard input handler invocation (#57)

Add CustomStringConvertible conformance to maximum resolution (#56)

Update input state when upload is finished (#63)

Update input state when the upload succeeds or fails

Tweak input state definition, keep an error in the failed case and the success struct in the success case

NFC: remove some if let checks for the handler closure properties in MuxUpload and replace with ? operator. Keeps the existing logic.

Replace video file get with actual implementation (#64)

Reporting updates (#49)

Only mark upload as started if its ready

Add upload failed and input standardization events

Add standardization failure event handler to reporter

Add standardization success event handler to reporter

Rename method for upload success

Rename upload event to upload succeeded

Support dispatching multiple events at the same time

Naive non-thread safe implementation reporter networking

Change event type casing, individual files for events

Fix reporter test

Actually report upload failure

Read off file size

Use Date in events and serialize to ISO8601 string

Finangle duration and start time

Set correct version in correct place

Keep a session UUID

Route every request through one chokepoint

Upload failed test

Shared test encoder

Input standardization failed test

Input standardization succeeded test

Better organize expected json strings

Use a shared instance

Remove dupe file

Thread asset duration through inspection and standardization

Pass export error back

Include non standard input reasons

Workaround duration load pause

Avoid mutating while iterating when UploadManager makes delegate calls

Set custom HTTP request header for reporting (#67)

Remove Equatable and Hashable conformance from MuxUpload (#68)

Safe storage for MuxUpload (#71)

Intended to prevent a crash if MuxUpload is extended by the SDK client to conform to Equatable or Hashable protocols
andrewjl-mux added a commit that referenced this pull request Jul 20, 2023
Upload Input Inspection and Standardization 1 (#17)

Add scaffolding

Add initializers

Add internal and external state mapping

Remove duplicate status enum and add inline docs to external status

Add inline API docs to PHAsset-based MuxUpload constructor

Consolidate all `MuxUpload` options into a single struct `UploadOptions`

Declare asynchronous MuxUpload constructor in PHAsset extension

Place extension methods into dedicated directories

Polish inline API documentation

Add new API documentation and note the placeholder implementation

Add option variants as static members: defaults, disabled inputStandardization

Deprecate existing initializer, normally this API should be removed prior to GA, but since it was the only initializer exposed up to this point removing it would break everybody. Instead deprecate and remove at a later date.

Store all MuxUpload-related options in UploadInfo

Use correct starting byte parameter when restarting upload

Hardcode request options when exporting AVAsset from PhotosKit

chunkSize -> chunkSizeInBytes

Input standardization 2 (#41)

Maintain handle to canonical input asset inside UploadInput

If input standardized, standardized input URL is passed to UploadInfo
instead of the original input URL used for initializer

Note: SDK probably needs to re-export a high quality asset anyway so
possibly need a bridging status

Add dedicated internal initializer for MuxUpload error with unknown error code

Disable input standardization when running tests

Add inspection logic

Request local and remote assets

Status -> TransportStatus

Rely on input status in MuxUpload computed property getters

Expose progress from internal upload state if available

Track transport status inside of UploadInput

Transport status start time optional

Add TransportStatus docs

Inspect and check video track frame rate

Migrate tests for MuxUpload input result handler

Input standardization 3 (#46)

Standardize via export session

Back out outputURL construction into MuxUpload

Expose hook for client to cancel upload if standardization failed

Call cancellation hook if inspection fails. We're not sure if the input is standard or not so better to be safe
and confirm

Export based on maximum resolution set by client

Cleaner non standard input handler invocation (#57)

Add CustomStringConvertible conformance to maximum resolution (#56)

Update input state when upload is finished (#63)

Update input state when the upload succeeds or fails

Tweak input state definition, keep an error in the failed case and the success struct in the success case

NFC: remove some if let checks for the handler closure properties in MuxUpload and replace with ? operator. Keeps the existing logic.

Replace video file get with actual implementation (#64)

Reporting updates (#49)

Only mark upload as started if its ready

Add upload failed and input standardization events

Add standardization failure event handler to reporter

Add standardization success event handler to reporter

Rename method for upload success

Rename upload event to upload succeeded

Support dispatching multiple events at the same time

Naive non-thread safe implementation reporter networking

Change event type casing, individual files for events

Fix reporter test

Actually report upload failure

Read off file size

Use Date in events and serialize to ISO8601 string

Finangle duration and start time

Set correct version in correct place

Keep a session UUID

Route every request through one chokepoint

Upload failed test

Shared test encoder

Input standardization failed test

Input standardization succeeded test

Better organize expected json strings

Use a shared instance

Remove dupe file

Thread asset duration through inspection and standardization

Pass export error back

Include non standard input reasons

Workaround duration load pause

Avoid mutating while iterating when UploadManager makes delegate calls

Set custom HTTP request header for reporting (#67)

Remove Equatable and Hashable conformance from MuxUpload (#68)

Safe storage for MuxUpload (#71)

Intended to prevent a crash if MuxUpload is extended by the SDK client to conform to Equatable or Hashable protocols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants