plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

GSoC '22: "Legacy Code Deprecation" Project Planning

Open anirudhprabhakaran3 opened this issue 2 years ago • 12 comments

Hello everyone! 🎉

This is the planning issue for my project "Legacy Code Deprecation" which I am going to work on over the summer. Comments, suggestions and improvements to everything mentioned in this are welcome and will be very useful for me!

My project proposal can be found here.

Before Coding

  • [x] Ask for an anonymized version of the production database.
  • [x] Talk to Sebastian about regular backups before every migration script

DrupalNodeImage

Issue: https://github.com/publiclab/plots2/issues/76

  • [ ] Migration to migrate to native Image records and test on local system
  • [ ] Database Backup (or at least tables that are to be changed)
  • [ ] Test on unstable
  • [ ] Test on stable

Gallery Code

Issue: https://github.com/publiclab/plots2/issues/4074

Tilda's PR (https://github.com/publiclab/plots2/pull/9980) regarding that was also closed (not merged), can look into that and take some inspiration from it.

  • [x] Script to refactor legacy Gallery Code into Node Revision Body and test on local system
  • [x] Database Backup (or at least tables that are to be changed)
  • [x] Test on unstable
  • [x] Test on stable

Answers model

Issue: https://github.com/publiclab/plots2/issues/956

  • [x] Check for any references missed out and test on local system
  • [x] Database Backup (or at least tables that are to be changed)
  • [x] Test on unstable
  • [x] Test on stable

Map notes

Issues: https://github.com/publiclab/plots2/issues/4072, https://github.com/publiclab/plots2/issues/10830 (closed now)

  • [x] Script to convert map notes to normal notes
  • [x] Database Backup (or at least tables that are to be changed)
  • [x] Test on unstable
  • [x] Test on stable

DrupalFile and DrupalUpload

Issues: https://github.com/publiclab/plots2/issues/4076

  • [x] Migration to remove the two tables and test on local system
  • [x] Database Backup (or at least tables that are to be changed)
  • [ ] Test on unstable
  • [ ] Test on stable

anirudhprabhakaran3 avatar Jun 14 '22 08:06 anirudhprabhakaran3

All feedback is welcome! Thank you!

anirudhprabhakaran3 avatar Jun 14 '22 08:06 anirudhprabhakaran3

Hi @anirudhprabhakaran3 this is looking great. I like how you've broken things up into groups, and see that you're using the existing deprecation milestone :tada:

In some places there are notes on whether records have been converted already, and I'm not sure about DrupalImages -- have you seen anything? As we go through these, probably best to link to the last known notes/status of these migrations. In some cases I think we have already moved the records and now just need to remove the tables and/or code.

Were you thinking to go through these as they're written, top to bottom? Thanks!!!

jywarren avatar Jun 14 '22 08:06 jywarren

Yes, I'll add links to the previous issues, so that anyone viewing it can easily see the current status.

Regarding the DrupalImages, this was the last comment I found: https://github.com/publiclab/plots2/issues/76#issuecomment-481749324

I believe we have identified what has to be done but actually haven't done it yet. Is my understanding correct?

Yes, I was thinking of going through the list top-down. If there is a group to which you believe I should give priority, please let me know so that I'll work on that first! Thank you!

anirudhprabhakaran3 avatar Jun 14 '22 09:06 anirudhprabhakaran3

This looks great @anirudhprabhakaran3. I agree with @jywarren's comments on how you grouped your tasks into groups. Great work 🎉

TildaDares avatar Jun 14 '22 15:06 TildaDares

Regarding the DrupalImages, this was the last comment I found: #76 (comment)

I believe we have identified what has to be done but actually haven't done it yet. Is my understanding correct?

Yes that seems correct to me. I will leave another comment there, but given the challenge of downloading the images, i wonder if you wanted to start on an easier one? Your choice!

jywarren avatar Jun 21 '22 06:06 jywarren

Oh okay. I'll look into that. Thanks for the heads up!

Also left a comment on that issue. Is it fine if I put any issue specific conversations on the issue itself, and then put like a summary on this issue? I feel it'll be easier for tracking status.

anirudhprabhakaran3 avatar Jun 21 '22 15:06 anirudhprabhakaran3

@anirudhprabhakaran3, yeah, that is totally fine

cesswairimu avatar Jun 24 '22 11:06 cesswairimu

Hi @anirudhprabhakaran3 can you update us on where you are on your project right now? Midterm evaluations are coming up this week so I want to have a good understanding of where you're at, and let us know if you are stuck on anything! Thank you!

jywarren avatar Jul 19 '22 16:07 jywarren

Hello! Yes, it has been quite some time since I have updated this issue. My apologies!

I am currently looking into the DrupalNodeImage issue (#76). I'm going through all the different approaches mentioned on the thread to see which is the best, which is taking more time than I expected. That is the cause of the delay.

I was wondering if I should come up with the migration for the Answers model (#956 ), since most of the work in that is complete - the only part left is to remove the actual table and any references to it in the code. That should not take too much time, and I can create an MR for the same.

Do you think that is a good idea? Or should I stick to that, try to find a solution, and then jump to the more straightforward script?

Thank you!

anirudhprabhakaran3 avatar Jul 20 '22 02:07 anirudhprabhakaran3

Hi @anirudhprabhakaran3 sorry for slow response here but I'm glad to see you are working on the answers model too! It can be good to have 2 projects going in case you feel stuck on one, or just to give your brain a break (being able to switch between a bit). I'll look at your answers PR too!

jywarren avatar Jul 28 '22 16:07 jywarren

I am planning on finishing nearly all the tasks on the list! However, the DrupalNodeImage one might not be finished in time :(. I do plan on completing that task even after GSoC though. Thanks!

anirudhprabhakaran3 avatar Sep 05 '22 16:09 anirudhprabhakaran3

Hi @anirudhprabhakaran3 -- since your work in #11225 is done, I opened a PR for removing all map node files!

https://github.com/publiclab/plots2/pull/11414

I'm also going to set a reminder to convert /app/views/map/index.html.erb to redirect to /tag/map-archive, and to copy the text from publiclab.org/archive to the /wiki/map-archive page.

OK, made the page: https://publiclab.org/wiki/map-archive

jywarren avatar Sep 13 '22 19:09 jywarren