-
Notifications
You must be signed in to change notification settings - Fork 35
remove dependency on {futile.logger} #260
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
base: main
Are you sure you want to change the base?
Conversation
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| rev: v6.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just ran pre-commit autoupdate to pull in new updates... might as well since while we're touching the repo 🤷🏻
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another tiny change I wanted to slip in here since we're touching the repo for the first time in months.
This is a small security patch that avoids storing the temporary git creds created by actions/checkout, which makes it harder for injected code to do bad things.
| #' all possible hits will be pulled. | ||
| #' @param size Number of records per page of results. | ||
| #' See \href{https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-from-size}{Elasticsearch docs} for more. | ||
| #' See \href{https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scroll}{Elasticsearch docs} for more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
R CMD check was raising this NOTE:
Found the following (possibly) invalid URLs:
URL: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-from-size (moved to https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-request-body.html#request-body-search-from-size)
From: man/es_search.Rd
Status: 200
Message: OK
URL: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll (moved to https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-request-body.html#request-body-search-scroll)
From: man/es_search.Rd
Status: 200
Message: OK
austin3dickey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| expect_null(chompDT) | ||
| }) | ||
|
|
||
| ##### TEST TEAR DOWN ##### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, nice to remove these

Fixes #259
Drops the dependency on
{futile.logger}, to avoid{uptasticsearch}being archived on CRAN.Notes for Reviewers
Design choices
I'm proposing here using the standard library and exposing a boolean
verboseargument in the public API.It's nice to be able to do stuff like this when you have multiple libraries all using
{futile.logger}:Without needing any other code changes, but honestly I think giving that up is worth it in exchange for cutting out another dependency and reducing the risk of
{uptasticsearch}being archived on CRAN if something like this happens again.rejected ideas (click me)
{futile.logger}(it's LGPL-3 though so... I don't love that option){logger}(see CRAN warning: {futile.logger} set to be archived pkgnet#336 (comment))options()that allows users to set the log level without needing to pass an argument to every{uptasticsearch}call{futile.logger}to aSuggestsdependency and falling back to this standard-lib-only implementation only if it's unavailable (tbh, not sure if CRAN would let us stay with even aSuggestsdependency on an archived package though)How I tested this
Ran the integration tests, which hit Elasticsearch running locally in a container.
how I did that (click me)
Also ran the following small script, to see the effect of the logging.
The logs look exactly the same on
main.Also killed the local container and tried again, to show the FATAL-level logging