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

[CT-1645] [Regression] Datetime format in run_results.json results.timing[].completed_at has no timezone #6428

Closed
2 tasks done
lustefaniak opened this issue Dec 12, 2022 · 5 comments · Fixed by #6564
Closed
2 tasks done
Assignees
Labels
Milestone

Comments

@lustefaniak
Copy link

Is this a regression in a recent version of dbt-core?

  • I believe this is a regression in dbt-core functionality
  • I have searched the existing issues, and I could not find an existing issue for this regression

Current Behavior

run_results.json and sources.json has completed_at datetime in timing report without timezone.

      "timing": [
        {
          "name": "compile",
          "started_at": "2022-12-09T11:45:25.274155Z",
          "completed_at": "2022-12-09T11:45:25.294915"
        },
        {
          "name": "execute",
          "started_at": "2022-12-09T11:45:25.312143Z",
          "completed_at": "2022-12-09T11:45:25.984434"
        }
      ],

Expected/Previous Behavior

      "timing": [
        {
          "name": "compile",
          "started_at": "2022-12-09T11:45:25.274155Z",
          "completed_at": "2022-12-09T11:45:25.294915Z"
        },
        {
          "name": "execute",
          "started_at": "2022-12-09T11:45:25.312143Z",
          "completed_at": "2022-12-09T11:45:25.984434Z"
        }
      ],

Steps To Reproduce

Happens on dbt Cloud with version 1.4.0a1

Relevant log output

No response

Environment

dbt Cloud using HEAD version
- dbt (working version): 1.4.0a1 HEAD at 2022-12-07T15:45:32.039789Z
- dbt (regression version): 1.4.0a1 HEAD at 2022-12-07T16:01:21.330798Z

Which database adapter are you using with dbt?

bigquery

Additional Context

No response

@lustefaniak lustefaniak added bug Something isn't working regression triage labels Dec 12, 2022
@lustefaniak lustefaniak changed the title [Regression] Datetime format in run_results.json results.timing[].completed_at has not timezone [Regression] Datetime format in run_results.json results.timing[].completed_at has no timezone Dec 12, 2022
@github-actions github-actions bot changed the title [Regression] Datetime format in run_results.json results.timing[].completed_at has no timezone [CT-1645] [Regression] Datetime format in run_results.json results.timing[].completed_at has not timezone Dec 12, 2022
@lustefaniak
Copy link
Author

Problem with timestamps, sometimes having timezone and sometimes not is also present in many dbt Cloud API endpoints.

@lustefaniak lustefaniak changed the title [CT-1645] [Regression] Datetime format in run_results.json results.timing[].completed_at has not timezone [CT-1645] [Regression] Datetime format in run_results.json results.timing[].completed_at has no timezone Dec 12, 2022
@dbeatty10
Copy link
Contributor

@lustefaniak Thanks for reporting this!

I was able to reproduce this for run_results.json using dbt-core 1.4.0a1 (bigquery). I didn't try reproducing this for sources.json, but trust it is being rendered in a timezone-naive fashion as reported.

Agreed that started_at and completed_at should both be timezone-aware when rendered with an ISO 8601 format in run_results.json. Timestamps within sources.json should be timezone-aware as well.

@peterallenwebb
Copy link
Contributor

Note that this issue resolves if mashumaro is rolled back to 3.1.1. I'm currently looking into workarounds and the option of going back to that version.

@jtcohen6
Copy link
Contributor

jtcohen6 commented Jan 6, 2023

Related issue: Fatal1ty/mashumaro#93

@peterallenwebb
Copy link
Contributor

I got to the bottom of this issue in mashumaro and added my notes to the issue for them. Hopefully it will be enough information for them to fix it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants