Skip to content

common: fix string creation from '0' in LogEntry#55905

Merged
tchaikov merged 1 commit intoceph:mainfrom
ronen-fr:wip-rf-23a
Mar 5, 2024
Merged

common: fix string creation from '0' in LogEntry#55905
tchaikov merged 1 commit intoceph:mainfrom
ronen-fr:wip-rf-23a

Conversation

@ronen-fr
Copy link
Contributor

@ronen-fr ronen-fr commented Mar 3, 2024

C++23 disallows conversion from 'int' to 'string'.

That includes returning '0' from a function that returns a string.

@ronen-fr ronen-fr requested a review from rzarzynski March 3, 2024 14:33
@github-actions github-actions bot added the common label Mar 3, 2024
@ronen-fr
Copy link
Contributor Author

ronen-fr commented Mar 4, 2024

jenkins test make check

C++23 disallows conversion from 'int' to 'string'.
That includes returning '0' from a function that returns a string.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

thanks. lgtm.

@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

tests/test_host.py .F

_______________________ HostControllerTest.test_add_host _______________________

self = <dashboard.tests.test_host.HostControllerTest testMethod=test_add_host>
mock_add_host = <MagicMock name='add_host' id='140354858718240'>

    @mock.patch('dashboard.controllers.host.add_host')
    def test_add_host(self, mock_add_host):
        with patch_orch(True):
            payload = {
                'hostname': 'node0',
                'addr': '192.0.2.0',
                'labels': 'mon',
                'status': 'maintenance'
            }
            self._post(self.URL_HOST, payload, version=APIVersion(0, 1))
>           self.assertStatus(201)

tests/test_host.py:289: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py3/lib/python3.10/site-packages/cheroot/test/webtest.py:323: in assertStatus
    self._handlewebError(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <dashboard.tests.test_host.HostControllerTest testMethod=test_add_host>
msg = 'Status 400 Bad Request does not match 201'

    def _handlewebError(self, msg):  # noqa: C901  # FIXME
        print('')
        print('    ERROR: %s' % msg)
    
        if not self.interactive:
>           raise self.failureException(msg)
E           AssertionError: Status 400 Bad Request does not match 201

@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

jenkins test make check

@ronen-fr
Copy link
Contributor Author

ronen-fr commented Mar 5, 2024

jenkins test make check

@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

change in a dead-end branch -- so no need to test with teuthology. i am merging it to unblock #55886

@tchaikov tchaikov merged commit 6c9d1b6 into ceph:main Mar 5, 2024
@ronen-fr
Copy link
Contributor Author

ronen-fr commented Mar 5, 2024

change in a dead-end branch -- so no need to test with teuthology. i am merging it to unblock #55886

@tchaikov - I've just finished a successful round of Teuthology tests...

@ronen-fr ronen-fr deleted the wip-rf-23a branch March 5, 2024 12:28
@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

thanks for testing it. even better =)

@cbodley
Copy link
Contributor

cbodley commented Jul 30, 2024

i've started seeing this failure on squid, ex https://jenkins.ceph.com/job/ceph-pull-requests/140268/consoleFull

i opened https://tracker.ceph.com/issues/67271 and prepared the backport in #58934

p.s. are crimson builds using -std=c++2b intentionally?

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 this pull request may close these issues.

5 participants