mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: remove IndustryType and OrgSize from FirstUserOnboarding telemetry (#24018)
New `IndustryType` and `OrgSize` enums were added in #23989, but they are no longer desired in the onboarding/marketing telemetry data. This removes them. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
8369fa88fd
commit
2a1bef18e0
Generated
-95
@@ -14586,29 +14586,6 @@ const docTemplate = `{
|
||||
"codersdk.CreateFirstUserOnboardingInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"industry_type": {
|
||||
"enum": [
|
||||
"Technology",
|
||||
"Financial Services",
|
||||
"Healthcare",
|
||||
"Government",
|
||||
"Education",
|
||||
"Retail",
|
||||
"Manufacturing",
|
||||
"Media",
|
||||
"Telecom",
|
||||
"Energy",
|
||||
"Transportation",
|
||||
"Consulting",
|
||||
"Non-Profit",
|
||||
"Other"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.IndustryType"
|
||||
}
|
||||
]
|
||||
},
|
||||
"is_business": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -14617,22 +14594,6 @@ const docTemplate = `{
|
||||
},
|
||||
"newsletter_releases": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"org_size": {
|
||||
"enum": [
|
||||
"Just me",
|
||||
"2-10",
|
||||
"11-50",
|
||||
"51-200",
|
||||
"201-1000",
|
||||
"1001-5000",
|
||||
"5000+"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.OrgSizeRange"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -16504,41 +16465,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.IndustryType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Technology",
|
||||
"Financial Services",
|
||||
"Healthcare",
|
||||
"Government",
|
||||
"Education",
|
||||
"Retail",
|
||||
"Manufacturing",
|
||||
"Media",
|
||||
"Telecom",
|
||||
"Energy",
|
||||
"Transportation",
|
||||
"Consulting",
|
||||
"Non-Profit",
|
||||
"Other"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"IndustryTypeTechnology",
|
||||
"IndustryTypeFinancial",
|
||||
"IndustryTypeHealthcare",
|
||||
"IndustryTypeGovernment",
|
||||
"IndustryTypeEducation",
|
||||
"IndustryTypeRetail",
|
||||
"IndustryTypeManufacturing",
|
||||
"IndustryTypeMedia",
|
||||
"IndustryTypeTelecom",
|
||||
"IndustryTypeEnergy",
|
||||
"IndustryTypeTransportation",
|
||||
"IndustryTypeConsulting",
|
||||
"IndustryTypeNonProfit",
|
||||
"IndustryTypeOther"
|
||||
]
|
||||
},
|
||||
"codersdk.InsightsReportInterval": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -17725,27 +17651,6 @@ const docTemplate = `{
|
||||
"OptionTypeListString"
|
||||
]
|
||||
},
|
||||
"codersdk.OrgSizeRange": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Just me",
|
||||
"2-10",
|
||||
"11-50",
|
||||
"51-200",
|
||||
"201-1000",
|
||||
"1001-5000",
|
||||
"5000+"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"OrgSizeRangeJustMe",
|
||||
"OrgSizeRange2To10",
|
||||
"OrgSizeRange11To50",
|
||||
"OrgSizeRange51To200",
|
||||
"OrgSizeRange201To1K",
|
||||
"OrgSizeRange1KTo5K",
|
||||
"OrgSizeRange5KPlus"
|
||||
]
|
||||
},
|
||||
"codersdk.Organization": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Generated
-95
@@ -13126,29 +13126,6 @@
|
||||
"codersdk.CreateFirstUserOnboardingInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"industry_type": {
|
||||
"enum": [
|
||||
"Technology",
|
||||
"Financial Services",
|
||||
"Healthcare",
|
||||
"Government",
|
||||
"Education",
|
||||
"Retail",
|
||||
"Manufacturing",
|
||||
"Media",
|
||||
"Telecom",
|
||||
"Energy",
|
||||
"Transportation",
|
||||
"Consulting",
|
||||
"Non-Profit",
|
||||
"Other"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.IndustryType"
|
||||
}
|
||||
]
|
||||
},
|
||||
"is_business": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -13157,22 +13134,6 @@
|
||||
},
|
||||
"newsletter_releases": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"org_size": {
|
||||
"enum": [
|
||||
"Just me",
|
||||
"2-10",
|
||||
"11-50",
|
||||
"51-200",
|
||||
"201-1000",
|
||||
"1001-5000",
|
||||
"5000+"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.OrgSizeRange"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -14988,41 +14949,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.IndustryType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Technology",
|
||||
"Financial Services",
|
||||
"Healthcare",
|
||||
"Government",
|
||||
"Education",
|
||||
"Retail",
|
||||
"Manufacturing",
|
||||
"Media",
|
||||
"Telecom",
|
||||
"Energy",
|
||||
"Transportation",
|
||||
"Consulting",
|
||||
"Non-Profit",
|
||||
"Other"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"IndustryTypeTechnology",
|
||||
"IndustryTypeFinancial",
|
||||
"IndustryTypeHealthcare",
|
||||
"IndustryTypeGovernment",
|
||||
"IndustryTypeEducation",
|
||||
"IndustryTypeRetail",
|
||||
"IndustryTypeManufacturing",
|
||||
"IndustryTypeMedia",
|
||||
"IndustryTypeTelecom",
|
||||
"IndustryTypeEnergy",
|
||||
"IndustryTypeTransportation",
|
||||
"IndustryTypeConsulting",
|
||||
"IndustryTypeNonProfit",
|
||||
"IndustryTypeOther"
|
||||
]
|
||||
},
|
||||
"codersdk.InsightsReportInterval": {
|
||||
"type": "string",
|
||||
"enum": ["day", "week"],
|
||||
@@ -16147,27 +16073,6 @@
|
||||
"OptionTypeListString"
|
||||
]
|
||||
},
|
||||
"codersdk.OrgSizeRange": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Just me",
|
||||
"2-10",
|
||||
"11-50",
|
||||
"51-200",
|
||||
"201-1000",
|
||||
"1001-5000",
|
||||
"5000+"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"OrgSizeRangeJustMe",
|
||||
"OrgSizeRange2To10",
|
||||
"OrgSizeRange11To50",
|
||||
"OrgSizeRange51To200",
|
||||
"OrgSizeRange201To1K",
|
||||
"OrgSizeRange1KTo5K",
|
||||
"OrgSizeRange5KPlus"
|
||||
]
|
||||
},
|
||||
"codersdk.Organization": {
|
||||
"type": "object",
|
||||
"required": ["created_at", "id", "is_default", "updated_at"],
|
||||
|
||||
@@ -1557,11 +1557,9 @@ type User struct {
|
||||
// once when the first user is created. Pointer fields distinguish an
|
||||
// explicit answer from a skipped question.
|
||||
type FirstUserOnboarding struct {
|
||||
IsBusiness *bool `json:"is_business"`
|
||||
IndustryType string `json:"industry_type"`
|
||||
OrgSize string `json:"org_size"`
|
||||
NewsletterMarketing *bool `json:"newsletter_marketing"`
|
||||
NewsletterReleases *bool `json:"newsletter_releases"`
|
||||
IsBusiness *bool `json:"is_business"`
|
||||
NewsletterMarketing *bool `json:"newsletter_marketing"`
|
||||
NewsletterReleases *bool `json:"newsletter_releases"`
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
|
||||
@@ -292,8 +292,6 @@ func (api *API) postFirstUser(rw http.ResponseWriter, r *http.Request) {
|
||||
if createUser.OnboardingInfo != nil {
|
||||
onboarding = &telemetry.FirstUserOnboarding{
|
||||
IsBusiness: createUser.OnboardingInfo.IsBusiness,
|
||||
IndustryType: string(createUser.OnboardingInfo.IndustryType),
|
||||
OrgSize: string(createUser.OnboardingInfo.OrgSize),
|
||||
NewsletterMarketing: createUser.OnboardingInfo.NewsletterMarketing,
|
||||
NewsletterReleases: createUser.OnboardingInfo.NewsletterReleases,
|
||||
}
|
||||
|
||||
@@ -137,8 +137,6 @@ func TestFirstUser_OnboardingTelemetry(t *testing.T) {
|
||||
Password: "SomeSecurePassword!",
|
||||
OnboardingInfo: &codersdk.CreateFirstUserOnboardingInfo{
|
||||
IsBusiness: &isBusiness,
|
||||
IndustryType: codersdk.IndustryTypeTechnology,
|
||||
OrgSize: codersdk.OrgSizeRange51To200,
|
||||
NewsletterMarketing: &wantMarketing,
|
||||
NewsletterReleases: &wantReleases,
|
||||
},
|
||||
@@ -149,8 +147,6 @@ func TestFirstUser_OnboardingTelemetry(t *testing.T) {
|
||||
require.NotNil(t, snapshot.FirstUserOnboarding)
|
||||
require.NotNil(t, snapshot.FirstUserOnboarding.IsBusiness)
|
||||
require.True(t, *snapshot.FirstUserOnboarding.IsBusiness)
|
||||
require.Equal(t, string(codersdk.IndustryTypeTechnology), snapshot.FirstUserOnboarding.IndustryType)
|
||||
require.Equal(t, string(codersdk.OrgSizeRange51To200), snapshot.FirstUserOnboarding.OrgSize)
|
||||
require.NotNil(t, snapshot.FirstUserOnboarding.NewsletterMarketing)
|
||||
require.False(t, *snapshot.FirstUserOnboarding.NewsletterMarketing)
|
||||
require.NotNil(t, snapshot.FirstUserOnboarding.NewsletterReleases)
|
||||
@@ -198,8 +194,6 @@ func TestFirstUser_OnboardingTelemetry(t *testing.T) {
|
||||
"nil *bool must stay nil, not become false")
|
||||
require.Nil(t, snapshot.FirstUserOnboarding.NewsletterMarketing)
|
||||
require.Nil(t, snapshot.FirstUserOnboarding.NewsletterReleases)
|
||||
require.Empty(t, snapshot.FirstUserOnboarding.IndustryType)
|
||||
require.Empty(t, snapshot.FirstUserOnboarding.OrgSize)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user