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

Properly convert milliseconds to seconds #767

Conversation

pawelsnk
Copy link
Contributor

Currently, a value expressed in milliseconds is directly assigned to a variable
which is supposed to store seconds and it's later converted to mills again.
Thus, convert properly upon assignment

Description

Provide details of the change, and generalize the change in the PR title above.

Currently, a value expressed in milliseconds is directly assigned to a variable
which is supposed to store seconds and it's later converted to mills again.
Thus, convert properly upon assignment


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.

Setting different timeouts via RemoteConfig::SetConfigSettings(), calling RemoteConfig::FetchAndActivate() and verifying if an expected update was indeed fetched or cached config was used.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.
Currently, a value expressed in milliseconds is directly assigned to a variable
which is supposed to store seconds and it's later converted to mills again.
Thus, convert properly upon assignment
@google-cla google-cla bot added the cla: no label Nov 30, 2021
@pawelsnk
Copy link
Contributor Author

I've just signed CLA. Please rerun

cynthiajoan
cynthiajoan previously approved these changes Nov 30, 2021
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label Nov 30, 2021
@github-actions
Copy link

github-actions bot commented Nov 30, 2021

❌  Integration test FAILED

Requested by @jonsimantov on commit refs/pull/767/merge
Last updated: Tue Nov 30 14:23 PST 2021
View integration test log & download artifacts

Failures Configs
firestore [TEST] [ERROR] [Android] [ubuntu, windows] [android_target]

Add flaky tests to go/fpl-cpp-flake-tracker

@jonsimantov
Copy link
Contributor

Thanks for the bugfix! Could you please add a release note to release_build_files/readme.md, under "Next Release"?

@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Nov 30, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Nov 30, 2021
@github-actions github-actions bot dismissed cynthiajoan’s stale review December 1, 2021 07:49

🍞 Dismissed stale approval on external PR.

@pawelsnk pawelsnk requested a review from cynthiajoan December 1, 2021 07:50
@pawelsnk
Copy link
Contributor Author

pawelsnk commented Dec 1, 2021

Thanks for the bugfix! Could you please add a release note to release_build_files/readme.md, under "Next Release"?

Done. Please squash all the commits when merging.

BTW: There have been some test failures but that looks unrelated.

@@ -580,6 +580,9 @@ code.
([#745](https://github.com/firebase/firebase-cpp-sdk/pull/745))
- Messaging (Android): Fixed crash during initialization.
([#760](https://github.com/firebase/firebase-cpp-sdk/pull/760))
- Remote config (Desktop): Fixed cache expiration time value used by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the indents to match the above lines? (4 spaces before the hyphen then 3 spaces after the hyphen; on the following lines, 8 space indent, no tabs). Also could you fix the capitalization to "Remote Config"?

Thanks!

@pawelsnk pawelsnk requested a review from jonsimantov December 2, 2021 07:23
@jonsimantov jonsimantov merged commit ce2a22d into firebase:main Dec 2, 2021
@jonsimantov
Copy link
Contributor

Thanks for the bugfix! Could you please add a release note to release_build_files/readme.md, under "Next Release"?

Done. Please squash all the commits when merging.

BTW: There have been some test failures but that looks unrelated.

Thanks for the readme fixes as well! It's been squashed and merged. The test failures were indeed unrelated.

Your fix made it in just in time for the next C++ release, and will also be included in the next Unity release.

@pawelsnk
Copy link
Contributor Author

pawelsnk commented Dec 2, 2021

Thanks for the bugfix! Could you please add a release note to release_build_files/readme.md, under "Next Release"?

Done. Please squash all the commits when merging.
BTW: There have been some test failures but that looks unrelated.

Thanks for the readme fixes as well! It's been squashed and merged. The test failures were indeed unrelated.

Your fix made it in just in time for the next C++ release, and will also be included in the next Unity release.

🎉 Thanks!

@pawelsnk pawelsnk deleted the fix-config-expiration-cache-fetch-and-activate branch December 2, 2021 07:47
jonsimantov added a commit that referenced this pull request Dec 4, 2021
* Fix link in readme (#768)

* update test devices (#757)

* Timeout and Retry FTL failures and mark flakiness

* Update C++ SDK version to 8.8.0.

* Add Analytics header update to iOS SDK update. (#775)

* Add Analytics header update to iOS SDK update.

* Update Android dependencies - Wed Dec 01 2021 (#773)

### Android

- com.google.firebase.firebase_database → 20.0.3
- com.google.firebase.firebase_perf → 20.0.4

> Created by [Update Android and iOS dependencies workflow](https://github.com/firebase/firebase-cpp-sdk/actions/runs/1527401903).

Co-authored-by: firebase-workflow-trigger-bot <firebase-workflow-trigger-bot@google.com>

* Fix typo in log output.

* Change Xcode version from 12.2 to 12.4 to ensure GitHub support. (#774)

* Change Xcode version from 12.2 to 12.4 to ensure GitHub support.

* Fix integration tests workflow to respect xcode_version in matrix.

* Add extra newline to header comment.

* Update iOS dependencies - Thu Dec 02 2021 (#779)

* Update iOS dependencies - Thu Dec 02 2021

### iOS

- Firebase/Analytics → 8.10.0
- Firebase/Auth → 8.10.0
- Firebase/Core → 8.10.0
- Firebase/Crashlytics → 8.10.0
- Firebase/Database → 8.10.0
- Firebase/DynamicLinks → 8.10.0
- Firebase/Firestore → 8.10.0
- Firebase/Functions → 8.10.0
- Firebase/Installations → 8.10.0
- Firebase/Messaging → 8.10.0
- Firebase/RemoteConfig → 8.10.0
- Firebase/Storage → 8.10.0

> Created by [Update Android and iOS dependencies workflow](https://github.com/firebase/firebase-cpp-sdk/actions/runs/1528664697).

* Add missing copyright lines.

* Add Firestore release note.

Co-authored-by: firebase-workflow-trigger-bot <firebase-workflow-trigger-bot@google.com>
Co-authored-by: Jon Simantov <jsimantov@google.com>

* Properly convert milliseconds to seconds (#767)

* Properly convert milliseconds to seconds

Currently, a value expressed in milliseconds is directly assigned to a variable
which is supposed to store seconds and it's later converted to mills again.
Thus, convert properly upon assignment

* Update readme.md

* Change LogDebug to NSLog in app's swizzling code. (#783)

* Change LogDebug to NSLog.

* Change log message.

* Add comment.

* Add copyright line when importing Analytics iOS headers, if missing (#780)

* Add copyright line to iOS headers

* Make copyright conditional to whether the file already has one.

* Also set Xcode version explicitly in Android workflow. (#786)

* Timeout & retry "install integration test deps" step (#785)

* Format code.

Co-authored-by: Борис Рязанцев <88411548+borisssoft@users.noreply.github.com>
Co-authored-by: Mou Sun <69009538+sunmou99@users.noreply.github.com>
Co-authored-by: firebase-workflow-trigger[bot] <80733318+firebase-workflow-trigger[bot]@users.noreply.github.com>
Co-authored-by: firebase-workflow-trigger-bot <firebase-workflow-trigger-bot@google.com>
Co-authored-by: pawelsnk <pawelsnk@o2.pl>
@firebase firebase locked and limited conversation to collaborators Jan 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes tests: failed This PR's integration tests failed.
3 participants