- Notifications
You must be signed in to change notification settings - Fork911
chore: cherry-pick items for 2.19#16412
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Addressescoder/internal#317.## ChangesRequirements are quoted below:> how many orgs does deployment haveAdds the Organization entity to telemetry.> ensuring resources are associated with orgsAll resources that reference an org already report the org id totelemetry. Adds a test to check that.> whether org sync is configuredAdds the `IDPOrgSync` boolean field to the Deployment entity.## Implementation of the org sync checkWhile there's an `OrganizationSyncEnabled` method on the IDPSyncinterface, I decided not to use it directly and implemented acounterpart just for telemetry purposes. It's a compromise I'm not happyabout, but I found that it's a simpler approach than the alternative.There are multiple reasons:1. The telemetry package cannot statically access the IDPSync interfacedue to a circular import.2. We can't dynamically pass a reference to the`OrganizationSyncEnabled` function at the time of instantiating thetelemetry object, because our server initialization logic depends on thetelemetry object being created before the IDPSync object.3. If we circumvent that problem by passing the reference as aninitially empty pointer, initializing telemetry, then IDPSync, thenupdating the pointer to point to `OrganizationSyncEnabled`, we have torefactor the initialization logic of the telemetry object itself toavoid a race condition where the first telemetry report is performedwithout a valid reference.I actually implemented that approach in#16307, but realized I'm unable tofully test it. It changed the initialization order in the servercommand, and I wanted to test our CLI with Org Sync configured with apremium license. As far as I'm aware, we don't have the tooling to dothat. I couldn't figure out a way to start the CLI with a mock license,and I didn't want to go down further into the refactoring rabbit hole.So I decided that reimplementing the org sync checking logic is simpler.(cherry picked from commit92d22e2)
Closescoder/internal#323This PR adds an `email` field to the `data.owner` payload for workspacecreated and workspace manually updated notifications, as well as useraccount created/activated/suspended.(cherry picked from commitf651ab9)
Addressescoder/nexus#175.## Changes- Adds the `telemetry_items` database table. It's a key value store fortelemetry events that don't fit any other database tables.- Adds a telemetry report when HTML is served for the first time in`site.go`.(cherry picked from commit2ace044)
(cherry picked from commit2371153)
(cherry picked from commit0e2ae10)
Addressescoder/nexus#116.## Core ConceptSend one final telemetry report after the user disables telemetry withthe message that the telemetry was disabled. No other information aboutthe deployment is sent in this report.This final report is submitted only if the deployment ever had telemetryon.## Changes1. Refactored how our telemetry is initialized.2. Introduced the `TelemetryEnabled` telemetry item, which allows todecide whether a final report should be sent.3. Added the `RecordTelemetryStatus` telemetry method, which decideswhether a final report should be sent and updates the telemetry item.4. Added tests to ensure the implementation is correct.(cherry picked from commita68d115)
aslilac approved these changesFeb 3, 2025
a9775fa
intorelease/2.19 32 of 34 checks passed
Uh oh!
There was an error while loading.Please reload this page.
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partial updates API for Orgs