aw-was-here commented on PR #289:
URL: https://github.com/apache/yetus/pull/289#issuecomment-1261472623
> @aw-was-here thanks for the suggestion, but Yetus still doesn't exclude
the file.
>
> I tried the following -
> ## Excluding using `--excludes` option
>
> ```shell
> YETUS_ARGS+=("--excludes=dev-support/docker/Dockerfile_windows_10")
> ```
> -
[ci-hadoop.apache.org/blue/organizations/jenkins/hadoop-multibranch/detail/PR-4936/7/pipeline](https://ci-hadoop.apache.org/blue/organizations/jenkins/hadoop-multibranch/detail/PR-4936/7/pipeline/)
This run doesn't show an excludes.txt file in the build artifacts at all....
which isn't surprising since the --excludes takes a filename of regexes.
(Passing raw filenames on the command line has proven to be a long-term
mistake. Command lines get even more complex and/or super long. Thus why a lot
of the options that used to exist that took those forms have been slowly
getting removed or replaced. Also a reason why this PR as written wouldn't get
approval to get committed.)
> This doesn't exclude the file either. Here's the Hadoop Jenkins run -
[ci-hadoop.apache.org/blue/organizations/jenkins/hadoop-multibranch/detail/PR-4936/8/pipeline](https://ci-hadoop.apache.org/blue/organizations/jenkins/hadoop-multibranch/detail/PR-4936/8/pipeline)
This run does have an
[excluded.txt](https://ci-hadoop.apache.org/view/Hadoop/job/hadoop-multibranch/view/change-requests/job/PR-4936/8/artifact/out/excluded.txt)
file in the build artifacts but I'm not sure why hadolint still ran against
it. There was a bug that I believed was fixed when you added a file and an
exclusion for that same file at the same time... maybe it isn't actually fixed.
I'll need to dig into why Yetus didn't pull the file out of the change list.
If that is the case, then the exclude should get merged into main prior to the
PR as a workaround.
> > Looking at that run, it looks like the real problem is that the
Dockerfile isn't telling hadolint that it isn't an POSIX-type shell using the
hadolint shell pragma.
>
> The `hadolint shell=powershell` pragma isn't supported on [hadolint
v1.11.1](https://github.com/hadolint/hadolint/tree/v1.11.1?rgh-link-date=2022-09-28T16%3A39%3A46Z)
which is what the current Hadoop CI uses.
Oof. That is super old and has quite a few bugs in it.
> I faced a lot of issues in upgrading hadolint and had to abandon that
approach. Thus, I've resorted to excluding the file in the hadolint plugin
itself.
The problem I see is that I don't really see a reason to take on Hadoop's
technical debt. Hadoop is going to have to upgrade its other dependencies at
some point.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]