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

fix: invalid warnings when running the Dekorate session #997

Closed
wants to merge 1 commit into from

Conversation

Sgitario
Copy link
Collaborator

@Sgitario Sgitario commented Jun 7, 2022

There are some system properties that are not directly mapped using generators like dekorate.build or dekorate.push. These properties will either enable some special handling, functionality and/or include some other properties.

The problem is that at the moment, the session is checking whether these properties are properly mapped and if not, it will trace a warning.

Therefore, as these properties are programmatically used and there are many more like dekorate.input.dir, dekorate.output.dir, dekorate.image-pull-secrets, dekorate.properties.profile, dekorate.verbose, dekorate.test.xxx, ... and maybe more coming in the future, I think the best way is to not trace this warning ever.

The alternative is to maintain a list with all the above values, however I don't really like this approach as this list will be likely became out-date when adding a new unmapped property.

Fix #995

There are some system properties that are not directly mapped using generators like `dekorate.build` or `dekorate.push`. These properties will either enable some special handling, functionality and/or include some other properties. 

The problem is that at the moment, the session is checking whether these properties are properly mapped and if not, it will trace a warning. 

Therefore, as these properties are programmatically used and there are many more like `dekorate.input.dir`, `dekorate.output.dir`, `dekorate.image-pull-secrets`, `dekorate.properties.profile`, `dekorate.verbose`, `dekorate.test.xxx`, ... and maybe more coming in the future, I think the best way is to not trace this warning ever. 

The alternative is to maintain a list with all the above values, however I don't really like this approach as this list will be likely became out-date when adding a new unmapped property.

Fix dekorateio#995
@Sgitario Sgitario requested a review from iocanel June 7, 2022 05:03
@sonarcloud
Copy link

sonarcloud bot commented Jun 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@iocanel
Copy link
Member

iocanel commented Jun 7, 2022

Not providing feedback to the user because it's not convinient does not seem right.

As described in #995: I would either handle those cases or even ensure that the properties are properlly backed by configuration objects.

BTW, why didn't we have this issue before: 62aab5b

@Sgitario
Copy link
Collaborator Author

Sgitario commented Jun 7, 2022

Not providing feedback to the user because it's not convinient does not seem right.

As described in #995: I would either handle those cases or even ensure that the properties are properlly backed by configuration objects.

BTW, why didn't we have this issue before: 62aab5b

Before, it was raising exceptions when a configuration was not using a generator, not by a warning trace.

I don't totally agree with you about this is something we should tell users.
As you said maybe the best way to handle these unmapped properties is to actually map them using configuration objects, however as there are many unmapped properties, this is going to become a huge task. So, I will close this pull request and unassign the issue as I don't have this time right now.

@iocanel
Copy link
Member

iocanel commented Jun 7, 2022

Before, it was raising exceptions when a configuration was not using a generator, not by a warning trace.

Indeed, still no error was thrown when -Ddekorate.build=true or -Dekorate.push=true was passed.
Anyway, I prefer getting this right even if it is a huge task.

@Sgitario Sgitario deleted the fix_warnings branch October 6, 2022 05:38
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.

Invalid warnings appear in the log
2 participants