Page MenuHomeSoftware Heritage

browse/utils: Fix edge case in prepare_content_for_display
ClosedPublic

Authored by anlambert on Aug 17 2021, 3:30 PM.

Details

Summary

Contents with mimetype starting with application/ but with
no detected programming language were not processed for
display but they can be regular text files.

Closes T3486

Test Plan

This was really an edge case, nevertheless I have updated tests
to cover it using the same file as in the task.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D6107 (id=22092)

Rebasing onto ddfb988db5...

Current branch diff-target is up to date.
Changes applied before test
commit 1ea3704d673e7945ad12d70090872db06db08791
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Aug 17 15:24:44 2021 +0200

    browse/utils: Fix edge case in prepare_content_for_display
    
    Contents with mimetype starting with application/ but with
    no detected programming language were not processed for
    display but they can be regular text files.
    
    Closes T3486

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1002/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1002/console

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 17 2021, 3:49 PM
Harbormaster failed remote builds in B23049: Diff 22092!

Build is green

Patch application report for D6107 (id=22094)

Rebasing onto ddfb988db5...

Current branch diff-target is up to date.
Changes applied before test
commit c9d89d93b7dfb8812f02f7d2bbafa27aed152035
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Aug 17 15:24:44 2021 +0200

    browse/utils: Fix edge case in prepare_content_for_display
    
    Contents with mimetype starting with application/ but with
    no detected programming language were not processed for
    display but they can be regular text files.
    
    Closes T3486

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1004/ for more details.

This revision is now accepted and ready to land.Aug 18 2021, 11:12 AM