Comments (5)
I've now gone through this myself.
I've followed the steps above on integration and could not reproduce the issue. Everything in whitehall's DB wound up as you would expect.
I do agree that the attachments listed above ended up in an odd non-deleted state while the edition itself is marked as deleted which appears impossible due to the code linked above which deletes all attachments when the edition is deleted
However, the code for this asset deletion was added 23 March 2016, while the edition in question was discarded 9 May 2014. The commit where the code was added calls this situation out specifically, though it leaves out the asset manager issue as it was presumably not a thing for whitehall at the time.
I'm guessing that when the assets were imported from whitehall to asset manager this discrepancy was copied over accidentally.
from asset-manager.
Note that I had a go at extending the relevant integration test to include this scenario in this branch, although I'm not sure it's quite right.
from asset-manager.
I think there might be an issue with AttachmentData#deleted?
, because it looks as if it only takes into account whether the edition has been deleted; I think it should also take into account whether the Attachment
is marked as deleted, i.e. when a single attachment is deleted and the edition is not deleted.
from asset-manager.
I think there might be an issue with
AttachmentData#deleted?
, because it looks as if it only takes into account whether the edition has been deleted; I think it should also take into account whether theAttachment
is marked as deleted, i.e. when a single attachment is deleted and the edition is not deleted.
I don't think the above statement about AttachmentData#deleted?
is true after all. I think I must've been confused by the mention of "attachable" in the include_deleted_attachables
option passed to AttachmentData#significant_attachment
.
In fact, as the name clearly suggests, the latter returns an instance of an Attachment
and thus AttachmentData#deleted?
does take account of whether the attachment has been marked as deleted.
I thought this was worth clarifying, but note that this doesn't resolve the original problem as described in the issue description.
from asset-manager.
Closing this as the investigation is complete and we have a card to complete the follow up work.
from asset-manager.
Related Issues (20)
- Rationalise Mainstream asset filename redirect & Whitehall asset replacement redirect
- Marking Whitehall attachments as deleted should delete corresponding Asset Manager assets when appropriate HOT 7
- Improve the access-limiting implementation
- Update parent_document_url of Whitehall attachments in Asset Manager HOT 2
- Fix setting of draft status for Whitehall attachment assets in Asset Manager HOT 2
- Update redirect_url for replaced assets HOT 2
- Update redirect_url for unpublished/withdrawn assets HOT 2
- Standardise Whitehall and Mainstream Cache-Control headers HOT 7
- NoMethodError in AssetManagerCreateWhitehallAssetWorker HOT 12
- Investigate whether deleted editions break the logic in AttachmentData#significant_attachment HOT 2
- Update metadata of Whitehall attachments in Asset Manager HOT 19
- Investigate possible bug in AttachmentData#last_attachment HOT 2
- Remove attachments from NFS
- Stop CsvPreviewController depending on attachment file existing on the filesystem HOT 2
- It should be possible to update an asset if its replacement has been deleted HOT 1
- Consider adding tests to publishing-e2e-tests repo
- Dependabot can't resolve your Ruby dependency files HOT 1
- Audit Whitehall attachment metadata in Asset Manager HOT 4
- Ensure all AssetManager-related Sidekiq jobs in Whitehall are idempotent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asset-manager.