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

sast: Add sast-unicode-check task for testing #1401

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

hanchuntao
Copy link
Contributor

Before you complete this pull request ...

Look for any open pull requests in the repository with the title "e2e-tests update" and
see if there are recent e2e-tests updates that will be applicable to your change.

@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch from 643b08e to 279ec11 Compare September 12, 2024 01:31
Copy link
Contributor

@tkdchen tkdchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing task/task-name/OWNERS as well.

.tekton/pull-request.yaml Outdated Show resolved Hide resolved
@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch from 279ec11 to 55761cf Compare September 12, 2024 03:17
@hanchuntao
Copy link
Contributor Author

@tkdchen I want to test this task, do you know how to run the CI? thanks!

@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch from 55761cf to 346ea59 Compare September 12, 2024 03:28
@hanchuntao
Copy link
Contributor Author

Missing task/task-name/OWNERS as well.

updated, added OWNERS, thanks

@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch 2 times, most recently from aac253f to 859526e Compare September 12, 2024 06:19
@kdudka
Copy link
Contributor

kdudka commented Sep 12, 2024

@hanchuntao Please also include a reference to https://issues.redhat.com/browse/OSH-739 in the commit message.

@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch 7 times, most recently from 082c7d0 to 8e0d599 Compare September 13, 2024 02:05
Copy link
Contributor

@kdudka kdudka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hanchuntao Please rename the task to sast-unicode-check as stated in the summary of OSH-739.

@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch 2 times, most recently from ec339ad to c00c8c7 Compare September 19, 2024 03:34
@hanchuntao
Copy link
Contributor Author

@hanchuntao Please rename the task to sast-unicode-check as stated in the summary of OSH-739.

updated

@hanchuntao
Copy link
Contributor Author

@hanchuntao Please also include a reference to https://issues.redhat.com/browse/OSH-739 in the commit message.

updated

@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch from c00c8c7 to a835bd3 Compare September 19, 2024 05:29
@hanchuntao hanchuntao changed the title Add sast-find-unicode-control task for testing Add sast-unicode-check task for testing Sep 19, 2024
@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch 2 times, most recently from db3e59e to aa7eecb Compare September 19, 2024 06:57
Copy link
Contributor

@kdudka kdudka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hanchuntao Please close the review threads that have been resolved. I do not have permissions to do so.

.tekton/pull-request.yaml Outdated Show resolved Hide resolved
task/sast-unicode-check/0.1/README.md Outdated Show resolved Hide resolved
task/sast-unicode-check/0.1/README.md Outdated Show resolved Hide resolved
task/sast-unicode-check/0.1/sast-unicode-check.yaml Outdated Show resolved Hide resolved
task/sast-unicode-check/0.1/sast-unicode-check.yaml Outdated Show resolved Hide resolved
@hanchuntao hanchuntao force-pushed the sast-find-unicode-control branch 2 times, most recently from 2ec25aa to dd83120 Compare September 20, 2024 03:31
@hanchuntao
Copy link
Contributor Author

@dheerajodha Because all of the checks passed, what should we do next? Can somebody with write access merge the code?

@tkdchen tkdchen added this pull request to the merge queue Oct 11, 2024
Merged via the queue into konflux-ci:main with commit e10b7f2 Oct 11, 2024
14 checks passed
kdudka added a commit to kdudka/build-definitions that referenced this pull request Oct 21, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
kdudka added a commit to kdudka/build-definitions that referenced this pull request Oct 23, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
kdudka added a commit to kdudka/build-definitions that referenced this pull request Oct 24, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: konflux-ci#1401
Related: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Oct 24, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
@kdudka
Copy link
Contributor

kdudka commented Oct 24, 2024

@hanchuntao Are you sure you tested the changes before they were merged?

I do not think this could work. See 82046fa for details.

kdudka added a commit to kdudka/build-definitions that referenced this pull request Oct 24, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: konflux-ci#1401
Related: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Oct 24, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
@hanchuntao
Copy link
Contributor Author

hanchuntao commented Oct 25, 2024

@hanchuntao Are you sure you tested the changes before they were merged?

I do not think this could work. See 82046fa for details.

I tested all of the changes. I don't know what happened, let me check it first, thanks

After rerunning this task in my local environment, yes the issue exists.
I ignored this issue, and it also exists in my previous tests: https://konflux.apps.stone-prod-p02.hjvn.p1.openshiftapps.com/application-pipeline/workspaces/chhan/applications/unicode-control-test/pipelineruns/find-unicode-control-on-pull-request-4dfvj
./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /workspace/workspace/source

I have filed a new PR to fix this issue: #1535
The latest test result: https://konflux.apps.stone-prod-p02.hjvn.p1.openshiftapps.com/application-pipeline/workspaces/chhan/applications/unicode-control-test/pipelineruns/find-unicode-control-on-pull-request-f82tj

kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 6, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: konflux-ci#1401
Related: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 6, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 6, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 11, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: konflux-ci#1401
Related: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 11, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 13, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: konflux-ci#1401
Related: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 13, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 18, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: konflux-ci#1401
Related: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 18, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 20, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: konflux-ci#1401
Related: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 20, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 20, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 25, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: konflux-ci#1401
Related: konflux-ci#1524
kdudka added a commit to kdudka/build-definitions that referenced this pull request Nov 25, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: konflux-ci#1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: konflux-ci#1524
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2024
Before this change, the `sast-unicode-check` was failing with the
default parameters because the script was passing the whole list
of arguments as a single argument:
```
+ mapfile -t fuc_args
+ LANG=en_US.utf8
+ ./find-unicode-control/find_unicode_control.py '-p bidi -v -d -t' /var/workdir/source
+ FUC_EXIT_CODE=2
+ [[ 2 -ne 0 ]]
+ [[ 2 -ne 1 ]]
+ echo 'Failed to run find-unicode-control command'
Failed to run find-unicode-control command
+ cat raw_sast_unicode_check_out.log
usage: find_unicode_control.py [-h] [-p {all,bidi}] [-v] [-d] [-t] [-c CONFIG]
                               path [path ...]
find_unicode_control.py: error: argument -p/--nonprint: invalid choice: ' bidi -v -d -t' (choose from 'all', 'bidi')
+ note='Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
++ make_result_json -r ERROR -t 'Task sast-unicode-check-oci-ta failed: For details, check Tekton task log.'
```

Fixes: #1401
Related: #1524
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2024
Create the `-oci-ta` variant of the `sast-unicode-check` task.

Related: #1401
Resolves: https://issues.redhat.com/browse/OSH-764
Closes: #1524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants