User data exports do not expire after 48 hours

AI-generated summary

User Data Export Expiration Issue

A discussion on the expiration of user data exports revealed that the notification message stating the download link will be valid for 48 hours is incorrect. RGJ found that the file can still be downloaded after 48 hours. The retain_hours field in the Upload model is not used anywhere.

The issue is due to a regression introduced in this commit when user exports were changed to be backed by uploads record. tgxworld explained that the method to clean up user exports after 48 hours is not working because the exports are not in the custom csv_exports directory.

It was also noted that user data exports are served over the CDN if configured, which may not be a good idea. sam suggested that the API still works and should not be removed. The issue has been fixed by techAPJ via this commit.

When you create an export of your user data, the notification message says

The above download link will be valid for 48 hours.

However, that does not seem to be the case: the file can still be downloaded after 48 hours (verified here on Meta)

The retain_hours field in the Upload model does not seem to be actually used anywhere.

7 Likes

Hmm any changes needed here @tgxworld?

5 Likes

@techAPJ Can you have a look at this? The validity of user exports regressed in FIX: create upload record for exported csv files · discourse/discourse@91bf10b · GitHub when the user exports were changed to be backed by uploads record. I was going to make a change to clean up user exports after 48 hours but saw a spec in the commit that says not to clean up user exports. The following method and a scheduled job to clean up the user exports isn’t working anymore because the exports are not in the custom csv_exports directory which we should probably clean up as well.

This seems to be intentional and was added way back in 2014. I’m not sure if we still need to support it? @sam

https://github.com/discourse/discourse/commit/58eabb03e5d6283b25e9ddd4f070e32c65be43c3#diff-60328924b5c773b42aacabc0b5698af4

5 Likes

Another thing I realized is that (it looks like) user data exports are served over the CDN if that is configured.
That doesn’t seem like a good idea?

I don’t see any particular reason to remove this, the api is still tested and should work, no?

Yup the API still and can work but I just wasn’t sure if we required that feature anymore.

2 Likes

Fixed via:

https://github.com/discourse/discourse/commit/7b194743d7e10a425086d52c8e8ddd42ce1856f3

5 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.