Skip to content

Unblock login after new discipline from config tool creation#7781

Merged
acwhite211 merged 4 commits intomainfrom
issue-7774-2
Mar 5, 2026
Merged

Unblock login after new discipline from config tool creation#7781
acwhite211 merged 4 commits intomainfrom
issue-7774-2

Conversation

@acwhite211
Copy link
Member

@acwhite211 acwhite211 commented Mar 3, 2026

Fixes #7774

Prevent a new discipline being created in the background from the user being able to login to a collection from an already existing discipline. Also, this solution needs to preserve the functionality of preventing the user from logging into a new collection before it is fully completed.

It seems this issue of new disciplines is being caused as a side-effect of the solution to preventing new collections from being used before they were fully ready.

While a new discipline was being created, background config Celery tasks were treated as global “setup in progress.” That made the login page show Guided Setup for users and could block login/collection switching even for unaffected collections.

The setup_progress busy variable now reflects only true initial database setup, not generic config tasks. Config-task blocking is collection aware, so only newly created collections are blocked, and existing collections and disciplines remain available.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list

Testing instructions

Setup Tool (This section is for Dev Testers, need to see the docker worker logs):

  • Create a new database with the setup tool and make sure to create a large default tree.
  • For dev testers, check the logs from the worker container to make sure no tree creation task is still running when the UI changes from the database loading page to the login page.

Checking login after created a new discipline:

  • Open the configuration tool page.
  • In a separate private browser window, open up the login page, type in the login username and password, but don't login yet.
  • In the configuration tool, go through the process of creating a new discipline. Make sure to configure a new tree to be uploaded for the new discipline. Before finishing the discipline creation, be ready to quickly switch to the login page.
  • As soon as you press "Save" for the new discipline in the login page, quickly switch to the login page in your separate private window to login any of the existing collections.
  • See that you can login while the discipline and it's tree are still being created.

Checking login after creating a new collection:

  • In the private browser window, logout, and set it up so you can quickly log back in later.
  • In the other browser window, use the configuration tool to create a new collection.
  • After pressing "Save" to create the new collection, quickly switch over to the private browser window to try logging in.
  • Confirm that the new collection is not yet available as an option of login as.
  • Wait sometime for all the background processes to end for creating the new collection, and the try logging in to the new collection.

@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Mar 3, 2026
@acwhite211 acwhite211 added this to the 7.12.0 milestone Mar 3, 2026
@acwhite211 acwhite211 self-assigned this Mar 3, 2026
@acwhite211 acwhite211 requested review from a team, alesan99 and grantfitzsimmons March 3, 2026 20:28
@acwhite211 acwhite211 marked this pull request as ready for review March 3, 2026 20:28
@acwhite211 acwhite211 changed the title Unblock login after new discipline from config creation Unblock login after new discipline from config tool creation Mar 3, 2026
Copy link
Contributor

@alesan99 alesan99 left a comment

Choose a reason for hiding this comment

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

  • See that you can login while the discipline and it's tree are still being created.
  • Want sometime for all the background processes to end for creating the new collection, and the try logging in to the new collection.

Looks good! 👍

Logins work correctly and new collections appear after a while. I wasn't able to trigger the database setup loading page through the config tool, so that works.

Copy link
Collaborator

@bhumikaguptaa bhumikaguptaa left a comment

Choose a reason for hiding this comment

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

Checking login after created a new discipline:

  • See that you can login while the discipline and it's tree are still being created.

Checking login after creating a new collection:

  • Confirm that the new collection is not yet available as an option of login as.
  • Want sometime for all the background processes to end for creating the new collection, and the try logging in to the new collection.

Everything works as expected, I didn't run into any errors. I was able to view the new collection without logging out and back in.

@acwhite211 acwhite211 requested a review from emenslin March 5, 2026 16:47
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

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

  • See that you can login while the discipline and it's tree are still being created.
  • Confirm that the new collection is not yet available as an option of login as.
  • Wait sometime for all the background processes to end for creating the new collection, and the try logging in to the new collection.

Looks good, I didn't run into any issues!

Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

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

  • For dev testers, check the logs from the worker container to make sure no tree creation task is still running when the UI changes from the database loading page to the login page.
  • See that you can login while the discipline and it's tree are still being created.
  • Confirm that the new collection is not yet available as an option of login as.
  • Wait sometime for all the background processes to end for creating the new collection, and the try logging in to the new collection.

👍

@acwhite211 acwhite211 merged commit 536a81e into main Mar 5, 2026
1 check passed
@acwhite211 acwhite211 deleted the issue-7774-2 branch March 5, 2026 18:30
@github-project-automation github-project-automation bot moved this from 📋Back Log to ✅Done in General Tester Board Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

Can't log into a database if a discipline is being created

6 participants