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

feat: migrate storages_v2 to data_connectors #422

Merged

Conversation

leafty
Copy link
Member

@leafty leafty commented Sep 23, 2024

Merging into leafty/build-data-connectors (feature branch).

Add a background job to migrate "Data Sources" (/storages_v2) to "Data Connectors" (/data_connectors). Each storage item has a new data connector created and linked to the source project.

See for manual testing: SwissDataScienceCenter/renku#3797
Logs from migration job:

INFO:background_jobs.migrate_storages_v2_to_data_connectors:Migrating 6 cloud storage v2 items to data connectors.
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Migrated giab-1 to flora.thiebaut/giab-1.
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Deleted storage_v2: 01J9KGAW3V27VERY7S7W71VX7D
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Migrated giab-1 to flora.thiebaut/giab-1-uv38rbtp.
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Deleted storage_v2: 01J9KGBPRVS1RWYMMYGKEZ8VVW
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Migrated giab-2 to flora.thiebaut/giab-2.
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Deleted storage_v2: 01J9KGC5549CHKFKKX3W7XYQVT
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Migrated giab-group to group-test-1/giab-group.
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Deleted storage_v2: 01J9KGDH5108975M95HXK228ED
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Migrated giab-group to group-test-1/giab-group-5hph7nxd.
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Deleted storage_v2: 01J9KGEF9XXBNPMP17NKZR0SD1
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Migrated giab to group-test-2/giab.
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Deleted storage_v2: 01J9KGHFAVT6KECE6WQE40XHR9
INFO:background_jobs.migrate_storages_v2_to_data_connectors:Migrated 6/6 data connectors.

Moves the `project_slugs` table to `entity_slugs` and `project_slugs_old` to `entity_slugs_old`. This is done to prepare for more entity types to be namespaced.

Note: the sequence migration has been tested:
1. Force migration revision to be `9058bf0a1a12` (before this).
2. Deploy with image tag `renku/renku-data-service:sha-345a1bb` (current `main`) and run `alembic check` and `alembic heads` to verify the DB is before this change.
3. Create some projects.
4. Re-deploy this PR and check that migration revision is `a11752a5afba` (after this).
5. Create more projects.
Introduce namespaced data connectors for Renku 2.0.

Details:
* Remove API routes for `/storages_v2`
* Add API routes for `/data_connectors`
* Add `data_connectors` table
* Drop the `storage_secrets` table
* Add `data_connectors_secrets` table
Fixes deleting storage configuration fields by setting them to `null`.
…to leafty/feat-namespaced-data-connectors-3

# Conflicts:
#	test/bases/renku_data_services/data_api/test_data_connectors.py
…ectors-3' into leafty/feat-namespaced-data-connectors-4
…ectors-4' into leafty/feat-namespaced-data-connectors-5
…ectors-4' into leafty/feat-namespaced-data-connectors-5
@leafty leafty force-pushed the leafty/feat-namespaced-data-connectors-5 branch from 3c45ace to d064f7b Compare September 30, 2024 14:27
Base automatically changed from leafty/feat-namespaced-data-connectors-5 to leafty/build-data-connectors October 4, 2024 07:17
@leafty leafty force-pushed the leafty/build-data-connectors branch from c5820ef to b772eef Compare October 4, 2024 08:48
…to leafty/feat-namespaced-data-connectors-6

# Conflicts:
#	Makefile
#	bases/renku_data_services/data_api/app.py
#	components/renku_data_services/app_config/config.py
#	components/renku_data_services/authz/authz.py
#	components/renku_data_services/base_api/misc.py
#	components/renku_data_services/data_connectors/api.spec.yaml
#	components/renku_data_services/data_connectors/apispec.py
#	components/renku_data_services/data_connectors/blueprints.py
#	components/renku_data_services/data_connectors/core.py
#	components/renku_data_services/data_connectors/db.py
#	components/renku_data_services/data_connectors/models.py
#	components/renku_data_services/migrations/versions/a11752a5afba_migrate_to_entity_slugs.py
#	components/renku_data_services/project/apispec.py
#	components/renku_data_services/storage/db.py
#	test/bases/renku_data_services/data_api/test_data_connectors.py
…ectors-7' into leafty/feat-namespaced-data-connectors-6
…to leafty/feat-namespaced-data-connectors-6

# Conflicts:
#	components/renku_data_services/migrations/versions/3cf2adf9896b_add_data_connectors.py
@leafty leafty changed the title fix: migrate storages_v2 to data_connectors feat: migrate storages_v2 to data_connectors Oct 8, 2024
@leafty leafty marked this pull request as ready for review October 8, 2024 14:34
@leafty leafty requested a review from a team as a code owner October 8, 2024 14:34
@leafty leafty merged commit 1b4509b into leafty/build-data-connectors Oct 11, 2024
15 checks passed
@leafty leafty deleted the leafty/feat-namespaced-data-connectors-6 branch October 11, 2024 07:07
leafty added a commit that referenced this pull request Oct 17, 2024
Feature branch to add support for data connectors.

See: SwissDataScienceCenter/renku#3751.

Changes:
1. #384
2. #386
3. #406
4. #410
5. #413
6. #443
7. #422
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants