Pantsbuild: Add BUILD dependencies for logging.conf#6251
Merged
cognifloyd merged 4 commits intomasterfrom Sep 25, 2024
Merged
Conversation
nzlosh
approved these changes
Sep 25, 2024
guzzijones
approved these changes
Sep 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has commits cherry-picked from #6202
I'm working towards getting pants to run our tests via pytest. While running unit tests, I found that the logging.conf files depend on python code, but pants cannot infer dependencies in conf files.
For example, this logging.conf snippet uses 3 classes from
st2common.logging.formatters:st2/st2stream/conf/logging.conf
Lines 32 to 44 in b534bf2
And this snippet uses
st2common.log.ConfigurableSyslogHandler:st2/st2stream/conf/syslog.conf
Lines 14 to 18 in b534bf2
Recording these dependencies for every conf file would be very repetitive, though, so I added 3 pants macros to simplify defining the dependencies in BUILD metadata:
st2_logging_conf_filest2_logging_conf_filesst2_logging_conf_resources