Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • S swh-model
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Platform
  • Development
  • swh-model
  • Issues
  • #3214

Restrict accepted timestamps to values that can be processed all along

Current validation of swh.model.model.TimeStamp allows second values in the [-2**63, 2**63[ range, but these limits are way too large for several storage backends.

The postgresql backend for example can only deal with year up to 294276, which cannot even be handled by python's datetime object (which are used as intermediate structure in swh.storage.postgresql.converters.date_to_db() and db_to_date()).

Python's datetime max year is 9999 (see https://docs.python.org/3/library/datetime.html#datetime.MAXYEAR).

Related to T3200


Migrated from T3214 (view on Phabricator)

Assignee
Assign to
Time tracking