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

Cast the postgres timestamp to integer #4182

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Conversation

chrzaszcz
Copy link
Member

ROUND returns a float on Postgres 13.9, resulting in a type error.

ROUND returns a float on Postgres 13.9, resulting in a type error.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 4, 2023

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 78b60d6
Reports root/ big
OK: 368 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


small_tests_25 / small_tests / 78b60d6
Reports root / small


small_tests_26 / small_tests / 78b60d6
Reports root / small


small_tests_26_arm64 / small_tests / 78b60d6
Reports root / small


ldap_mnesia_25 / ldap_mnesia / 78b60d6
Reports root/ big
OK: 2268 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / 78b60d6
Reports root/ big
OK: 4192 / Failed: 0 / User-skipped: 135 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 78b60d6
Reports root/ big
OK: 4225 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 78b60d6
Reports root/ big
OK: 4225 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / 78b60d6
Reports root/ big
OK: 2408 / Failed: 0 / User-skipped: 707 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / 78b60d6
Reports root/ big
OK: 4273 / Failed: 0 / User-skipped: 110 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 78b60d6
Reports root/ big
OK: 2268 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 78b60d6
Reports root/ big
OK: 4221 / Failed: 1 / User-skipped: 105 / Auto-skipped: 0

graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:admin_create_room_with_unprepped_id
{error,
  {{badmatch,null},
   [{graphql_muc_light_SUITE,admin_create_room_with_unprepped_id,1,
      [{file,
         "/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE.erl"},
       {line,1155}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1302}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1234}]}]}}

Report log


mysql_redis_26 / mysql_redis / 78b60d6
Reports root/ big
OK: 4593 / Failed: 0 / User-skipped: 130 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 78b60d6
Reports root/ big
OK: 4614 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 78b60d6
Reports root/ big
OK: 4614 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / 78b60d6
Reports root/ big
OK: 4611 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 78b60d6
Reports root/ big
OK: 4222 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0

graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:end_per_group
{error,
 {{unregistering_failed,
   {amount,1},
   {unregistered_items,
  [{{<<"_domain_admin_create_room_no_permission_1097">>,
     [{escalus_event_mgr,<0.24627.0>},
    {tc_name,domain_admin_create_room_no_permission},
    {escalus_cleaner,<0.24626.0>},
    {watchdog,<0.24625.0>},
    {muc_light_host,<<"muclight.domain.example.com">>},
    {secondary_muc_light_host,<<"muclight.domain.example.org">>},
    {protocol,http},
    {domain_admin,{<<"[email protected]">>,<<"446138849cc3beea">>}},
    {schema_endpoint,domain_admin},
    {{ejabberd_cwd,mongooseim@localhost},
     "/home/circleci/project/_build/mim1/rel/mongooseim"},
    {preset,"odbc_mssql_mnesia"},
    {mim_data_dir,
     "/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE_data"},
    {tc_logfile,
     "https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4182/201628/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%400bd4587defec.2023-12-04_10.50.58/big_tests.tests.graphql_muc_light_SUITE.logs/run.2023-12-04_10.54.50/graphql_muc_light_suite.domain_admin_create_room_no_permission.html"},
    {tc_group_properties,[{name,domain_admin_muc_light}]},
    {tc_group_path,[[{name,domain_admin}]]},
    {data_dir,
     "/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_muc_light_SUITE_data/"},
    {priv_dir,
     "https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4182/201628/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%400bd4587defec.2023-12-04_10.50.58/big_tests.tests.graphql_muc_light_SUITE.logs/run.2023-12-04_10.54.50/log_private/"},
    {{saved_modules,mongooseim@localhost,<<"test type"...

Report log

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (44b57e6) 84.28% compared to head (78b60d6) 84.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4182      +/-   ##
==========================================
- Coverage   84.28%   84.28%   -0.01%     
==========================================
  Files         551      551              
  Lines       33467    33467              
==========================================
- Hits        28208    28206       -2     
- Misses       5259     5261       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arcusfelis
Copy link
Contributor

PgSQL version 13.9 would return a float in the old code.

Setup required version of PgSQL:
DB=pgsql PGSQL_VERSION=13.9 ./tools/setup-db.sh

This PR addresses Error:

mongoose_rdbms_timestamp:select().
** exception error: no function clause matching mongoose_rdbms:result_to_integer(1701684792.0)

Proposed changes include:

  • better casting logic.

Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

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

good

@chrzaszcz chrzaszcz marked this pull request as ready for review December 4, 2023 11:31
@chrzaszcz
Copy link
Member Author

chrzaszcz commented Dec 4, 2023

Tested manually in the load test env. Works as expected.

@arcusfelis arcusfelis merged commit 216342f into master Dec 4, 2023
4 checks passed
@arcusfelis arcusfelis deleted the fix-pgsql-timestamp branch December 4, 2023 11:32
@chrzaszcz chrzaszcz added this to the 6.2.0 milestone Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants