Skip to content

Releases: octue/django-gcp

Fix signature mismatch bug due to max size bytes header

02 Jun 11:22
fd59b2b
Compare
Choose a tag to compare

Summary

In the previous release 0.18.0, the addition of the X-Goog-Content-Length-Range header was "fixed". Previously it had been incorrectly added and was thus always missing.

However, this header must be identically both:

  • Encoded into signature generation and
  • Set on the upload request

The "fix" in 0.18.0 added it into the encoding of the signature generation but did not set it on the upload request. The resulting code caused errors in all uploads using the widget.

This release fixes that problem by clarifying the default value and ensuring that the correct header is set on upload. In the event that the requested max_size_bytes is 0, the upload size is unlimited.

This release adds a setting GCP_STORAGE_BLOBFIELD_MAX_SIZE_BYTES allowing you to set a maximum for all your blobfields. However, to avoid a breaking change, the default is set to 0 (unlimited).

Add uploaded_blob context manager, allow calling of model clean() with overridden settings

28 May 21:24
c322454
Compare
Choose a tag to compare

Contents (#84)

⚠️ This release has been yanked from pypi as it introduces a mismatched signature when uploading blobfields from the django admin. Use 0.18.1 which patches the problem.

New features

  • Add uploaded_blob context manager, useful for unit testing

Fixes

  • Allow field cleaning to happen inside an overridden context
  • Correct implementation of headers for limiting content length range
  • Make upload_blob woth with default destination path helper

Operations

  • Remove deprecated setting from devcontainer json

Refactoring

  • Remove redundant context in test

Testing

  • Test uploaded_blob context manager

Export BlobField from `django-gcp.storages`

21 Mar 16:21
3ac47f6
Compare
Choose a tag to compare

Contents (#82)

Operations

  • Bump version

Access ingress path

21 Mar 10:51
e9bbb5d
Compare
Choose a tag to compare

Contents (#80)

IMPORTANT: There is 1 breaking change.

New features

  • Add update_attributes callback for setting blob metadata

Fixes

  • Avoid save on unrefreshed object

Refactoring

  • 💥 BREAKING CHANGE: Move upload_blob to the operations module where it belongs

Testing

  • Fix race condition from transaction handler

Upgrade instructions

💥 Move upload_blob to the operations module where it belongs

If importing the upload_blob function from django_gcp.storage.blob_utils, import directly from django_gcp.storage.operations or django_gcp.storage instead

Add complete method list to the blob field mixin

03 Mar 08:27
89392ea
Compare
Choose a tag to compare

What's Changed

  • Add complete method list to the blob field mixin by @thclark in #79

Full Changelog: 0.16.0...0.16.1

Read Only Widget

02 Mar 14:01
cbbe530
Compare
Choose a tag to compare

Contents (#78 and #77)

IMPORTANT: There is 1 breaking change.

New features

  • Add utils to easily work with blobs
  • 💥 BREAKING CHANGE: Add readonly widget and complete demo in admin

Fixes

  • Correctly surface ValidationErrors
  • Widget correctly accepts download_url and console_url
  • Fix poetry lock

Operations

  • Add useful aliases
  • Ignore django static files

Fixes

  • Poetry installation

Upgrade instructions

💥 Add readonly widget and complete demo in admin

Determination of the kmz destination path is now executed during the model full_clean() rather than on save() (so that any ValidationError can be surfaced gracefully to the admin), so any instance fields used to determine the kmz path must be populated prior to that point.

Move blob utils to correct place

21 Feb 20:46
1b26324
Compare
Choose a tag to compare

BREAKING-CHANGE: Moved erroneously-located blob utilities. Import blob utilities from django_gcp.storage not django_gcp.tasks.

Contents (#75)

IMPORTANT: There is 1 breaking change.

Refactoring

  • 💥 BREAKING CHANGE: Move blob utils to correct place

Upgrade instructions

💥 Move blob utils to correct place

Moved erroneously-located blob utilities. Import blob utilities from django_gcp.storage not django_gcp.tasks.

Add utilities to tasks module

21 Feb 17:01
d8a3dcf
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.13.0...0.14.0

Widen supported django and python ranges, update developer tools

31 Oct 15:16
86b42bd
Compare
Choose a tag to compare

Note from the author: Sorry about the commit messages here. Unprofessional but it was a real nightmare to get this done and I was planning to squash them then forgot! - @thclark.

Contents (#71)

IMPORTANT: There is 1 breaking change.

Fixes

  • Use newer accessor for django settings
  • 💥 BREAKING CHANGE: Avoid circular import of StreamHandler in some python environments
  • Correctly parameterise tox dependency installation
  • FFS
  • Tighten django ranges

Operations

  • Update devcontainer onto latest stack
  • Fail slow on matrix so we can detect problems with specific builds
  • Update tox versions
  • Remove unused tox-poetry plugin
  • Enable testing using example buckets in GitHub Actions, via WIF
  • Refine test matrix, remove tox-factor, no longer required in tox 4
  • Add credentials generation for Workload Identity Federation
  • Try to get poetry to install dev dependencies
  • Ditch the tox bitch
  • Fix the pre-commit run
  • Remove pre-commit-sphinx local install for use on GHA
  • Exclude invalid python-django combinations
  • Skip pre-commit checks invalid for GHA
  • Bump version
  • Add django env vars
  • Add application credentials to environment
  • Temporarily constrain django version
  • Add a check-main-merge test
  • Simplify merge check
  • Update cache to a non-deprecated node runner
  • Change order of publish-test so it appears above long test matrix
  • Update cache action version
  • Rename job for clarity

Dependencies

  • Widen python and django tested versions
  • Restrict django 5.1 until STORAGES problem solved
  • Update lockfile
  • Remove django 3 support

Testing

  • Patch the error reporting emitter
  • Remove now-unused tox file
  • Avoid utc import from django timezone

Style

  • Fix all linting problems

Other

  • Toward allowing ci to run on push to main

Upgrade instructions

💥 Avoid circular import of StreamHandler in some python environments

The django_gcp.logging module has been renamed to django_gcp.logs because some python environments (eg installed in tox) don't resolve the import order in the same way, so mistake django_gcp.logging for the inbuilt python logging module. To overcome this, users of the structured logging or error reporting handlers must update their handler classes to 'django_gcp.logs.GoogleStructuredLogsHandler' and 'django_gcp.logs.GoogleErrorReportingHandler' from the previous 'django_gcp.logging.'

Use trusted publisher to publish to PyPI

29 Oct 15:01
9008a37
Compare
Choose a tag to compare

Contents (#70)

Operations

  • Use trusted publisher to publish to PyPI in cd workflow
  • Test publishing to PyPI in ci workflow
  • Add semantic version checker job to ci workflow
  • Only run ci workflow on non-draft pull requests, and additionally trigger on ready_for_review event
  • Use latest snok/install-poetry, actions/checkout, and actions/setup-python actions