Skip to content

Why is my package always pending analysis? #8714

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

Open
moluopro opened this issue Apr 24, 2025 · 12 comments
Open

Why is my package always pending analysis? #8714

moluopro opened this issue Apr 24, 2025 · 12 comments

Comments

@moluopro
Copy link

URL: https://pub.dev/packages/jsf/versions

As seen on the far right of the picture, the package I published 18 hours ago is still pending. Maybe there's an issue with my code, but I'm not receiving any feedback.

Image

@moluopro
Copy link
Author

moluopro commented Apr 24, 2025

The result of dart pub publish --dry-run: Package has 0 warnings.

moluo@ubuntu:~/work/flutter/jsf$ dart pub publish --dry-run

......

Total compressed archive size: 2 MB.
Validating package... (2.1s)
The server may enforce additional checks.

Package has 0 warnings.

@lvyandev
Copy link

@PeeyushSachan
Copy link

I also have same issue.my code is clean and zero error . But analysis is takeing too long why?

https://pub.dev/packages/responsive_media

@YoussefShehab
Copy link

i am facing same issue. [pending analysis] not finished yet from yesterday !

https://pub.dev/packages/link_bridge

@jonasfj
Copy link
Member

jonasfj commented Apr 24, 2025

Yeah, all analysis have stopped. I tracked it down in logs to:

pub.task.schedule: Failed to create instance worker-01jsknbsr76qyz2mnaexatmzfz, banning zone "us-central1-c" for 15 minutes

Error:
    DetailedApiRequestError(status: 404, message: The resource 'projects/cos-cloud/global/images/family/cos-105-lts' was not found)

Stack:
    #0      validateResponse (package:_discoveryapis_commons/src/api_requester.dart:306:9)
    <asynchronous suspension>
    #1      ApiRequester.request (package:_discoveryapis_commons/src/api_requester.dart:72:16)
    <asynchronous suspension>
    #2      InstancesResource.insert (package:googleapis/compute/v1.dart:16590:23)
    <asynchronous suspension>
    #3      Future.timeout.<anonymous closure> (dart:async/future_impl.dart:1043:7)
    <asynchronous suspension>
    #4      RetryOptions.retry (package:retry/retry.dart:131:16)
    <asynchronous suspension>
    #5      _retry (package:pub_dev/task/cloudcompute/googlecloudcompute.dart:281:10)
    <asynchronous suspension>
    #6      _retryWithRequestId (package:pub_dev/task/cloudcompute/googlecloudcompute.dart:277:10)
    <asynchronous suspension>
    #7      _GoogleCloudCompute.createInstance (package:pub_dev/task/cloudcompute/googlecloudcompute.dart:525:16)
    <asynchronous suspension>
    #8      schedule.<anonymous closure>.<anonymous closure> (package:pub_dev/task/scheduler.dart:184:11)
    <asynchronous suspension>

Clearly, we to bump the version of COS we're using for analysis tasks.

@jonasfj
Copy link
Member

jonasfj commented Apr 24, 2025

PR in progress: #8716

@PeeyushSachan
Copy link

Hi @jonasfj,

Could you please confirm if everything looks okay at this point? We're considering publishing a patch version to re-trigger analysis. However, if the issue persists after the version bump, it might look odd to users seeing the package stuck in “Analyzing…” again.

Thanks in advance!

@moluopro
Copy link
Author

@PeeyushSachan If you release a new version, both versions will be in the [pending analysis] state. If you release more than two versions, all versions will be pending. All versions, except for the two most recent ones, will be removed from the queue and marked as [unknown platforms].

Image

Image

@PeeyushSachan
Copy link

@moluopro Oh, it's not good

@jonasfj
Copy link
Member

jonasfj commented Apr 24, 2025

We're updating production services today, if there is nothing blocking the deployment.

This will trigger an analysis of all package versions that are subject to analysis (we don't analyze all versions, mostly few most recent versions and some most recent major versions).

This usually takes a few hours for the VMs to chew through all the packages. I would expect the [pending analysis] state to be fully recovered tomorrow.

Be ware this only really affects package have been updated in the past ~1-2 days, and most of them have an old analysis result that we use to derive platform and SDK tags from.

@jonasfj
Copy link
Member

jonasfj commented Apr 24, 2025

If you release a new version, both versions will be in the [pending analysis] state. If you release more than two versions, all versions will be pending.

@moluopro the exact logic is:

/// Given a list of versions return the list of versions that should be
/// tracked for analysis.
///
/// We don't analyze all versions, instead we aim to only analyze:
/// * Latest two stable releases (or latest release if it is not yet stable);
/// * Latest preview release (if newer than latest stable release);
/// * Latest prerelease (if newer than latest preview release);
/// * 5 latest major versions (if any).
List<Version> _versionsToTrack(

Basically, we don't analyze all versions, but we pick a subset of versions to analyze.


@PeeyushSachan, I would not suggest publishing a patch version to retrigger analysis. It'll happen automatically and we are analyzing all packages when we do a new deployment anyways.

Years ago we used to have some logic that prioritized which packages to analyze first, I think we had 5-10 VMs running all analysis. As I recall I largely deleted all the prioritization code in favor of just using ~1000 ephemeral VMs for running analysis tasks. So publishing a patch version to trigger analysis won't do much.

@PeeyushSachan
Copy link

@jonasfj Ok cool. Thanks for clarifying ✅

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

No branches or pull requests

5 participants