Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHPC-1805 and PHPC-1910: Implement ServerDescription class and Server::getServerDescription() #1239

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

Merged
tanlisu merged 21 commits into mongodb:feature/sdam-monitoring from tanlisu:phpc-1805
Jul 30, 2021

Conversation

@tanlisu
Copy link
Contributor

@tanlisu tanlisu commented Jul 19, 2021
edited by jmikola
Loading

@tanlisu tanlisu requested a review from alcaeus July 19, 2021 21:57
@tanlisu tanlisu force-pushed the phpc-1805 branch 2 times, most recently from 5bb2146 to a8ec9e7 Compare July 23, 2021 20:36
@tanlisu tanlisu marked this pull request as ready for review July 28, 2021 16:07
Copy link
Contributor Author

tanlisu commented Jul 28, 2021

The GitHub CI test failure for the PHP 8.1 build environment (https://github.com/mongodb/mongo-php-driver/pull/1239/checks?check_run_id=3183644508) is expected I believe - see https://jira.mongodb.org/browse/PHPC-1849

jmikola reacted with thumbs up emoji

Copy link
Member

jmikola commented Jul 28, 2021

The GitHub CI test failure for the PHP 8.1 build environment

Please rebase on (or merge in) master to pull in #1241. I think it makes sense to just disable 8.1 until we address PHPC-1849.

tanlisu reacted with thumbs up emoji

@tanlisu tanlisu changed the title (削除) PHPC-1805: Implement ServerDescription class and add to monitoring ev... (削除ここまで) (追記) PHPC-1805 and PHPC-1849: Implement ServerDescription class and Server::getServerDescription() (追記ここまで) Jul 28, 2021
@jmikola jmikola changed the base branch from master to feature/sdam-monitoring July 29, 2021 14:40
Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

Some comments on the code. I'll get to the tests afterwards when those points are addressed and I run this locally.

Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

Should be good to go after this round of feedback is addressed.

Copy link
Member

@jmikola jmikola Jul 30, 2021
edited
Loading

Choose a reason for hiding this comment

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

For consistency we should declare all variables at the top of the scope. Perhaps you don't see this using clang on macOS, but I get the following error compiling with GCC:

src/MongoDB/ServerDescription.c: In function ‘zim_ServerDescription_getHelloResponse’:
src/MongoDB/ServerDescription.c:44:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

Note that newer C standards would permit this (see: https://stackoverflow.com/q/8474100).


I'm not sure why this wasn't caught by CI. Looking at the build status for the PR, only AppVeyor (Windows) appears to have run on the most recent iteration.

tanlisu reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

IIRC, this is only needed if the test is going to read/write data. Since you're just selecting a server here, we don't need to concern ourselves with the collection under test being empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, the same SKIPIF is included in server-debug.phpt - should I make a ticket to remove that?

Copy link
Member

Choose a reason for hiding this comment

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

You can just edit the file in GitHub and generate a PR (instead of directly committing). I don't think we need to track that with a ticket.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Same comment as #1242 (comment)

I was only suggesting that skip_if_not_clean be removed.

tanlisu reacted with thumbs up emoji
Copy link
Member

jmikola commented Jul 30, 2021

I'm not sure why this wasn't caught by CI. Looking at the build status for the PR, only AppVeyor (Windows) appears to have run on the most recent iteration.

I think this is due to the GitHub CI config only expecting certain branches for PRs (see: tests.yml). I just addressed that in 69cc2b5 and merged it into the feature/sdam-monitoring branch. Please rebase and force-push this again to try and trigger a CI build.

The Evergreen config likely has something similar, but it's less flexible as I think we'd need an entirely different project created just for the feature branch. We can do without that for now.

tanlisu reacted with thumbs up emoji

Copy link
Contributor Author

tanlisu commented Jul 30, 2021

I rebased on the feature/sdam-monitoring branch but I think the GitHub CI is still missing the Coding Standards test.

Copy link
Member

jmikola commented Jul 30, 2021

I rebased on the feature/sdam-monitoring branch but I think the GitHub CI is still missing the Coding Standards test.

I didn't realize we had multiple YML configs. Fixed in f3bf5a3 and just merged into the feature branch.

tanlisu reacted with thumbs up emoji

tanlisu and others added 4 commits July 30, 2021 15:57
tanlisu and others added 17 commits July 30, 2021 15:57
This partially reverts commit 27dde83 due to build failures.
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
@jmikola jmikola changed the title (削除) PHPC-1805 and PHPC-1849: Implement ServerDescription class and Server::getServerDescription() (削除ここまで) (追記) PHPC-1805 and PHPC-1910: Implement ServerDescription class and Server::getServerDescription() (追記ここまで) Jul 30, 2021
Copy link
Member

jmikola commented Jul 30, 2021

The PR description had a reference to PHPC-1849, which I think was incorrect. I changed that to PHPC-1910.

Also, one of the commits says "Implement ServerDescription class and add to monitoring events". Since this PR didn't actually integrate anything with the APM events please make sure that's removed from the message when merging. In fact, I'm not sure any of the individual commit messages need to be kept when squashing, since they don't have any relevance beyond the code review. The PR title sufficiently describes everything in this case.

tanlisu reacted with thumbs up emoji

@tanlisu tanlisu merged commit 693e264 into mongodb:feature/sdam-monitoring Jul 30, 2021
jmikola added a commit to jmikola/mongo-php-driver that referenced this pull request Aug 17, 2021
...::getServerDescription() (mongodb#1239)
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
jmikola added a commit that referenced this pull request Nov 3, 2021
...::getServerDescription() (#1239)
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
jmikola added a commit that referenced this pull request Dec 30, 2021
...::getServerDescription() (#1239)
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
jmikola added a commit that referenced this pull request Jan 5, 2022
...::getServerDescription() (#1239)
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
jmikola added a commit to jmikola/mongo-php-driver that referenced this pull request Jan 10, 2022
...::getServerDescription() (mongodb#1239)
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@alcaeus alcaeus alcaeus left review comments

@jmikola jmikola jmikola approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /