sagemath / trac-to-github

Script to migrate Trac tickets to GitHub issues and the Trac wiki to markdown. Input: https://trac.sagemath.org/ ➠ Intermediate: https://github.com/sagemath/trac_to_gh ➠ Output: https://github.com/sagemath/sage/issues
https://trac.sagemath.org/ticket/30363
7 stars 5 forks source link

png attachment links broken #181

Open mkoeppe opened 1 year ago

mkoeppe commented 1 year ago

To be investigated whether the actual files are accessible.

In any case, this will have to be fixed post-migration.

kwankyu commented 1 year ago

Can I see the affected issues in the preview repo: https://github.com/sagemath/sage-migration-preview-2023-02-02?

mkoeppe commented 1 year ago

No, but I have just made the next iteration public, where you can see it for example in https://github.com/sagemath/sage-migration-preview-2023-02-04/issues/10146: the png attachment gives "not found", but the other attached file (technically a repository_file) works.

mkoeppe commented 1 year ago

(Note that sagemath/sage is at the moment a redirect to https://github.com/sagemath/sage-migration-preview-2023-02-04)

kwankyu commented 1 year ago

Did the importer drop all .png attachments?

mkoeppe commented 1 year ago

It did not report anything regarding the .png attachments.

It did report (as expected) that a number of large (> 25MB) attachments were "not found" (= dropped in the process).

kwankyu commented 1 year ago

There's no problem here:

https://github.com/sagemath/sage-migration-preview-2023-02-04/issues/25270 (this is now https://github.com/sagemath/sage/issues/25270)

mkoeppe commented 1 year ago

hm, interesting!

mkoeppe commented 1 year ago

OK, so the link in the description has been rewritten to a correct one. But the link in https://github.com/sagemath/sage-migration-preview-2023-02-04/issues/25270#comment:1 is also broken (not rewritten to the actual storage location). (this is now https://github.com/sagemath/sage/issues/25270#comment:1)

kwankyu commented 1 year ago

Here works too:

https://github.com/sagemath/sage-migration-preview-2023-02-04/issues/34113 (this is now https://github.com/sagemath/sage/issues/34113)

kwankyu commented 1 year ago

Perhaps the image attachment should have been linked as https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images in attachment comment ?

mkoeppe commented 1 year ago

Yes, that would likely have fixed it.

kwankyu commented 1 year ago

I think it's okay to reschedule the final import once again, if it is hard to fix after migration.

mkoeppe commented 1 year ago

No, I'd rather not delay it further. I think it's easy to fix afterwards using PyGithub (REST API). Easier than #110, which requires use of a more complicated API (GraphQL)

kwankyu commented 1 year ago

Okay.

BTW, if we use the markdown syntax, then the image will show up again in the attachment comment.

mkoeppe commented 1 year ago

Right, that's not really intended.

kwankyu commented 1 year ago

One way is to upload image files twice as ".png" and as ".png.gz".

I also feel that we may leave the bug unfixed. Image attachment not shown in the issue perhaps are not that important.

mkoeppe commented 1 year ago

I agree, it's a very minor issue.

kwankyu commented 1 year ago

BTW, "r: invalid", "r: duplicate" received wrong colors.

mkoeppe commented 1 year ago

Yes, 2023-02-04 is the one with the wrong label colors.

It's fixed in the import that will finish in a bit.

kwankyu commented 1 year ago

Ah. That's fortunate!

mkoeppe commented 1 year ago

In the production import, a few other files (in addition to the > 25MB files) were dropped. Easy to fix if we want. Here's the report.

BETA

Audit

Some models were not successfully imported.

Please check them below, and unlock your repositories if you're ready to use them.

Model Type | Source URL | State | Message -- | -- | -- | -- Repository File | https://github.com/sagemath/sage/files/ticket7197/trac_7197_part10.patch.gz | FAILED_IMPORT | Skipped import: repository file upload failed Repository File | https://github.com/sagemath/sage/files/ticket8244/trac_8244-slot_wrapper_argspec.patch.gz | FAILED_IMPORT | Skipped import: repository file upload failed Repository File | https://github.com/sagemath/sage/files/ticket21612/fixsage-incremental-docbuild.patch.gz | FAILED_IMPORT | Skipped import: repository file upload failed Repository File | https://github.com/sagemath/sage/files/ticket25026/jmol-14.29.10.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket25374/CMakeOutput.log | FAILED_IMPORT | Skipped import: repository file upload failed Repository File | https://github.com/sagemath/sage/files/ticket29521/giac-1.5.0.63-p0.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket29552/giac-1.5.0.87.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket29552/giac-1.5.0.87p0.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket30396/giac-1.5.0.87p1.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket30396/giac-1.5.0.87p2.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket30537/giac-1.6.0.47p2.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket31562/giac-1.6.0.47p3.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket31563/giac-1.7.0.25p0.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket31563/giac-1.7.0.47p0.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket31563/giac-1.9.0.5p0.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file Repository File | https://github.com/sagemath/sage/files/ticket31563/giac-1.9.0.15p0.tar.bz2.gz | FAILED_IMPORT | Skipped import: invalid or missing repository file
    kwankyu commented 1 year ago

    Labels are all perfect!

    kwankyu commented 1 year ago

    In the production import, a few other files (in addition to the > 25MB files) were dropped. Easy to fix if we want.

    Some of the affected issues are fairly recent. I think "we want".