Skip to content
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

x/pkgsite: delete from module from version_map in postgres.DeleteModule #39633

Closed
julieqiu opened this issue Jun 17, 2020 · 5 comments
Closed

x/pkgsite: delete from module from version_map in postgres.DeleteModule #39633

julieqiu opened this issue Jun 17, 2020 · 5 comments

Comments

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Jun 17, 2020

See:
https://github.com/golang/pkgsite/blob/df627db60a835a59120b45fe7af59779840aa522/internal/postgres/insert_module_test.go#L312

Related: #39621

@bharaththiruveedula
Copy link

@bharaththiruveedula bharaththiruveedula commented Jun 17, 2020

@julieqiu can I work on this?

I am new to this repo. I am planning to the same approach as in https://github.com/golang/pkgsite/blob/df627db60a835a59120b45fe7af59779840aa522/internal/postgres/insert_module_test.go#L307 but with "version_map" table. Is my approach correct?

@julieqiu
Copy link
Contributor Author

@julieqiu julieqiu commented Jun 17, 2020

For sure! Thanks @bharaththiruveedula - here's the relevant info for this:

At the moment, when we call postgres.DeleteModule we will delete from the following tables:

  • modules, which results in cascaded deletes to several other tables
  • imports_unique

We also want to delete from the version_map table.

The task here would be to add that to postgres.DeleteModule, and also add a test.

@julieqiu julieqiu changed the title x/pkgsite: check remove from version_map in postgres.TestDeleteModule x/pkgsite: delete from module from version_map in postgres.DeleteModule Jun 17, 2020
@bharaththiruveedula
Copy link

@bharaththiruveedula bharaththiruveedula commented Jun 17, 2020

Thanks for giving the context. I will work on this @julieqiu

@bharaththiruveedula
Copy link

@bharaththiruveedula bharaththiruveedula commented Jun 18, 2020

@julieqiu pushed the changes to https://go-review.googlesource.com/c/pkgsite/+/238637. Can you please review?

@julieqiu
Copy link
Contributor Author

@julieqiu julieqiu commented Jul 6, 2020

@julieqiu julieqiu closed this Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants