Update dependency cognite-extractor-utils to v7 #59
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 contains the following updates:
^4.0.0
->^7.0.0
Release Notes
cognitedata/python-extractor-utils (cognite-extractor-utils)
v7.5.0
Added
v7.4.9
Added
CastableInt
class the represents an interger to be used in config schema definitions. The difference from usingint
is that the field of this type in the yaml file can be either a string or a number, while a field of typeint
must be a number in yaml.PortNumber
class that represents a valid port number to be used in config schema definitions. Just likeCastableInt
it can be a string or a number in the yaml file. This allows for example setting a port number using an environment variable.v7.4.8
Fixed
v7.4.7
Added
v7.4.6
Fixed
v7.4.5
Removed
v7.4.4
Changed
v7.4.3
Fixed:
v7.4.2
Added
v7.4.1
Changed
v7.4.0
Added
v7.3.0
Changed
May improve performance on windows.
v7.2.3
Added
to provide better error messages when configuration is obviously wrong.
v7.2.2
Fixed
producing an
OAuth 2 MUST utilize https
error when getting the token.v7.2.1
Changed
Fixed
v7.2.0
Fixed
retry
decorator where functions would not becalled at all if the cancellation token was set. This resulted in errors
with for example upload queues.
Added
used to detect changed RAW rows or data model instances.
v7.1.6
Changed
v7.1.5
Fixed
Added
v7.1.4
Fixed
v7.1.3
Fixed
v7.1.2
Fixed
cognite_exceptions()
did not properly retry file uploadsv7.1.1
Fixed
7.0.5
: more use cases covered (to avoid repeatedly fetching a new token).idp-authentication
is now injected (some fields were missing).v7.1.0
Added
v7.0.5
Fixed
ConfigReloader
now caches theCogniteClient
to avoid repeatedly fetching a new token.v7.0.4
Fixed
max_workers
in theClientConfig
object.v7.0.3
Fixed
v7.0.2
Added
v7.0.1
Fixed
CancellationToken.wait(timeout)
only waits for at mosttimeout
, even if it is notified in that time.v7.0.0
Changed
The file upload queues have changed behaviour.
uploading immedeately.
upload()
method now acts more like ajoin
, wating on all theuploads in the queue to complete before returning.
add_to_upload_queue
when the queue is full will hang untilthe queue is no longer full before returning, instead of triggering and
upload and hanging until everything is uploaded.
latencey is removed. As long as you use the queue in as a context (ie,
using
with FileUploadQueue(...) as queue:
) you should not have tochange anything in your code. The behaviour of the queue will change, it
will most likely be much faster, but it will not require any changes from
you as a user of the queue.
threading.Event
has been replaced globally withCancellationToken
. Theinterfaces are mostly compatible, though
CancellationToken
does not have aclear
method. The compatibility layer is deprecated.is_set
with the propertyis_cancelled
.set
with the methodcancel
.threading.Event
now takeCancellationToken
.You can use
create_child_token
to create a token that can be canceledwithout affecting its parent token, this is useful for creating stoppable
sub-modules that are stopped if a parent module is stopped. Notably,
calling
stop
on an upload queue no longer stops the parent extractor,this was never intended behavior.
Removed
middleware
module has been removed.set_event_on_interrupt
has been replaced withCancellationToken.cancel_on_interrupt
.Added
Path
as a type in your config files.CancellationToken
as a better abstraction for cancellation thanthreading.Event
.Migration guide
To migrate from version
6.*
to7
, you need to update how you interract withcancellation tokens. The type has now changed from
Event
toCancellationToken
, so make sure to update all of your type hints etc. There isa compatability layer for the
CancellationToken
class, so that it has the samemethods as an
Event
(except forclear()
) which means it should act as adrop-in replacement for now. This compatability layer is deprected, and will be
removed in version
8
.If you are using file upload queues, read the entry in the Changed section.
You will most likely not need to change your code, but how the queue behaves has
changed for this version.
v6.4.1
Changed
creating a new one each time
upload()
is called.v6.4.0
Added
Option to specify retry exceptions as a dictionary instead of a tuple. Values
should be a callable determining whether a specific exception object should
be retied or not. Example:
Templates for common retry scenarios. For example, if you're using the
requests
library, you can doChanged
retry
has changed to be less agressive. Retries willapply backoff by default, and give up after 10 retries.
v6.3.2
Added
v6.3.1
Fixed
and wrapped network connection errors.
v6.3.0
Added
v6.2.2
Added
security-categories
attribute to thecognite
configsection.
v6.2.1
Fixed
post_upload_function
for upload queues.v6.2.0
Added
IOFileUploadQueue
as a base class of bothFileUploadQueue
andBytesUploadQueue
.This is an upload queue for functions that produce
BinaryIO
to CDF Files.v6.1.1
Fixed
TimeIntervalConfig
objects.v6.1.0
Added
v6.0.2
Fixed
v6.0.1
Fixed
v6.0.0
Changed
cognite-sdk
tov7
v5.5.1
Added
v5.5.0
Added
load_yaml_dict
toconfigtools.loaders
.Fixed
type
when!env
was used in the config file.v5.4.3
Added
v5.4.2
Fixed
v5.4.1
Changed
v5.4.0
Fixed
retry
decorator. The list of exception typesmust be given as a tuple, not an arbitrary iterable.
for, not the number of rows. That is now changed to number of rows.
because of a bug in the logging.
Removed
v5.3.0
Added
v5.2.1
Changed
the timeseries API.
v5.2.0
Changed
to the event already existing, it will be updated instead.
v5.1.0
Added
connection
parametersv5.0.1
Changed
the limit, not when it exceeded the limit.
v5.0.0
Removed
Legacy authentication through API keys has been removed throughtout the code
base.
A few deprecated modules (
authentication
,prometheus_logging
) have beendeleted.
Changed
uploader
andconfigtools
have been changed from one module to a packageof multiple modules. The content has been re-exported to preserve
compatability, so you can still do
But now, you can also import from the submodules directly:
This has first and foremost been done to improve the codebase and make it
easier to continue to develop.
Updated the version of the Cognite SDK to version 6. Refer to the
changelog
and migration
guide
for the SDK for details on the changes it entails for users.
Several small single-function modules have been removed and the content have
been moved to the catch-all
util
module. This includes:The
add_extraction_pipeline
decorator from theextraction_pipelines
module
The
throttled_loop
generator from thethrottle
moduleThe
retry
decorator from theretry
moduleAdded
audience
parameter inidp-authentication
Migration guide
The deletion of API keys and the legacy OAuth2 implementation should not affect
your extractors or your usage of the utils unless you were depending on the old
OAuth implementation directly and not through
configtools
or the base classes.To update to version 5 of extractor-utils, you need to
Change where you import a few things.
Change from
to
Change from
to
Change from
to
Consult the migration
guide
for the Cognite SDK version 6 for details on the changes it entails for
users.
The changes in this version are only breaking for your usage of the utils. Any
extractor you have written will not be affected by the changes, meaning you do
not need to bump the major version for your extractors.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.