citus icon indicating copy to clipboard operation
citus copied to clipboard

Treat Makefile warnings as errors on CI

Open onurctirtir opened this issue 3 years ago • 7 comments

As @gurkanindibay suggested, we could early catch the issues that has been fixed in following PRs if we had treated warnings as errors on CI:

  • https://github.com/citusdata/citus/pull/6038
  • https://github.com/citusdata/citus/pull/6206

onurctirtir avatar Aug 19 '22 12:08 onurctirtir

(not sure if "development" is the correct label but ..)

onurctirtir avatar Aug 19 '22 12:08 onurctirtir

+1 for that, PG has a specific schedule which does only compile with warnings turned into errors.

I think they have specific schedule to enable the tests run even if there is a compile warning, which makes sense to me as well

onderkalaci avatar Aug 19 '22 13:08 onderkalaci

Thinking about this little more, then we would also interpret the following usual warning as an error too, which is not much desirable I think.

Makefile:61: warning: overriding recipe for target 'check'

Alternative solution could be to make use of the ignore-warning/raise-warning-as-error mechanism that we're currently using in packaging pipeline. What do you think @gurkanindibay, does that sound like something doable to you ?

onurctirtir avatar Aug 19 '22 14:08 onurctirtir

Yes it is absolutely doable. We have ignore mechanism as well. So that we can ignore the unimportant ones We have it in tools repo. I can integrate it if you want However, I need to customize the script to be able to fit it for citus For reference https://github.com/citusdata/tools/blob/develop/packaging_automation/packaging_warning_handler.py

gurkanindibay avatar Aug 19 '22 14:08 gurkanindibay

Thinking about this little more, then we would also interpret the following usual warning as an error too, which is not much desirable I think.

are Makefile warnings relevant? Even if so, it'd force us to fix? I have seen that warning for ages and never acted on. Maybe an error would have been much more different :D

I think it is desirable to have the compile warning checks on the main branch, not for packages.

onderkalaci avatar Aug 19 '22 15:08 onderkalaci

I have seen that warning for ages and never acted on. Maybe an error would have been much more different :D

True :) So then we first need to understand how we can fix this to move forward with the "interpret any warning as error" approach.

onurctirtir avatar Aug 19 '22 15:08 onurctirtir

To be clear, we already treat compilation warnings as errors in CI. But since we package for other (newer or older) OSes than we use in CI they sometimes give different warnings. The OpenSSL one is an example of that.

The Makefile warnings are different though. It would be good to error for those in CI too.

JelteF avatar Aug 22 '22 07:08 JelteF