Local development environment refresh and update #70
No reviewers
Labels
No labels
bug
Closed As
Duplicate
Closed As
Fixed
Closed As
Invalid
easyfix
enhancement
Priority
Critical
Priority
High
Priority
Low
Priority
Normal
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/testdays-web!70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/refresh-local-dev-environment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It would be good to standardize on PostgreSQL only, to avoid incompatibilities. See documentation in blockerbugs, hopefully it can help: https://pagure.io/fedora-qa/blockerbugs/blob/develop/f/docs/source
Thanks!
1 new commit added
Change local dev db from SQLite to PostgreSQL2 new commits added
Update app cli to take the current DB schema into accountCreate Makefile for simplified app operationsReady for review
Thanks, Jaroslav! My notes:
I have a few more in-line comments coming.
After the review, I suggest the existing commits could be squashed into one or a few commits, before merging, so that the final commit history is nice to read.
In blockerbugs we directed PGDATA to a non-default dir, so that it's stored directly inside the container. That means after starting the database again, your data aren't gone (if you want to purge the data, just remove the container and create it again, easy). And you also don't need to deal with mounted volumes, which requires more manual steps and can't be used out-of-the-box in the makefile.
I'm including that approach as a suggestion, we don't need to do it the same way here. I just wonder if you've seen that and have any opinion on which approach to take by default.
Do you have any comparison of using
virtualenvvspython -m venv? The former requirespython3-virtualenvrpm to be installed, I believe. I'm not sure if there's any meaningful functional difference (in our case), so we might just go with the Python standard library?That's all from me, thanks :)
It is true that
Makefilesyntax might not be very readable at times. I am sort of used to use it from previous projects. There is one advantage in using this approach that it would sort out task dependencies for you so it is easy to make one target dependent on some other target without any additional boilerplate code.I think it might be useful to keep SQLite related updates in there if only just for future reference on how to workaround some PostgreSQL unique features like ALTER statement.
But SQLite compatibility will not be taken into account in future updates for sure.
OK, will do!
1 new commit added
Fix incorrect description of db data retention in containerI have used a slightly different Postgres image from quay.io to remove dependency on Docker Hub. It allows for very similar workflow as you are mentioning, just without explicit setting of PGDATA. If no external volume is specified, the db will be stored inside the container just like in your example.
I have fixed incorrect description of this feature in DEVELOPER.md.
virtualenvdevelopers claim it is superior tovenvmodule: https://virtualenv.pypa.io/en/latest/But you are right that those improvements are probably not very relevant in our use case and
venvcould be used as well. I'll update developer documentation as such.1 new commit added
Update python virtualenv docs in DEVELOPER.mdAwesome, LGTM. Thanks a lot for starting with the basics and creating proper documentation and setup scripts before hacking on the code. This will make make our project much more approachable.
rebased onto
f78fa1df18Pull-Request has been merged by jgroman