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

Invalid warnings appear in the log #995

Open
iocanel opened this issue Jun 4, 2022 · 3 comments
Open

Invalid warnings appear in the log #995

iocanel opened this issue Jun 4, 2022 · 3 comments
Assignees

Comments

@iocanel
Copy link
Member

iocanel commented Jun 4, 2022

Running mvn clean package -Ddekorate.build=true produces:

[WARN] Unknown generator 'build' will be ignored. Known generators are: [jvm, servicemonitor, vcs, options, knative, docker].

In the same manner: mvn clean package -Ddekorate.push=true produces:

[WARN] Unknown generator 'docker' will be ignored. Known generators are: [jvm, servicemonitor, vcs, options, knative, docker].

build, push and deploy should never produce warnings. We either need to add a check for them or properlly represent them using generators.

@iocanel
Copy link
Member Author

iocanel commented Jun 4, 2022

@Sgitario can you please have a look?

@Sgitario
Copy link
Collaborator

Sgitario commented Jun 7, 2022

I guess the second code snippet is wrong, the right one should be:

[WARN] Unknown generator 'push' will be ignored. Known generators are: [jvm, kubernetes, servicemonitor, vcs, options, docker]

Moreover, this affects all the properties that are not mapped using generators 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 will change the logic of this method to not print traces at all.

Sgitario added a commit to Sgitario/dekorate that referenced this issue 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 dekorateio#995
@Sgitario Sgitario removed their assignment Jun 7, 2022
@Sgitario
Copy link
Collaborator

Sgitario commented Jun 7, 2022

Unassign this issue. See comment in #997 (comment).
If I have the time in the future, I will think to take this one back to me. However, keep it unassigned just in case somebody else has the capacity to fix it.

@iocanel iocanel self-assigned this Jun 7, 2022
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 a pull request may close this issue.

2 participants