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

Add Rake Task For 4.1.1+portage-4.2.0 Upgrade #892

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

aaronskiba
Copy link
Collaborator

Fixes #890

Changes proposed in this PR:

  • Release 4.1.1+portage-4.2.0 includes a migration and it requires a specific new entry to the identifier_schemes table for openid_connect / CILogon to work properly. This rake task is intended to take care of all of that.

Note: The changes applied via this rake task have already been executed manually on the staging environment. However, performing the rake task on staging should still have no adverse effects.

Release `4.1.1+portage-4.2.0` includes a migration and it requires a specific new entry to the `identifier_schemes` table for openid_connect / CILogon to work properly. This rake task is intended to take care of all of that.

Note: The changes applied via this rake task have already been executed manually on the staging environment. However, performing the rake task on staging should still have no adverse effects.
@aaronskiba
Copy link
Collaborator Author

The following test of rails upgrade:dmp_assistant_v4_2_0 was performed immediately after restoring the db from a prod db dump:

$ rails upgrade:dmp_assistant_v4_2_0
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
Copying Bootstrap glyphicons to the public directory ...
Copying TinyMCE skins to the public directory ...
"Executing upgrade tasks for DMP Assistant 4.1.1+portage-4.2.0"
"------------------------------------------------------------------------"
"Adding/updating the openid_connect entry in the identifier_schemes table"
"------------------------------------------------------------------------"
Successfully added/updated the following identifier_schemes entry:
{"id"=>5, "name"=>"openid_connect", "description"=>"CILogon", "active"=>true, "created_at"=>Wed, 11 Sep 2024 16:40:31.759032000 UTC +00:00, "updated_at"=>Wed, 11 Sep 2024 16:40:31.759032000 UTC +00:00, "logo_url"=>nil, "identifier_prefix"=>"http://cilogon.org/serverE/users/", "context"=>1}
"------------------------------------------------------------------------"
"DMP Assistant 4.1.1+portage-4.2.0 includes a migration to drop the sessions table"
"Executing db:migrate"
"------------------------------------------------------------------------"
== 20240820190548 DropSessionsTable: migrating ================================
-- drop_table(:sessions)
   -> 0.0187s
== 20240820190548 DropSessionsTable: migrated (0.0189s) =======================

"Upgrade tasks completed for DMP Assistant 4.1.1+portage-4.2.0"

@aaronskiba
Copy link
Collaborator Author

The following test of rails upgrade:dmp_assistant_v4_2_0 was performed to observe the behaviour when applying this task a second time. It is what we'd hope to see if we executed the command in staging.

$ rails upgrade:dmp_assistant_v4_2_0
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
Copying Bootstrap glyphicons to the public directory ...
Copying TinyMCE skins to the public directory ...
"Executing upgrade tasks for DMP Assistant 4.1.1+portage-4.2.0"
"------------------------------------------------------------------------"
"Adding/updating the openid_connect entry in the identifier_schemes table"
"------------------------------------------------------------------------"
Successfully added/updated the following identifier_schemes entry:
{"id"=>5, "name"=>"openid_connect", "description"=>"CILogon", "active"=>true, "created_at"=>Wed, 11 Sep 2024 16:40:31.759032000 UTC +00:00, "updated_at"=>Wed, 11 Sep 2024 16:40:31.759032000 UTC +00:00, "logo_url"=>nil, "identifier_prefix"=>"http://cilogon.org/serverE/users/", "context"=>1}
"------------------------------------------------------------------------"
"DMP Assistant 4.1.1+portage-4.2.0 includes a migration to drop the sessions table"
"Executing db:migrate"
"------------------------------------------------------------------------"
"Upgrade tasks completed for DMP Assistant 4.1.1+portage-4.2.0"

@aaronskiba aaronskiba requested a review from lagoan September 11, 2024 16:46
@aaronskiba aaronskiba merged commit 2329cbe into yashu-sso-link-accounts Sep 11, 2024
10 of 11 checks passed
@aaronskiba aaronskiba deleted the aaron/add-4.2.0-rake-upgrade-task branch September 11, 2024 17:13
@aaronskiba aaronskiba restored the aaron/add-4.2.0-rake-upgrade-task branch September 11, 2024 17:13
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.

1 participant