Skip to content

Commit

Permalink
feat: Use v8 for Loader by default for new projects (#75818)
Browse files Browse the repository at this point in the history
This PR removes the loader-v8 feature flag, instead enabling this for
all orgs. It also adds a new epoch, so that new projects will get v8 by
default for the loader. v7 remains selectable for them.

closes getsentry/sentry-javascript#12187
  • Loading branch information
mydea authored Aug 12, 2024
1 parent ac61e5f commit 8ef7198
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ def register_temporary_features(manager: FeatureManager):
manager.add("organizations:issue-search-snuba", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable the new issue stream search bar UI
manager.add("organizations:issue-stream-search-query-builder", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable v8 support for the Loader Script
manager.add("organizations:js-sdk-loader-v8", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
manager.add("organizations:large-debug-files", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, api_expose=False)
# Enabled latest adopted release filter for issue alerts
manager.add("organizations:latest-adopted-release-filter", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
Expand Down
8 changes: 1 addition & 7 deletions src/sentry/loader/browsersdkversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from packaging.version import Version

import sentry
from sentry import features

logger = logging.getLogger("sentry")

Expand Down Expand Up @@ -98,9 +97,4 @@ def get_default_sdk_version_for_project(project):


def get_available_sdk_versions_for_project(project):
versions = project.get_option("sentry:loader_available_sdk_versions")

if features.has("organizations:js-sdk-loader-v8", project.organization, actor=None):
return ["8.x"] + versions

return versions
return project.get_option("sentry:loader_available_sdk_versions")
8 changes: 4 additions & 4 deletions src/sentry/projectoptions/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This controls what sentry:option-epoch value is given to a project when it is created
# The epoch of a project will determine what options are valid options for that specific project
LATEST_EPOCH = 12
LATEST_EPOCH = 13

# grouping related configs
#
Expand Down Expand Up @@ -51,7 +51,8 @@
# is expected to be never set but the epoch defaults are used if no
# version is set on a project's DSN.
register(
key="sentry:default_loader_version", epoch_defaults={1: "4.x", 2: "5.x", 7: "6.x", 8: "7.x"}
key="sentry:default_loader_version",
epoch_defaults={1: "4.x", 2: "5.x", 7: "6.x", 8: "7.x", 13: "8.x"},
)

# Default symbol sources. The ios source does not exist by default and
Expand Down Expand Up @@ -179,8 +180,7 @@
)

# The available loader SDK versions
# todo: v8 add version
register(
key="sentry:loader_available_sdk_versions",
epoch_defaults={1: ["7.x", "6.x", "5.x", "4.x"], 11: ["7.x"]},
epoch_defaults={1: ["8.x", "7.x", "6.x", "5.x", "4.x"], 11: ["8.x", "7.x"]},
)

0 comments on commit 8ef7198

Please sign in to comment.