Skip to content

Conversation

tlm365
Copy link
Contributor

@tlm365 tlm365 commented Jun 28, 2024

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.

Description of changes
Resolves #91.

Whenever build/sbt test command is run, the warnings below are printed to the console:
[warn] there are 3 keys that are not used by any other settings/tasks:
[warn]
[warn] * cli / Compile / logLevel
[warn] +- /home/runner/work/unitycatalog/unitycatalog/build.sbt:206

This issue comes from the key linting added in sbt 1.4.0, which warns keys are used by some tasks but not by others. In our case, Compile / logLevel is used in cli, client, server but not in apiDocs.

@tdas
Copy link
Contributor

tdas commented Jun 28, 2024

Thank you @tlm365 !
@vikrantpuppala can you double check whether this fixes the issue you reported in #91 ?

@tdas tdas requested a review from ravivj-db June 28, 2024 05:23
Copy link
Collaborator

@vikrantpuppala vikrantpuppala left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up @tlm365!

build.sbt Outdated
@@ -46,6 +46,8 @@ lazy val commonSettings = Seq(
}
)

Global / excludeLintKeys ++= Set(Compile / logLevel)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe removing the keys is better rather than excluding them from lint. I don't think there should be any change in behaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vikrantpuppala yeah, that's one of the solutions, but I chose to handle it during linting because I wasn't sure about the intended use of that key. If it's fine to remove, I will update the commit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I played around with this today and noticed no issues with the server and cli output post removal of these settings. I think it's better to have these removed rather than ignoring in lint.

@tdas
Copy link
Contributor

tdas commented Jun 30, 2024

@vikrantpuppala @tlm365 is this PR ready?

@tlm365
Copy link
Contributor Author

tlm365 commented Jul 1, 2024

@vikrantpuppala @tlm365 is this PR ready?

I think it's fine. But @vikrantpuppala is concerned that removing lint the key Compile / logLevel might be an unexpected behavior. What do you think about it @tdas?

Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
@vikrantpuppala
Copy link
Collaborator

Thank you for this contribution @tlm365, can we merge this please @tdas?

@tdas tdas merged commit 8036776 into unitycatalog:main Jul 3, 2024
@tlm365 tlm365 deleted the lint-unused branch August 21, 2024 07:27
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.

Fix warnings on log level variables on running sbt test command
3 participants