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

Update dependency cognite-extractor-utils to v6 - autoclosed #54

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 21, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cognite-extractor-utils ^4.0.0 -> ^6.0.0 age adoption passing confidence

Release Notes

cognitedata/python-extractor-utils (cognite-extractor-utils)

v6.4.1

Changed
  • File upload queues now reuse a single thread pool across runs instead of 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:

    @​retry(
        exceptions = {ValueError: lambda x: "Invalid" not in str(x)}
    )
    def func() -> None:
        value = some_function()
    
        if value is None:
            raise ValueError("Could not retrieve value")
    
        if not_valid(value):
            raise ValueError(f"Invalid value: {value}")
  • Templates for common retry scenarios. For example, if you're using the requests library, you can do

    retry(exceptions = request_exceptions())
Changed
  • Default parameters in retry has changed to be less agressive. Retries will apply backoff by default, and give up after 10 retries.

v6.3.2

Added
  • Aliases for keyvault config to align with dotnet utils

v6.3.1

Fixed
  • Improved the state store retry behavior to handle both fundamental
    and wrapped network connection errors.

v6.3.0

Added
  • Added support to retrieve secrets from Azure Keyvault.

v6.2.2

Added
  • Added an optional security-categories attribute to the cognite config
    section.

v6.2.1

Fixed
  • Fixed a type hint in the post_upload_function for upload queues.

v6.2.0

Added
  • Added IOFileUploadQueue as a base class of both FileUploadQueue and BytesUploadQueue.
    This is an upload queue for functions that produce BinaryIO to CDF Files.

v6.1.1

Fixed
  • Correctly handle equality comparison of TimeIntervalConfig objects.

v6.1.0

Added
  • Added ability to specify dataset under which metrics timeseries are created

v6.0.2

Fixed
  • Improved the state store retry behavior to handle connection errors

v6.0.1

Fixed
  • Fixed iter method on the state store to return an iterator

v6.0.0

Changed
  • cognite-sdk to v7

v5.5.1

Added
  • Added iter method on the state store to return the keys of the local state dict

v5.5.0

Added
  • Added load_yaml_dict to configtools.loaders.
Fixed
  • Fixed getting the config type when !env was used in the config file.

v5.4.3

Added
  • Added len method on the state store to return the length of the local state dict

v5.4.2

Fixed
  • Fix on find_dotenv call

v5.4.1

Changed
  • Update cognite-sdk version to 6.24.0

v5.4.0

Fixed
  • Fixed the type hint for the retry decorator. The list of exception types
    must be given as a tuple, not an arbitrary iterable.
  • Fixed retries for sequence upload queue.
  • Sequence upload queue reported number of distinct sequences it had rows
    for, not the number of rows. That is now changed to number of rows.
  • When the sequence upload queue uploaded, it always reported 0 rows uploaded
    because of a bug in the logging.
Removed
  • Latency metrics for upload queues.

v5.3.0

Added
  • Added support for queuing assets upload

v5.2.1

Changed
  • Timestamps before 1970 are no longer filtered out, to align with changes to
    the timeseries API.

v5.2.0

Changed
  • The event upload queue now upserts events. If creating an event fails due
    to the event already existing, it will be updated instead.

v5.1.0

Added
  • Support for connection parameters

v5.0.1

Changed
  • Upload queue size limit now triggers an upload when the size has reached
    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 been
    deleted.

Changed
  • uploader and configtools have been changed from one module to a package
    of multiple modules. The content has been re-exported to preserve
    compatability, so you can still do

    from cognite.extractorutils.configtools import load_yaml, TimeIntervalConfig
    from cognite.extractorutils.uploader import TimeSeriesUploadQueue

    But now, you can also import from the submodules directly:

    from cognite.extractorutils.configtools.elements import TimeIntervalConfig
    from cognite.extractorutils.configtools.loaders import load_yaml
    from cognite.extractorutils.uploader.time_series import TimeSeriesUploadQueue

    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 the extraction_pipelines
      module

    • The throttled_loop generator from the throttle module

    • The retry decorator from the retry module

Added
  • Support for audience parameter in idp-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

      from cognite.extractorutils.extraction_pipelines import add_extraction_pipeline

      to

      from cognite.extractorutils.util import add_extraction_pipeline
    • Change from

      from cognite.extractorutils.throttle import throttled_loop

      to

      from cognite.extractorutils.util import throttled_loop
    • Change from

      from cognite.extractorutils.retry import retry

      to

      from cognite.extractorutils.util import retry
  • 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 becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner November 21, 2023 11:27
@einarmo einarmo added auto-merge Bulldozer auto-merge auto-update labels Nov 21, 2023
@renovate renovate bot changed the title Update dependency cognite-extractor-utils to v6 Update dependency cognite-extractor-utils to v6 - autoclosed Feb 20, 2024
@renovate renovate bot closed this Feb 20, 2024
@renovate renovate bot deleted the renovate/cognite-extractor-utils-6.x branch February 20, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Bulldozer auto-merge auto-update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant