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

Fix and test data migration error from DAB RBAC #15138

Merged
merged 4 commits into from Apr 24, 2024

Conversation

AlanCoding
Copy link
Member

SUMMARY

I can explain how this bug was introduced...

One of the latest things done before merging the prior PR that integrated the RBAC app from the DAB library was that the RoleDefinition names were changed to a new naming convention. As a part of this, we didn't want to use all-lowercase names like "jobtemplate", so I called model_class on the ContentType object.

Testing this with the "current" unit tests, you would just pass in the "current" apps, which would have that method. However, with historical migrations, you're using partial models that don't have such methods available.

Thus, #15137

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API

@AlanCoding
Copy link
Member Author

First version had a failure with

django.db.utils.IntegrityError: NOT NULL constraint failed: main_organization.created

and that was just due to creating the organization object the test needs. I saw this failure locally, and I expect to see it in the checks here. I made a change to the test and am trying to verify that locally before pushing, but it seems these tests can take on the order of ~10 minutes.

@AlanCoding AlanCoding merged commit 47a061e into ansible:devel Apr 24, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants