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

ANPL-1701 post migration clearup #1206

Merged
merged 4 commits into from
Sep 28, 2023
Merged

Conversation

ymao2
Copy link
Contributor

@ymao2 ymao2 commented Sep 22, 2023

This PR is to address #ANPL-1701

  • Clear up the resources for old alpha
  • Clear up the apps from control panel which are not required any more
  • Clear up the feature flag
  • Clear up some old and redundant codes

Merging this PR will have the following side-effects:

  • No

🔍 What should the reviewer concentrate on?

  • Make sure the resources are clean

🧑‍💻 How should the reviewer test these changes?

  • pre-checking before committing the actions
    python manage.py post_migration_clearup
  • cleanup
    python manage.py post_migration_clearup --apply

📚 Documentation status

  • No changes to the documentation are required
  • This PR includes all relevant documentation
  • Documentation will be added in the future because ... (see #ANPL-...)

self._log_info(f"{counter}--Processing the application {app.slug}")

self._remove_old_auth0_clients(app, auth0_instance, apply_action=apply_action)
if "moj-analytical-services" in app.repo_url:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these apps that were marked as DO NOT MIGRATE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that is my assumption, if the app hasn't been updated with new github org ministryofjustice which means this app hasn't been migrated over --> means they don't need to be migrated 🤓 , this way saves me extra input for this script, and less chance to miss this kind of apps

But before I run this script , will try with apply of false first

<ul class="govuk-body">
<li>Old repository: <a href="{{ app_migration_info["repo_url"] }}">{{ app_migration_info["repo_url"] }}</a></li>
<li>Old app name: <strong>{{ app_migration_info["app_name"] }}</strong></li>
<li>Old app URL: <a href="{{ app_migration_info["app_url"] }}">{{ app_migration_info["app_url"] }}</a></li>
Copy link
Contributor

@michaeljcollinsuk michaeljcollinsuk Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these changes will mean that the app manage page wont have links to the old app for gold scorecard? Wondering if we need to make a hardcoded exception in the meantime - not that I really want to! Depends how long we keep them on alpha, hopefully its not necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to keep this information for gold-scorecard , the only information matter to them probably is the app_url which they know it anyway 😄 ,

@michaeljcollinsuk
Copy link
Contributor

Some minor comments just to clarify a couple of things, but otherwise looks good to me - always satisfying to see so many deletes 😄

@ymao2 ymao2 merged commit 7d2c8ec into main Sep 28, 2023
4 checks passed
@ymao2 ymao2 deleted the anpl-1701-cpanel-post-migration-clearup branch September 28, 2023 13:52
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