~suligap/canonical-identity-provider:drop-VCSRevisionMiddleware-wsgi-middleware-and-versioninfo-module

Last commit made on 2020-06-02
Get this branch:
git clone -b drop-VCSRevisionMiddleware-wsgi-middleware-and-versioninfo-module https://git.launchpad.net/~suligap/canonical-identity-provider
Only Przemysław Suliga can upload to this branch. If you are Przemysław Suliga please log in for upload directions.

Branch merges

Branch information

Name:
drop-VCSRevisionMiddleware-wsgi-middleware-and-versioninfo-module
Repository:
lp:~suligap/canonical-identity-provider

Recent commits

c2b335d... by Przemysław Suliga

Drop VCSRevisionMiddleware and generated versioninfo module

Following up on b20bc9f:

- Remove VCSRevisionMiddleware, effects of which (x-vcs-revision
  response header) are now being overriden by talisker.

- Remove the versioninfo module generation and its usage

I've checked the charm and the mojo spec branches and they do not refer
to the versioninfo module.

Raven's "release" is being configured by talisker as well, based on the
version-info.txt file.

Thanks Daniel for spotting this.

b20bc9f... by Daniel Manrique

Write SSO version to talisker-compatible file

Talisker reads a version-info.txt file in the project's root and
puts that in the X-Vcs-Revision header.

Eventually the old VcsMiddleware can go away thanks to this.

Also, the old versioninfo module is used to set sentry config but
that's probably overridden/superseded by Talisker anyway.

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/+git/canonical-identity-provider/+merge/384919

cc73de3... by Daniel Manrique

Ignore version-info.txt

3c55e19... by Daniel Manrique

Write SSO version to talisker-compatible file

Talisker reads a version-info.txt file in the project's root and
puts that in the X-Vcs-Revision header.

Eventually the old VcsMiddleware can go away thanks to this.

Also, the old versioninfo module is used to set sentry config but
that's probably overridden/superseded by Talisker anyway.

e990406... by Przemysław Suliga

Bump requests to 2.23.0

Merged from https://code.launchpad.net/~suligap/canonical-identity-provider/+git/canonical-identity-provider/+merge/384738

e66f5f9... by Przemysław Suliga

Bump requests to 2.23.0

Overlooked in
https://code.launchpad.net/~suligap/canonical-identity-provider/+git/canonical-identity-provider/+merge/384254

7604f54... by Przemysław Suliga

Prepare for talisker's statsd integration

Merged from https://code.launchpad.net/~suligap/canonical-identity-provider/+git/canonical-identity-provider/+merge/384617

3ac6bb4... by Przemysław Suliga

Switch to Django 1.10 style middleware

Merged from https://code.launchpad.net/~suligap/canonical-identity-provider/+git/canonical-identity-provider/+merge/384550

896f48a... by Przemysław Suliga

Prepare for talisker's statsd integration

- Bump statsd package version to 3.3.0 (required by talisker for
  configuring the statsd client)
- Add talisker.django.middleware

After this, talisker can be configured using a STATSD_DSN env var to
send out various metrics to statsd. Currently those will be timers and
counters for views; example counter:

    $prefix.wsgi.latency.account-index.GET.200

The middleware is needed for view name introspection, also for the
purposes of creating these metrics:
https://talisker.readthedocs.io/en/latest/django.html#metadata

This also results in an X-View-Name response header being added.
Example:

    X-View-Name: account-index

Enabling the metrics sending part requires adding a proper STATSD_DSN
env var to talisker's execution env. Later more metrics can be added by
switching to use talisker provided `requests` session for example.

Maybe later, we can look into replacing the django_statsd based
PistonRequestTimingMiddleware metrics by these talisker provided ones.
They have a bit different naming structure (but it might be a win just
letting talisker decide here).

0036cd5... by Przemysław Suliga

Switch to Django 1.10 style middleware

https://docs.djangoproject.com/en/1.11/topics/http/middleware/#upgrading-middleware

In most cases this is adding the MiddlewareMixin to our custom
middleware classes. Plus a version bump for django-honeypot that brings
the new style middleware compatibility.

Other middleware used (django and other 3rd party middleware) was already
compatible.

Requires
https://code.launchpad.net/~suligap/canonical-identity-provider/dependencies-django-honeypot-0.7.0/+merge/384546