[ https://issues.apache.org/jira/browse/HIVE-21604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16925542#comment-16925542 ]
Laszlo Bodor edited comment on HIVE-21604 at 9/9/19 10:02 AM: -------------------------------------------------------------- tested with attached files.txt original script: grep -o '"/jira/secure/attachment/[0-9]*/[^"]*' files.txt | grep -v -e 'htm[l]*$' | sort | grep -o '/jira/secure/attachment/[0-9]*/[^"]*' {code} /jira/secure/attachment/12964860/files.txt /jira/secure/attachment/12964869/01_mvn_out.png /jira/secure/attachment/12964870/02_hive_log.png /jira/secure/attachment/12965605/Screen%20Shot%202019-04-11%20at%204.54.41%20PM.png /jira/secure/attachment/12965681/HIVE-14469.01.patch /jira/secure/attachment/12965721/HIVE-14469.02.patch /jira/secure/attachment/12967773/HIVE-14469.03.patch {code} modified script: grep -o '"/jira/secure/attachment/[0-9]*/[^"]*\.patch*' files.txt | sort | grep -o '/jira/secure/attachment/[0-9]*/[^"]*\.patch*' {code} /jira/secure/attachment/12965681/HIVE-14469.01.patch /jira/secure/attachment/12965721/HIVE-14469.02.patch /jira/secure/attachment/12967773/HIVE-14469.03.patch {code} I think the original "grep -v" wasn't satisfying (only filtered html files) with the current solution, it doesn't seem too strict to force devs to upload only .patch files for patches [~vihangk1]: could you please review the patch? was (Author: abstractdog): tested with attached files.txt original script: grep -o '"/jira/secure/attachment/[0-9]*/[^"]*' files.txt | grep -v -e 'htm[l]*$' | sort | grep -o '/jira/secure/attachment/[0-9]*/[^"]*' {code} /jira/secure/attachment/12964860/files.txt /jira/secure/attachment/12964869/01_mvn_out.png /jira/secure/attachment/12964870/02_hive_log.png /jira/secure/attachment/12965605/Screen%20Shot%202019-04-11%20at%204.54.41%20PM.png /jira/secure/attachment/12965681/HIVE-14469.01.patch /jira/secure/attachment/12965721/HIVE-14469.02.patch /jira/secure/attachment/12967773/HIVE-14469.03.patch {code} modified script: grep -o '"/jira/secure/attachment/[0-9]*/[^"]*\.patch*' files.txt | sort | grep -o '/jira/secure/attachment/[0-9]*/[^"]*\.patch*' {code} /jira/secure/attachment/12965681/HIVE-14469.01.patch /jira/secure/attachment/12965721/HIVE-14469.02.patch /jira/secure/attachment/12967773/HIVE-14469.03.patch {code} I think the original "grep -v" wasn't satisfying (only filtered html files), as it doesn't seem too strict to force devs to upload .patch files [~vihangk1]: could you please review the patch? > preCommit job should not be triggered on non-patch attachments > -------------------------------------------------------------- > > Key: HIVE-21604 > URL: https://issues.apache.org/jira/browse/HIVE-21604 > Project: Hive > Issue Type: Bug > Components: Testing Infrastructure > Reporter: Laszlo Bodor > Priority: Major > Attachments: HIVE-21604.01.patch, files.txt > > > latest example: HIVE-21604 > https://issues.apache.org/jira/browse/HIVE-14669?focusedCommentId=16815520&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16815520 > I think one should be able to upload any kind of attachments (e.g. > screenshot) without triggering the precommit job > 2 possible ways: > 1. strict: enable only .patch (should work) > (2. lenient: introduce blacklist, .png ...) -- This message was sent by Atlassian Jira (v8.3.2#803003)