-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
Drupal packages always appearing in changes.json API #1490
Comments
Are you sure it updates every time? Here are the last 20 update jobs for drupal/core for example.
It is updating quite frequently yes.. not quite every 20min but yes, often. |
Now why is it updating? I'm not sure, in theory it should just be github pushes, or one of the maintainers using the API to manually trigger updates. |
Yeah I think so:
|
That's looking good and consistent. Throughout that time period, our script checking For example, as I'm writing this, I requested
Right now, a committer is committing at a good pace, but this still doesn't line up as well as the above timestamps. Also interesting, the time is the exact same for all three packages. Our webhook deliveries for
All three of these packages are derived from the same repository with subtree splits. Our splitting script doesn't coordinate pushes at the exact same time. So it seems like something in Packagist.org is updating all three at the same timestamp for the |
OK so I added some tracking of what triggered an update job, and this reveals something interesting maybe? :)
Seems like we get pushes from our packagist-configured github hook and then just a bit after (or in one instance a minute later) another one from the Drupal-Infrastructure user using API. The second update gets queued tho and retried after a bit I think which leads to the completedAt being usually a few minutes behind the first update. |
Also note that it does not seem to be doing it for drupal/drupal (no manual hook) or drupal/cms (that one has no official hook firing but only the API one 🤷🏻♂️ ) |
Thanks for the additional tracking! The doubled up ones must be https://bitbucket.org/drupalorg-infrastructure/subtree-splitter/src/ee8b917a1806f2ff682116e279e6f5781089f3f0/src/Command/PushCommand.php#lines-105. There's some logic to untangle, and I won't make any deployments for a few days while I'm traveling. Something along the lines of:
To explain the ones behaving correctly already:
So the hope is removing the double updates normalizes all of the behavior for the 3 packages in https://packagist.org/metadata/changes.json |
Yeah I agree, hopefully that'll solve it. If it's not that then I currently have no clue what else could be the cause. |
I deployed my first approach on December 23, https://bitbucket.org/drupalorg-infrastructure/subtree-splitter/commits/85ded723114a42c0b87ea45e44bc4ad63cf4c7f0 This has improved for us, except it’s not correlated to anything I've spotted so far. More weirdly, our staging instance is currently only looping on |
Actually, I'm seeing the same behavior in https://packagist.org/metadata/changes.json. Using a recent timestamp, 5 minutes ago, the same three are updated -
Any chance something like the number of downloads being updated is bumping the last update time used by https://packagist.org/metadata/changes.json ? |
The only way I would see that a file gets added to the metadata/changes.json is if its metadata changes, or you trigger an update via the packagist/src/Package/V2Dumper.php Lines 274 to 282 in 653dfdc
|
In the metadata files, there are no number of downloads.. the only change would be from a new commit to a branch, new tag/release, or a new security advisory being published. I guess we'd need to save some metadata file e.g. https://packagist.org/p2/drupal/core-recommended.json as a pretty-printed json file, then if it changes diff it and figure out what changed if anything. |
We are currently polling
https://packagist.org/metadata/changes.json
for changes to packages we are mirroring. The code for this is at https://gitlab.com/drupal-infrastructure/package-signing/packagist-signed/-/blob/main/bin/update-needed.php?ref_type=heads#L47-50We are making requests approximately every 20 minutes like
Every time the response has
update
s fordrupal/drupal drupal/core drupal/core-recommended
https://github.com/drupal/core-recommended for example is not updated that frequently. The last 2 webhooks sent from GitHub over 24 hours ago
I can’t think of anything else on our end that could be triggering these 3 packages to update so frequently. Updating our mirror every 20 minutes of these 3 packages is taking a decent amount of resources, that I’d like to reduce.
Is there anything we can do better for this situation, or is something about these 3 packages somehow looping eternally in Packagist.org internals?
The text was updated successfully, but these errors were encountered: