Skip to content

Fix seeding and caching#897

Merged
ArtOfCode- merged 5 commits intocodidact:developfrom
eip-ewi:fix-seeding-2
Sep 22, 2022
Merged

Fix seeding and caching#897
ArtOfCode- merged 5 commits intocodidact:developfrom
eip-ewi:fix-seeding-2

Conversation

@Taeir
Copy link
Contributor

@Taeir Taeir commented Sep 21, 2022

Added logic for seeding to translate all _id mappings in the seeds to their actual rails objects to please rails and its validations.

Additionally fixes redis by reverting it to version 4 and updating the settings. Version 5 currently has a bug which causes issues for the development setup, and in some cases also the production setup. See redis/redis-rb#1157

Previously, we would pass ids to the creation handler. However, this
does not pass validations whenever the association is non-optional (i.e.
belongs_to). With these changes, we pass the actual Rails objects
instead of just the ids, which does pass the validations and sets it
properly.
@Taeir Taeir changed the title Report redis errors and inherit sockets for development Fix seeding and caching for development Sep 21, 2022
@Taeir Taeir marked this pull request as ready for review September 21, 2022 21:47
@Taeir Taeir marked this pull request as draft September 22, 2022 08:32
Settings are now properly loaded from the database.yml config file,
rather than only taking some of those settings.
@Taeir Taeir marked this pull request as ready for review September 22, 2022 09:20
@Taeir Taeir changed the title Fix seeding and caching for development Fix seeding and caching Sep 22, 2022
@ArtOfCode- ArtOfCode- merged commit a5c5ff2 into codidact:develop Sep 22, 2022
@Taeir Taeir deleted the fix-seeding-2 branch October 25, 2022 12:14
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