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

Decommissioning PostgreSQL database #21374

Closed
Tracked by #21925 ...
ibuziuk opened this issue May 5, 2022 · 8 comments
Closed
Tracked by #21925 ...

Decommissioning PostgreSQL database #21374

ibuziuk opened this issue May 5, 2022 · 8 comments
Assignees
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. kind/technical-debt Technical debt issue new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system. sprint/current status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording
Milestone

Comments

@ibuziuk
Copy link
Member

ibuziuk commented May 5, 2022

Is your task related to a problem? Please describe

PostgreSQL database does not store relevant data anymore. Whereas some of the date might still be used the vast majority of it is either irrelevant or outdated e.g. #21168 (comment)
After the keycloak deprecation, the next logical step is the deprecation of the PostgreSQL database.

Describe the solution you'd like

Decommissioning PostgreSQL database completely from Eclipse Che codebase. We need to figure out which relations are still in use and have a clear plan for database removal:

                            List of relations
 Schema |                      Name                       | Type  | Owner 
--------+-------------------------------------------------+-------+-------
 public | account                                         | table | pgche
 public | che_factory                                     | table | pgche
 public | che_factory_action                              | table | pgche
 public | che_factory_action_properties                   | table | pgche
 public | che_factory_ide                                 | table | pgche
 public | che_factory_on_app_closed_action                | table | pgche
 public | che_factory_on_app_closed_action_value          | table | pgche
 public | che_factory_on_app_loaded_action                | table | pgche
 public | che_factory_on_app_loaded_action_value          | table | pgche
 public | che_factory_on_projects_loaded_action           | table | pgche
 public | che_factory_on_projects_loaded_action_value     | table | pgche
 public | che_free_resources_limit                        | table | pgche
 public | che_free_resources_limit_resource               | table | pgche
 public | che_k8s_machine                                 | table | pgche
 public | che_k8s_machine_attributes                      | table | pgche
 public | che_k8s_runtime                                 | table | pgche
 public | che_k8s_server                                  | table | pgche
 public | che_k8s_server_attributes                       | table | pgche
 public | che_member                                      | table | pgche
 public | che_member_actions                              | table | pgche
 public | che_organization                                | table | pgche
 public | che_organization_distributed_resources          | table | pgche
 public | che_organization_distributed_resources_resource | table | pgche
 public | che_resource                                    | table | pgche
 public | che_sign_key                                    | table | pgche
 public | che_sign_key_pair                               | table | pgche
 public | che_system_permissions                          | table | pgche
 public | che_system_permissions_actions                  | table | pgche
 public | che_userdevfile_permissions                     | table | pgche
 public | che_userdevfile_permissions_actions             | table | pgche
 public | che_worker                                      | table | pgche
 public | che_worker_actions                              | table | pgche
 public | che_workspace_activity                          | table | pgche
 public | che_workspace_cfg_attributes                    | table | pgche
 public | command                                         | table | pgche
 public | command_attributes                              | table | pgche
 public | devfile                                         | table | pgche
 public | devfile_action                                  | table | pgche
 public | devfile_attributes                              | table | pgche
 public | devfile_command                                 | table | pgche
 public | devfile_command_attributes                      | table | pgche
 public | devfile_component                               | table | pgche
 public | devfile_component_arg                           | table | pgche
 public | devfile_component_command                       | table | pgche
 public | devfile_component_preferences                   | table | pgche
 public | devfile_component_selector                      | table | pgche
 public | devfile_endpoint                                | table | pgche
 public | devfile_endpoint_attributes                     | table | pgche
 public | devfile_entrypoint                              | table | pgche
 public | devfile_entrypoint_arg                          | table | pgche
 public | devfile_entrypoint_commands                     | table | pgche
 public | devfile_entrypoint_selector                     | table | pgche
 public | devfile_env                                     | table | pgche
 public | devfile_project                                 | table | pgche
 public | devfile_volume                                  | table | pgche
 public | environment                                     | table | pgche
 public | externalmachine                                 | table | pgche
 public | externalmachine_attributes                      | table | pgche
 public | externalmachine_env                             | table | pgche
 public | k8s_runtime_command                             | table | pgche
 public | k8s_runtime_command_attributes                  | table | pgche
 public | machine_volume                                  | table | pgche
 public | preference                                      | table | pgche
 public | preference_preferences                          | table | pgche
 public | profile                                         | table | pgche
 public | profile_attributes                              | table | pgche
 public | projectattribute                                | table | pgche
 public | projectattribute_values                         | table | pgche
 public | projectconfig                                   | table | pgche
 public | projectconfig_mixins                            | table | pgche
 public | schema_version                                  | table | pgche
 public | sequence                                        | table | pgche
 public | serverconf                                      | table | pgche
 public | serverconf_attributes                           | table | pgche
 public | serverconf_properties                           | table | pgche
 public | sourcestorage                                   | table | pgche
 public | sourcestorage_parameters                        | table | pgche
 public | sshkeypair                                      | table | pgche
 public | user_aliases                                    | table | pgche
 public | userdevfile                                     | table | pgche
 public | usr                                             | table | pgche
 public | workspace                                       | table | pgche
 public | workspace_attributes                            | table | pgche
 public | workspaceconfig                                 | table | pgche
(84 rows)                     Name                       | Type  | Owner 

Describe alternatives you've considered

N/A

Additional context

Additional motivation for removing db is the fact that users are deprovioned every 30 days according to the TOS on Developer Sandbox, and during the de-provioning toolchain needs to explicitly cleanup the users entries from the Eclipse Che db. In the latest version of Eclipse Che we need to let OpenShift handle the user management instead.

In general, once decommissioned it will be much less codebase to support and -1 operand to manage.

@ibuziuk ibuziuk added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. area/che-server kind/technical-debt Technical debt issue labels May 5, 2022
@l0rd
Copy link
Contributor

l0rd commented May 5, 2022

Duplicate #21183?

@ibuziuk
Copy link
Member Author

ibuziuk commented May 5, 2022

yeah, we can either close the original or add the details to it ;-)

@ibuziuk
Copy link
Member Author

ibuziuk commented Dec 12, 2022

PR for the first phase of decommissioning eclipse-che/che-server#398
once merged, all the data stored in the db would become inconsistent and irrelevant.
the second phase would be removing Postgres operand completely

@l0rd
Copy link
Contributor

l0rd commented Dec 13, 2022

Can we add switching to rolling update deployment strategy for che-server as a subtask of this issue?

@ibuziuk
Copy link
Member Author

ibuziuk commented Jan 9, 2023

we probably can track it separately as part of #7662 - verify and switch to rolling update once db is decommissioned. The current issue looks like a pre-req, not a sub-task for the roling update epic

@ibuziuk
Copy link
Member Author

ibuziuk commented Mar 1, 2023

Waiting for the final docs PR to be merged before resolving the issue eclipse-che/che-docs#2561

@l0rd l0rd added new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording labels Mar 2, 2023
@l0rd l0rd added this to the 7.62 milestone Mar 2, 2023
@ibuziuk
Copy link
Member Author

ibuziuk commented Mar 3, 2023

Docs PR has been merged. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. kind/technical-debt Technical debt issue new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system. sprint/current status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording
Projects
None yet
Development

No branches or pull requests

3 participants