Skip to content

Conversation

@abr-egn
Copy link
Contributor

@abr-egn abr-egn commented Oct 16, 2024

This is preliminary to RUST-2000, which will need this kind of observability. (And we probably should have been doing it from the start anyway.)

}

#[cfg(test)]
pub(crate) static METADATA: std::sync::OnceLock<ClientMetadata> = std::sync::OnceLock::new();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This gives me the heebie-jeebies but since it's explicitly test-restricted and a lot less disruptive than trying to propagate the computed metadata back up the ownership/worker hierarchy it seemed the less-bad option.

@abr-egn abr-egn marked this pull request as ready for review October 16, 2024 18:40
@abr-egn
Copy link
Contributor Author

abr-egn commented Oct 17, 2024

evergreen retry

}

#[cfg(test)]
#[allow(clippy::incompatible_msrv)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be fine since we only test on the latest release and cfg(test) isn't transitive, so someone using <1.70 (when OnceLock was introduced) can still use the mongodb crate fine, including in their tests.

@abr-egn abr-egn merged commit e1f5889 into mongodb:main Oct 18, 2024
15 checks passed
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.

2 participants