-
Notifications
You must be signed in to change notification settings - Fork 438
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
Create a large amount of dev data #16925
base: master
Are you sure you want to change the base?
Conversation
5c135f7
to
4c58c48
Compare
Why don't we use this as the default data creation? |
That's a valid point to discuss further: initially my attempt was meant to be a follow-up step, just in case there is a need to test the app performance wise, without affecting the existing setup. Basically I see some points to adjust if we want to squash the
Ideally, we should split better what is an initial db setup that is required in order to play with the app (the minimal data), and what is a pure |
I see |
4c58c48
to
d035a55
Compare
d6ead47
to
d048dc2
Compare
target_package: target_package_b | ||
} | ||
bs_req_action = build(:bs_request_action, action_attributes.merge(type: 'submit', bs_request: request)) | ||
bs_req_action.save! if bs_req_action.valid? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's not valid, what happens with this action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it doesn't get saved thus it doesn't get into the request
that has being created. It's the previous already existing logic implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it cannot be valid?
d048dc2
to
fbb6853
Compare
An already set up database must exists ahead (
rake dev:test_data:create
)Run:
bundle exec rake dev:test_data:create_more_data[100]
if inside the containerdocker compose run --rm frontend rake dev:test_data:create_more_data[100]
if outside of the containerwhere
[100]
can be any number you desire to flood your db with (the number represents the repetitions the create objects tasks are executed).