Skip to content

Conversation

@erezrokah
Copy link
Member

@erezrokah erezrokah commented Feb 28, 2023

Summary

Fixes #700

Tested this on quite a few plugins. Most send time.Time in UTC already (nil location).
The only impact I've seen is on this AWS resource:
https://github.com/cloudquery/cloudquery/blob/380bcddff9406d12b7de343dd4dd002c95b46f0f/plugins/source/aws/resources/services/iam/credential_reports_fetch.go#L66
which for some reason results in a time.Time with a location with an empty name, so that would be converted to UTC.

Another impact is on the Stripe plugin that uses int64. Since time.Unix returns a time.Time with local timezone, now it will be converted to UTC.


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@github-actions
Copy link

github-actions bot commented Feb 28, 2023

⏱️ Benchmark results

Comparing with d0c2e26

  • DefaultConcurrencyDFS-2 resources/s: 11,353 ⬆️ 6.92% increase vs. d0c2e26
  • DefaultConcurrencyRoundRobin-2 resources/s: 12,357 ⬆️ 10.12% increase vs. d0c2e26
  • Glob-2 ns/op: 156.5 ⬇️ 25.11% decrease vs. d0c2e26
  • TablesWithChildrenDFS-2 resources/s: 31,023 ⬆️ 11.07% increase vs. d0c2e26
  • TablesWithChildrenRoundRobin-2 resources/s: 24,809 ⬇️ 16.43% decrease vs. d0c2e26
  • TablesWithRateLimitingDFS-2 resources/s: 28.52 ⬆️ 1.23% increase vs. d0c2e26
  • TablesWithRateLimitingRoundRobin-2 resources/s: 845.2 ⬆️ 1.34% increase vs. d0c2e26
  • BufferedScanner-2 ns/op: 9.389 ⬆️ 0.04% increase vs. d0c2e26
  • LogReader-2 ns/op: 30.72 ⬇️ 0.10% decrease vs. d0c2e26

@erezrokah erezrokah force-pushed the fix/timestamp_utc branch from 1ff9eae to aa65add Compare March 2, 2023 11:39
@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (2f6f1d8) 48.81% compared to head (7815c45) 48.81%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #716   +/-   ##
=======================================
  Coverage   48.81%   48.81%           
=======================================
  Files          70       70           
  Lines        6892     6887    -5     
=======================================
- Hits         3364     3362    -2     
+ Misses       3063     3061    -2     
+ Partials      465      464    -1     
Impacted Files Coverage Δ
schema/timestamptz.go 46.90% <100.00%> (+0.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kodiakhq kodiakhq bot merged commit bb33629 into cloudquery:main Mar 2, 2023
kodiakhq bot pushed a commit that referenced this pull request Mar 2, 2023
🤖 I have created a release *beep* *boop*
---


## [1.41.0](v1.40.0...v1.41.0) (2023-03-02)


### Features

* Deterministic _cq_id ([#712](#712)) ([2e7ad2c](2e7ad2c))
* **multiplex:** Detect duplicated clients ([#723](#723)) ([dfb039d](dfb039d))


### Bug Fixes

* Cleanup code ([#710](#710)) ([963f03c](963f03c))
* **deps:** Update golang.org/x/exp digest to c95f2b4 ([#718](#718)) ([de52c10](de52c10))
* **deps:** Update google.golang.org/genproto digest to 9b19f0b ([#719](#719)) ([ecfddea](ecfddea))
* **deps:** Update module github.com/rivo/uniseg to v0.4.4 ([#720](#720)) ([0da69b6](0da69b6))
* **deps:** Update module github.com/stretchr/testify to v1.8.2 ([#721](#721)) ([19c0742](19c0742))
* **pk:** Skip filter for no PK ([#709](#709)) ([d0c2e26](d0c2e26))
* **types-json:** Disable HTML escaping during JSON marshalling ([#714](#714)) ([2f6f1d8](2f6f1d8))
* **types-timestamp:** Ensure timestamp is UTC ([#716](#716)) ([bb33629](bb33629))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

time.Time values don't get converted to UTC zone

4 participants