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

Hubs/Scopes Merge 2 - Replace IHub with IScopes in core #3298

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Apr 2, 2024

#skip-changelog

📜 Description

Follow up for #3297 changing core.

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@adinauer adinauer changed the base branch from main to feat/hsm-1-introduce-iscopes April 2, 2024 12:13
Copy link
Contributor

github-actions bot commented Apr 2, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against ce3c14f

@adinauer adinauer changed the title Replace IHub with IScopes in core Hubs/Scopes Merge 2 - Replace IHub with IScopes in core Apr 2, 2024
@adinauer adinauer marked this pull request as ready for review April 2, 2024 12:25
Copy link
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

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

Highlighted some leftover references to Hub on comments and messages.
Otherwise LGTM 👍

super(hub, logger, flushTimeoutMillis, maxQueueSize);
this.hub = Objects.requireNonNull(hub, "Hub is required.");
super(scopes, logger, flushTimeoutMillis, maxQueueSize);
this.scopes = Objects.requireNonNull(scopes, "Hub is required.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Message should refer to Scopes rather than Hub

final @NotNull IHub hub, final @NotNull SentryOptions options) {
Objects.requireNonNull(hub, "Hub is required");
final @NotNull IScopes scopes, final @NotNull SentryOptions options) {
Objects.requireNonNull(scopes, "Hub is required");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Message should refer to Scopes rather than Hub

@@ -54,7 +54,7 @@ public final void register(final @NotNull IHub hub, final @NotNull SentryOptions
}
registered = true;

this.hub = Objects.requireNonNull(hub, "Hub is required");
this.scopes = Objects.requireNonNull(scopes, "Hub is required");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Message should refer to Scopes rather than Hub

@@ -2098,7 +2098,7 @@ class HubTest {

private val dsnTest = "https://key@sentry.io/proj"

private fun generateHub(optionsConfiguration: Sentry.OptionsConfiguration<SentryOptions>? = null): IHub {
private fun generateHub(optionsConfiguration: Sentry.OptionsConfiguration<SentryOptions>? = null): IScopes {
Copy link
Member

Choose a reason for hiding this comment

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

let's rename it to generateScopes?

Copy link
Member Author

Choose a reason for hiding this comment

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

We need to create ScopesTest as a replacement for HubTest and thus don't need to change "hub" in HubTest as it's going to be removed anyways. Same should be true for Hub.

Base automatically changed from feat/hsm-1-introduce-iscopes to 8.x.x April 16, 2024 13:25
@adinauer adinauer merged commit ca5593e into 8.x.x Apr 16, 2024
11 of 30 checks passed
@adinauer adinauer deleted the feat/hsm-2-replacements-in-core branch April 16, 2024 14:37
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.

4 participants