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

[BB-6458] Fix tasks that create django users for IDAs #203

Merged

Conversation

Cup0fCoffee
Copy link
Member

Description

Tasks that create django users for IDAs would run when creating django users for edx-platform. In their manage.py command they would omit lms or cms (because they are targeting IDAs), and that would cause the tasks to fail, because when running manage.py commands in edx-platform, passing lms or cms is mandatory.

Since these tasks should only run when targeting IDAs, added a predicate, that checks that service variable is not an empty string. That way these tasks will only be executed when the playbook is used to create a django user for an IDA.

Links

BB-6458

When creating a django user for IDA (i.e. when service name is
specified), we only want to create it for that IDA, so we add a
predicate that checks that service name is empty for the tasks that
create django users in edxapp.
playbooks/manage_edxapp_users_and_groups.yml Outdated Show resolved Hide resolved
playbooks/manage_edxapp_users_and_groups.yml Outdated Show resolved Hide resolved
playbooks/manage_edxapp_users_and_groups.yml Outdated Show resolved Hide resolved
Copy link
Member

@kaustavb12 kaustavb12 left a comment

Choose a reason for hiding this comment

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

👍

Approved, subject to the resolution of the review comments.

  • I tested this: Verified test instance is successfully provisioned with this branch and lms users have been populated
  • I read through the code

…ecified

When creating a django user for edxapp and not for IDA (i.e. when
service name is not specified), we don't want the tasks that create
django users in IDAs to be executed, because they don't pass `lms`
and/or `cms` to `manage.py`, so these tasks fail for edxapp. To fix that
we add a predicate that checks that service name has been specified to
these tasks, so they only run when creating a django user for an IDA.
@Cup0fCoffee Cup0fCoffee force-pushed the maxim/bb-6458-fix-user-creation-tasks branch from 6929edd to d390511 Compare July 10, 2022 14:56
@Cup0fCoffee Cup0fCoffee merged commit 3680ae4 into opencraft-release/maple.3 Jul 10, 2022
@Cup0fCoffee Cup0fCoffee deleted the maxim/bb-6458-fix-user-creation-tasks branch July 10, 2022 14:58
@Cup0fCoffee Cup0fCoffee restored the maxim/bb-6458-fix-user-creation-tasks branch July 11, 2022 22:11
@Cup0fCoffee Cup0fCoffee deleted the maxim/bb-6458-fix-user-creation-tasks branch July 11, 2022 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants