@@ -73,6 +73,9 @@ important maintenance task. When performing the update, follow this procedure:
73
73
[Envoy's version](https://github.com/envoyproxy/envoy/blob/main/tools/gen_compilation_database.py) to
74
74
update our build configurations. Be sure to retain our local modifications,
75
75
all lines that are unique to Nighthawk are marked with comment `# unique`.
76
+ 1. If [requirements.txt](requirements.txt) has not been updated in the last month (based on comment at top
77
+ of file), check for major dependency updates. See
78
+ [Finding python dependencies](#finding-python-dependencies) below for instructions.
76
79
1. Run `ci/do_ci.sh test`. Sometimes the dependency update comes with changes
77
80
that break our build. Include any changes required to Nighthawk to fix that
78
81
in the same PR.
@@ -84,6 +87,61 @@ important maintenance task. When performing the update, follow this procedure:
84
87
1. Create a PR with a title like `Update Envoy to 9753819 (Jan 24th 2021)`,
85
88
describe all performed changes in the PR's description.
86
89
90
+ ## Finding python dependencies
91
+
92
+ We should check our python dependencies periodically for major version updates. We attempt to
93
+ update these dependencies monthly. Here is an easy way to check for major dependency updates:
94
+
95
+ 1. Create and activate a virtual env:
96
+ ```
97
+ virtualenv pip_update_env
98
+ source pip_update_env/bin/activate
99
+ ```
100
+ NOTE: if `pip_update_env/bin/activate` appears to not exist, try
101
+ `pip_update_env/local/bin/activate` instead.
102
+
103
+ 1. Install dependencies:
104
+
105
+ ```
106
+ pip install -r requirements.txt
107
+ ```
108
+
109
+ 1. Check for outdated dependencies:
110
+
111
+ ```
112
+ pip list --outdated
113
+ ```
114
+ This will likely show both outdated dependencies based on requirements.txt and other outdated
115
+ dependencies you may have in addition, such as to `pip` itself. Here, we are only interested in
116
+ cross-referencing the ones that appear with the ones in requirements.txt.
117
+
118
+ 1. If you find any dependency updates, you can either try updating the dependency in requirements.txt yourself
119
+ or create an issue for the change and assign it to one of the nighthawk maintainers.
120
+
121
+ If there are not any dependency updates, please update the timestamp at the top of the file.
122
+
123
+ 1. When done, clean up the virtual env:
124
+
125
+ ```
126
+ deactivate
127
+ rm -rf pip_update_env
128
+ ```
129
+
130
+ ### Bazel Python Error
131
+
132
+ If you encounter an error that looks like:
133
+
134
+ ```
135
+ ERROR: REDACTED/nighthawk/test/integration/BUILD:32:11: no such package '@python_pip_deps//pypi__ more_itertools':
136
+ BUILD file not found in directory 'pypi__ more_itertools' of external repository @python_pip_deps. Add a BUILD
137
+ file to a directory to mark it as a package. and referenced by '//test/integration: integration_test_base_lean '
138
+ ```
139
+
140
+ Then we are missing a dependency from requirements.txt. This may happen due to changing other
141
+ dependencies.
142
+
143
+ The name of the dependency to add is everything after `pypi__`, in the above case `more_itertools`.
144
+
87
145
## Identifying an Envoy commit that introduced a breakage
88
146
89
147
### Background
0 commit comments