owned this note
owned this note
Published
Linked with GitHub
# Development Environment Workshop
###### tags: `PulpCon 2020`
* Address potential overlap with the community and state of plugins topic, installer topic
* What docs does one really need to read to work on pulp?
* [Gerrod] I think the most important things for new contributors is knowing how to set up an easy dev environment, knowing where to make changes, and knowing how to test those changes.
* https://pulp.plan.io/issues/7474
* I think setting up the pulplift environment is really easy but maybe there should be more info on interacting with elements in the environment like how it's useful to add port tunnels for 24817, 24816 on the vagrant ssh or more info about useful commands inside the environment like 'phelp, pbindings, etc..'
* https://pulp.plan.io/issues/7475
* For testing it would be helpful to mention the fixtures and building local fixtures with pfixtures if a plugin uses them. It would be helpful to explicitly mention that you should use prestart before testing any changes. Also, running Pulp in the foreground is mentioned, but I think you should also mention pstop and individually stopping and starting the different parts of Pulp like the content server, since these parts are useful to test/debug on their own.
* https://pulp.plan.io/issues/7476
* Quickly step through the process of going through the docs to set up an environment
* https://docs.pulpproject.org/pulpcore/contributing/dev-setup.html#get-the-source
* Should we further streamline the documentation for the "I just want to fix and test one bug" use case for new contributors?
* Information spread out
* A quick developer setup guide should list the most common use case, individual docs should list more.
* We should have quick setup for the most common distros, and Mac with virtualbox.
* Agreed: We suggest a vbox-compatible box, not a libvirt only box.
* We should have quick setup of vagrant + plugins on multiple distros
* [mikedep333] possible, but not quick for many distros. packages are often too old in debian / ubuntu, CentOS needs upstream vagrant. Need rubydev to build vagrant-sshfs and vagrant-libvirt often.
* We should mention the ports 24816 & 24817, often need to bypass proxy
* Lots of commands to get functional tests working. Need to look at CI scripts.
* [mikedep333] Many of these should be in pulp_installer, sometimes the pulp_devel role.
* Need docs on writing dynaconf lists
* Need docs on the pulp 2 & pulp 3 box. It has special apache config even.
* What other coding tools are core pulp developers using every day?
* If everyone can share one tool or trick or process they use that resulted in an efficiency boost, we could perhaps produce a useful cheatsheet.
* fzf, ripgrep, fd, ncdu, `git grep`, tig
* vscode for git conflict resolution
* ![](https://code.visualstudio.com/assets/docs/editor/versioncontrol/merge-conflict.png)
* website for JSON validation: https://jsonformatter.curiousconcept.com
* a bash alias for fetching latest commits and reloading the vagrant box (https://gist.github.com/lubosmj/7f683389a2c4d2cda680a99fe502ac3e)
* Using https://mitmproxy.org/ for debugging http traffic.
* meld for 3way diff conflict resolution (called via git mergetool)
* Borderline excessive logging setups (https://gist.github.com/alikins/402936522de508f105771c982759f83b for ex)
* silly bash script to remember pulp stuff for 'httpie' https://gist.github.com/alikins/1c870a0bce62dfca24fe023d76f8abc3
* git_prompt to see on the commandline which branch i am on
* django-admin graph_models to get a visual representation of model relations
* Also sometimes use SchemaSpy for this (https://gist.github.com/alikins/09bc0301e3f2b20eae2b666230a0e38e example using the docker image)
* My various git scripts/aliases https://github.com/alikins/gitconfig
* Also like 'pgcli' for db, and pt[i]python (also supported by django_extensions 'shell_plus')
* What other tools might be useful to have pre-installed?
* profiling tools (graphviz, py-spy)
* PostgresqlSQL monitoring tools (pghero)
* https://pghero.dokkuapp.com/
* Using pulplift effectively (mikedp333)
* [New CI: nested virtualization on Travis](https://travis-ci.com/github/pulp/pulplift/builds/184240586)
* New recommended workflow: `git submodule update --init --remote` (gets very latest commits)
* Q: Are devs encountering disk space issues? We can expand VHDs & implement TRIM/discard.
* Add to an FAQ / advanced usage section. Is needed sometimes when you neeed the entire blobs, not just metadata, on disk for an issue.
* Q: Is there serious interest in using vagrant with Docker in addition to libvirt/virtualbox?
* 10% performance hack: `ln -s $PWD/vagrant/settings.ci.yaml forklift/vagrant/settings.yaml`
* Need how to on overriding box sections, 8GB RAM very often
* Using the plugin template effectively