-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add __include_in_export__ support for any models needed for first-pass of relocation #172
Closed
Tracked by
#153
Comments
azaslavsky
added a commit
to getsentry/sentry
that referenced
this issue
Aug 30, 2023
Basically, we went from this (https://tinyurl.com/5c5cd5sf, note the dangling grey boxes), to this (https://tinyurl.com/4wnb9huu). Specifically, the following changes are included in this PR: - We now include `Integration`, `OrganizationIntegration`, and `ProjectIntegration` as `Global` scoped exports. This is because a number of other models we already include, like `NotificationAction` and its derivatives, depend on `Integration`s. This is no longer a dangling dependency. - Similarly, `SentryAppInstallation` depends on `ApiGrant`, so that is included in the `Global` scope as well. - `MonitorEnvironment` and `MonitorLocation` are removed, since the only model that references them, `NonitorCheckIn`, is not included in the export already. - `Repository` depends on `Integration`-derived models, and is therefor switched into the `Global` scope. Issue: getsentry/team-ospo#172
azaslavsky
added a commit
to getsentry/sentry
that referenced
this issue
Aug 30, 2023
Prior to this change, we used the `save()` method from the Django serializer. But this is a "raw" save - it performs no validaion, and triggers no signals. Instead, we now use the re-hydrated model's own save method, which does perform these actions. Because of this, a few tests have had to change to account for signal triggering. In particular, `User`, `Organization`, and `Project` writes now auto-create some models, so we account for this in tests as well. Issue: getsentry/team-ospo#172
azaslavsky
added a commit
to getsentry/sentry
that referenced
this issue
Aug 31, 2023
Basically, we went from this (https://tinyurl.com/5c5cd5sf, note the dangling grey boxes), to this (https://tinyurl.com/4wnb9huu). Specifically, the following changes are included in this PR: - We now include `Integration`, `OrganizationIntegration`, and `ProjectIntegration` as `Global` scoped exports. This is because a number of other models we already include, like `NotificationAction` and its derivatives, depend on `Integration`s. This is no longer a dangling dependency. - Similarly, `SentryAppInstallation` depends on `ApiGrant`, so that is included in the `Global` scope as well. - `MonitorEnvironment` and `MonitorLocation` are removed, since the only model that references them, `NonitorCheckIn`, is not included in the export already. - `Repository` depends on `Integration`-derived models, and is therefor switched into the `Global` scope. Issue: getsentry/team-ospo#172
azaslavsky
added a commit
to getsentry/sentry
that referenced
this issue
Aug 31, 2023
Basically, we went from this (https://tinyurl.com/5c5cd5sf, note the dangling grey boxes), to this (https://tinyurl.com/4wnb9huu). Specifically, the following changes are included in this PR: - We now include `Integration`, `OrganizationIntegration`, and `ProjectIntegration` as `Global` scoped exports. This is because a number of other models we already include, like `NotificationAction` and its derivatives, depend on `Integration`s. This is no longer a dangling dependency. - Similarly, `SentryAppInstallation` depends on `ApiGrant`, so that is included in the `Global` scope as well. - `MonitorEnvironment` and `MonitorLocation` are removed, since the only model that references them, `NonitorCheckIn`, is not included in the export already. - `Repository` depends on `Integration`-derived models, and is therefore switched into the `Global` scope. - `Authenticator` only makes sense to import for self-hosted restores, and is therefore sanitized out of non `Global` imports. - `AuthIdentity` and `AuthProvider` similarly aren't portable between self-hosted and SaaS, so are moved into the `Global` scope as well. Issue: getsentry/team-ospo#172
azaslavsky
added a commit
to getsentry/sentry
that referenced
this issue
Aug 31, 2023
Prior to this change, we used the `save()` method from the Django serializer. But this is a "raw" save - it performs no validaion, and triggers no signals. Instead, we now use the re-hydrated model's own save method, which does perform these actions. Because of this, a few tests have had to change to account for signal triggering. In particular, `User`, `Organization`, and `Project` writes now auto-create some models, so we account for this in tests as well. Issue: getsentry/team-ospo#172
azaslavsky
added a commit
to getsentry/sentry
that referenced
this issue
Sep 1, 2023
Basically, we went from this (https://tinyurl.com/5c5cd5sf, note the dangling grey boxes), to this (https://tinyurl.com/4wnb9huu). Specifically, the following changes are included in this PR: - We now include `Integration`, `OrganizationIntegration`, and `ProjectIntegration` as `Global` scoped exports. This is because a number of other models we already include, like `NotificationAction` and its derivatives, depend on `Integration`s. This is no longer a dangling dependency. - Similarly, `SentryAppInstallation` depends on `ApiGrant`, so that is included in the `Global` scope as well. - `MonitorEnvironment` and `MonitorLocation` are removed, since the only model that references them, `NonitorCheckIn`, is not included in the export already. - `Repository` depends on `Integration`-derived models, and is therefore switched into the `Global` scope. - `Authenticator` only makes sense to import for self-hosted restores, and is therefore sanitized out of non `Global` imports. - `AuthIdentity` and `AuthProvider` similarly aren't portable between self-hosted and SaaS, so are moved into the `Global` scope as well. Closes getsentry/team-ospo#172
azaslavsky
added a commit
to getsentry/sentry
that referenced
this issue
Sep 1, 2023
Prior to this change, we used the `save()` method from the Django serializer. But this is a "raw" save - it performs no validaion, and triggers no signals. Instead, we now use the re-hydrated model's own save method, which does perform these actions. Because of this, a few tests have had to change to account for signal triggering. In particular, `User`, `Organization`, and `Project` writes now auto-create some models, so we account for this in tests as well. Issue: getsentry/team-ospo#172
EricHasegawa
pushed a commit
to getsentry/sentry
that referenced
this issue
Sep 6, 2023
Basically, we went from this (https://tinyurl.com/5c5cd5sf, note the dangling grey boxes), to this (https://tinyurl.com/4wnb9huu). Specifically, the following changes are included in this PR: - We now include `Integration`, `OrganizationIntegration`, and `ProjectIntegration` as `Global` scoped exports. This is because a number of other models we already include, like `NotificationAction` and its derivatives, depend on `Integration`s. This is no longer a dangling dependency. - Similarly, `SentryAppInstallation` depends on `ApiGrant`, so that is included in the `Global` scope as well. - `MonitorEnvironment` and `MonitorLocation` are removed, since the only model that references them, `NonitorCheckIn`, is not included in the export already. - `Repository` depends on `Integration`-derived models, and is therefore switched into the `Global` scope. - `Authenticator` only makes sense to import for self-hosted restores, and is therefore sanitized out of non `Global` imports. - `AuthIdentity` and `AuthProvider` similarly aren't portable between self-hosted and SaaS, so are moved into the `Global` scope as well. Closes getsentry/team-ospo#172
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: