-
Notifications
You must be signed in to change notification settings - Fork 9
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
Serve Whitehall's feature images from Asset Manager #403
Comments
I ran the following commands in integration. We need to run the same commands in production to give us confidence that the Whitehall NFS mount and Asset Manager database are in sync before we switch the config:
Note that these figures aren't necessarily realistic - it's the commands we're interested in. |
@gpeng has run the commands above in production.
NOTE. The number of files on the filesystem doesn't match the corresponding number of assets in the database. The difference of 42 matches the number of files that weren't migrated due to the problem described in "GdsApi::InvalidUrl exception when migrating assets #384". I'm hopeful that those failed jobs are still on the queue and that they'll be migrated soon. If that's not the case then we'll have to manually migrate them somehow. |
I've requested the example asset in the description from integration and used Kibana to confirm that it was served by Whitehall.
|
@andrewgarner has run the following commands in production. Unfortunately they still reveal a discrepancy between the number of files on disk and those in the database. I'm going to investigate further to see whether the original failing jobs are going to retry.
|
I had hoped that the 42 assets missing from the Asset Manager database would've been uploaded since deploying the fix in #384. Unfortunately, I can see that they're still in the Sidekiq retry queue. I believe this is because we've deployed Whitehall since they were added to the queue and so they'll now be suffering from the problem described in #414. I think this means that we need to run the following commands in production to migrate these remaining featured image assets:
@chrislo - Does my plan to re-run My investigationBy looking at the events in the GdsApi::InvalidUrl exception in Sentry I can see the following retries:
According to Sidekiq's error handling this means that I would've expected retry 21 to occur at around 4pm on Jan 15 (i.e. about 1 day 20 hours after retry 20). The Whitehall fix for the InvalidUrl problem was deployed in the morning of 15 Jan so I expected retry 21 to succeed. Although I can't see a
These failing jobs should eventually move to the dead queue on around 29 Jan (in about 12 days). |
That sounds like a good plan @chrisroos.
|
I've asked 2ndline to run the Rake tasks to migrate the remaining feature images to Asset Manager. |
@andrewgarner has just run the following Rake tasks in production:
I suspect these jobs might need to wait until the uploads in #404 have finished. |
I've asked 2ndline to compare the number of these assets on the filesystem to the number that have been created in the Asset Manager database. |
@h-lame ran the following commands in production to compare the assets on the filesystem to those in the Asset Manager database:
The number of assets in the database matches the number on the filesystem so we're all good to open a PR to update the nginx config to serve these assets from asset-manager. |
See alphagov/asset-manager#403 for more information. We've been uploading all new feature images to asset-manager since alphagov/whitehall#3602 was merged and deployed. We uploaded all historical feature images on 5 Jan 2018[1]. [1]: alphagov/asset-manager#215 (comment)
I've opened alphagov/govuk-puppet#7128 to update the nginx config to start serving these assets from Asset Manager. |
See alphagov/asset-manager#403 for more information. We've been uploading all new feature images to asset-manager since alphagov/whitehall#3602 was merged and deployed. We uploaded all historical feature images on 5 Jan 2018[1]. [1]: alphagov/asset-manager#215 (comment)
I've tested the effect of this PR in integration and used Kibana to confirm that these assets are now being served by Asset Manager. Note. We don't currently have a realistic set of assets or asset-manager data in integration so I've had to create a Whitehall asset to mirror the example asset in the description.
|
For reference, I requested the example asset in the description to confirm that it's being served by Whitehall in production:
|
These assets are now being served by asset manager in production. I made the following request:
And checked Kibana for the random string |
This has been extracted from #215 to make it easier to manage the remaining work. See that issue for lots more information.
Example asset: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/1/Afghanistan-dfid.jpg
Tasks
asset_manager:migrate_assets[system/uploads/feature/image]
on productionThe text was updated successfully, but these errors were encountered: