Commit graph

32 commits

Author SHA1 Message Date
Jennifer Richards a4e0354090
feat: get tool versions without VersionInfo model (#7418)
* feat: get tool versions without VersionInfo model

* chore: remove update_external_command_info call

* feat: get tool version without VersionInfo

* chore: Remove VersionInfo model

* chore: Migration to remove VersionInfo

* fix: handle errors better; ignore stderr

* fix: type annotation
2024-05-14 18:53:31 -05:00
Jennifer Richards 72954c24fc
chore: Add type annotations to satisfy linter (#5435) 2023-03-29 09:06:14 +09:00
Jennifer Richards 6b826fd985
refactor: Purge old migrations and update ci to build on a clean schema (#5431)
* refactor: Remove all existing migrations

* refactor: Create clean set of migrations

* chore: Skip check_statetype_slugs when DB is not yet populated

* fix: Do not cache active_groups_menu on module import

* fix: Do not patch timezone awareness out of oidc-provider

* refactor: Migrate to create postgres schema, only use pgloader for data

* ci: Use migration scripts from feat/pg-migrations branch

* Revert "ci: Use migration scripts from feat/pg-migrations branch"

This reverts commit c82f64c614241ccede4865a50d494725c8a47c15.

* ci: Run check before migrate

* fix: Remove redundant migration caused by merge error

* chore: Add casts/ALTER TABLEs to eliminate pgloader errors/warnings

* chore: Change schema name to match docker image assumptions

* chore: Clear out schema so we get a clean start in case of a retry
2023-03-28 18:06:07 +09:00
Jennifer Richards a10464a250
chore: Fix reference to misspelled migration
The migration with the misspelled name already ran on production, so
we have to recreate the typo in the reference to it.
2023-02-14 12:58:45 -04:00
Robert Sparks 7a86a1c2cb
chore: tighten migration dependencies 2023-02-13 17:25:54 -06:00
Jennifer Richards 5abfcd4d71
chore: Update migration numberings/deps 2023-02-13 16:26:25 -04:00
Robert Sparks abe640e57f
Merge remote-tracking branch 'upstream/main' into feat/postgres 2022-11-30 16:35:33 -06:00
Lars Eggert 6eabd4a3a1
chore: Use codespell to fix typos in comments. (#4794)
First part of replacement of #4651
2022-11-28 10:36:36 -06:00
Robert Sparks 27fccc6ba0
feat: move to postgresql (#4744)
* feat: move to postgresql

* fix: repair fractional replace statement

* fix: use pathlib to manipulate settings_local

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: do two string replacements, not one followed by another that throws away the first.

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: use pathlib again to manipulate settings_local

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: properly use assert (1/2)

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: properly use assert (2/2)

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>
2022-11-11 11:01:01 +00:00
Jennifer Richards 320d9c3706
chore: renumber migrations 2022-10-18 17:22:37 -03:00
Jennifer Richards bef7492eda
chore: renumber migrations 2022-10-14 16:51:43 -03:00
Jennifer Richards d0383c7cf1
fix: convert pre-1970 timestamps when migrating to UTC (#4419)
* fix: convert pre-1970 timestamps when migrating to UTC

* fix: simplify migration code and fix typo
2022-09-07 15:17:30 -03:00
Jennifer Richards 3e5c1c6365
chore: run timezone.now migrations before converting timestamps to UTC (#4404) 2022-09-06 15:54:03 -03:00
Robert Sparks f7f0ca99d3
fix: don't migrate dumpinfo. automate migrations and setting USE_TZ. (#4389)
* fix: don't migrate dumpinfo - it's already in UTC.

* chore: leave mode bits alone

* fix: migrate the container db, automating setting USE_TZ.
2022-08-31 12:38:48 -03:00
Jennifer Richards c2c17cfeb1
chore: enforce USE_TZ setting expectations in migrations (#4386)
* chore: enforce USE_TZ setting expectations in migrations

* chore: keep USE_TZ=False until changed manually
2022-08-30 12:10:59 -03:00
Jennifer Richards 42203d7a9c
chore: migrate timestamps for use with USE_TZ=True (#4370)
* chore: add migration to change timestamps to UTC

* chore: fill in Meeting.time_zone where it is blank

Nearly all interim meetings on or before 2016-07-01 have blank
time_zone values. This migration fills these in with PST8PDT.

* chore: disallow blank Meeting.time_zone value

* refactor: no need to handle blank time_zone case in TZ migration

* refactor: remove now-unnecessary checks that meeting has time_zone

* chore: renumber migrations

* chore: update timestamp conversion migration

The django-celery-beat package introduces tables with timestamp
columns. These columns are stored in CELERY_TIMEZONE. Because we run with
this set to UTC, the migration ignores these columns.

* chore: fix pytz-related change in migration

* chore: be explicit that Meeting.vtimezone can return None

* refactor: remove unnecessary save()
2022-08-26 13:03:19 -03:00
Robert Sparks 3697180cc1 Reverted merge of timezone-aware migration efforts.
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz 59b49c846b Fixed a number of TimeSlot-related issues, in particular related to getting the correct date from a timeslot. Also fixed the displayed slot times in the new schedule editors to show local times, not UTC times.
- Legacy-Id: 18785
2020-12-19 22:55:11 +00:00
Henrik Levkowetz 774e752a54 Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz ab173cb2eb Removed further six usage: six.string_types, six.integer_types, six.moves.urllib instances.
- Legacy-Id: 17390
2020-03-05 20:46:58 +00:00
Henrik Levkowetz 902f7769d1 Fixed incorrect type hints for Migration.dependencies.
- Legacy-Id: 16776
2019-09-30 16:25:58 +00:00
Henrik Levkowetz 33e8733b91 Fixed up mypy issues or added type:ignore comments as needed for a clean mypy run.
- Legacy-Id: 16772
2019-09-30 15:42:18 +00:00
Henrik Levkowetz 8e313e4ed5 Adjusted migrations for Python2/3 compatibility.
- Legacy-Id: 16633
2019-08-08 17:11:14 +00:00
Henrik Levkowetz 2d7c9629aa Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3
- Legacy-Id: 16446
2019-07-15 15:40:51 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 06362ec046 Got rid of old migrations and created new initial migrations.
- Legacy-Id: 14662
2018-02-21 23:46:22 +00:00
Henrik Levkowetz 8d420d4d2f Added initial data to the versioninfo migration.
- Legacy-Id: 13638
2017-06-16 08:55:31 +00:00
Henrik Levkowetz c4b64e51af Updated the VersionInfo migration.
- Legacy-Id: 13637
2017-06-16 08:45:11 +00:00
Henrik Levkowetz d98054c103 Added a new yang checker, 'yanglint', to the existing Yang checker class, in
addition to the existing 'pyang' checker.

Added modal overlay displays showing the yang check results every place the
yin/yang symbol is shown (red or green) to indicate the presencee and result
of yang checks.  Added a Yang Validation: line in the document
meta-information section on the document's page in the datatracker.

Added the result of the xym extaction to the yang check results, to make
extration failures visible.

Added the version of the used xym, pyang, and yanglint commands to the check
results.

Added an action to move successfully extracted and validated modules to the
module library directories immediately on submission.

Added the xym and pyang repositories as svn:external components, rather than
listing them in requirements.txt, as there has been delays of many months
between essential features in the repositories, and an actual release.  We may
get occasional buildbot failures if broken code is pulled in from the
repository, but better that than the functionality failure of severely
outdated componets.

Added a new management command to re-run yang validation for active drafts for
which yang modules were found at submission time, in order to pick up imported
models which may have arrived in the model libraries after the draft's
submission.  Run daily from bin/daily.

Added a table to hold version information for external commands.  The yang
checker output should include the version information of the used checkers,
but seems unnecessary to run each command with its --version switch every
time we check a module...

Added a new management command to collect version information for external
commands on demand.  To be run daily from bin/daily.

Added tests to verify that xym, pyang and yanglint information is available
on the submission confirmation page, and updated the yang module contained in
the test document to validate under both pyang and yanglint.

Updated admin.py and resource.py files as needed.
 - Legacy-Id: 13630
2017-06-15 16:09:28 +00:00
Henrik Levkowetz b5319c576a Updated the utils.DumpInfo model to match the database.
- Legacy-Id: 13330
2017-05-12 15:27:23 +00:00
Henrik Levkowetz 29b30c6c3c Added a utility model to hold information on when a given database dump has been done.
- Legacy-Id: 10480
2015-11-14 22:59:14 +00:00