Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Add option to ignore single artifact downloading error #6

@ensean

Description

@ensean

We set https://pub.flutter-io.cn/api as upstream due to network connection consideration, but recently we find that some corrupt artifact url we cause the mirroring process stopped.

Unhandled exception:
failed with 478 when visiting https://pub.flutter-io.cn/packages/sqfentity_gen/versions/1.2.3%2B18.tar.gz: status code 478
package:pub_mirror/http.dart 62:5                                                        saveFileTo
package:pub_mirror/pub_mirror.dart 130:11                                                PubMirrorTool.saveArchiveFile
package:pub_mirror/pub_mirror.dart 97:15                                                 PubMirrorTool.downloadPackage
package:pub_mirror/pub_mirror.dart 161:15                                                PubMirrorTool.download.<fn>
root/.pub-cache/hosted/pub.dartlang.org/executor-2.1.2/lib/src/executor_impl.dart 61:27  _Executor.scheduleTask
package:pub_mirror/pub_mirror.dart 159:30                                                PubMirrorTool.download
root/.pub-cache/hosted/pub.dartlang.org/pub_mirror-1.0.7/bin/pub_mirror.dart 46:8        main
dart:isolate/runtime/libisolate_patch.dart 287:32                                        _startIsolate.<fn>
dart:isolate/runtime/libisolate_patch.dart 171:12                                        _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
package:pub_mirror/pub_mirror.dart 159:30                                                PubMirrorTool.download
root/.pub-cache/hosted/pub.dartlang.org/pub_mirror-1.0.7/bin/pub_mirror.dart 46:8        main
dart:isolate/runtime/libisolate_patch.dart 287:32                                        _startIsolate.<fn>
dart:isolate/runtime/libisolate_patch.dart 171:12                                        _RawReceivePortImpl._handleMessage

So is it possible to provide an option to ignore such kind of error? So we can sync most of the artifacts with the https://pub.flutter-io.cn/api upstream and sync the corrupt files from pub.dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions