envoy.code.check 0.5.4__tar.gz → 0.5.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/PKG-INFO +1 -1
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/extensions.py +22 -1
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/typing.py +1 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/PKG-INFO +1 -1
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/setup.py +1 -1
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/MANIFEST.in +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/backend_shim.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/__init__.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/__init__.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/base.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/changelog.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/checker.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/flake8.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/glint.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/gofmt.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/rst.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/runtime_guards.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/shellcheck.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/yamllint.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/yapf.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/checker.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/cmd.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/exceptions.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/interface.py +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/py.typed +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/SOURCES.txt +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/dependency_links.txt +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/entry_points.txt +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/namespace_packages.txt +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/requires.txt +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/top_level.txt +0 -0
- {envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/setup.cfg +0 -0
|
@@ -29,6 +29,9 @@ METADATA_ONLY_EXTENSIONS = (
|
|
|
29
29
|
CONTRIB_METADATA_PATH = "contrib/extensions_metadata.yaml"
|
|
30
30
|
EXTENSIONS_SCHEMA = "tools/extensions/extensions_schema.yaml"
|
|
31
31
|
|
|
32
|
+
# TODO(phlax): remove this workaround if/when per-category status is added
|
|
33
|
+
UPSTREAM_EXTENSION_CATEGORY = "http.upstream"
|
|
34
|
+
|
|
32
35
|
|
|
33
36
|
@abstracts.implementer(interface.IExtensionsCheck)
|
|
34
37
|
class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
@@ -188,7 +191,8 @@ class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
|
188
191
|
await asyncio.gather(
|
|
189
192
|
self._check_metadata_categories(extension),
|
|
190
193
|
self._check_metadata_security_posture(extension),
|
|
191
|
-
self._check_metadata_status(extension)
|
|
194
|
+
self._check_metadata_status(extension),
|
|
195
|
+
self._check_metadata_status_upstream(extension))))
|
|
192
196
|
|
|
193
197
|
async def _check_metadata_categories(
|
|
194
198
|
self, extension: str) -> Tuple[str, ...]:
|
|
@@ -226,6 +230,23 @@ class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
|
226
230
|
return (f"Unknown status for {extension}: {status}", )
|
|
227
231
|
return ()
|
|
228
232
|
|
|
233
|
+
async def _check_metadata_status_upstream(
|
|
234
|
+
self, extension: str) -> Tuple[str, ...]:
|
|
235
|
+
metadata = (await self.metadata)[extension]
|
|
236
|
+
status = metadata.get("status_upstream")
|
|
237
|
+
categories = metadata.get("categories", ())
|
|
238
|
+
if status and (UPSTREAM_EXTENSION_CATEGORY not in categories):
|
|
239
|
+
return (
|
|
240
|
+
f"Do not set ({extension}) `status_upstream` for extensions "
|
|
241
|
+
f"that are not part of `{UPSTREAM_EXTENSION_CATEGORY}`", )
|
|
242
|
+
if not status and UPSTREAM_EXTENSION_CATEGORY in categories:
|
|
243
|
+
return (
|
|
244
|
+
f"You must set ({extension}) `status_upstream` for extensions "
|
|
245
|
+
f"that are part of `{UPSTREAM_EXTENSION_CATEGORY}`", )
|
|
246
|
+
if status and status not in self.extension_status_values:
|
|
247
|
+
return (f"Unknown `status_upstream` for {extension}: {status}", )
|
|
248
|
+
return ()
|
|
249
|
+
|
|
229
250
|
def _from_json(
|
|
230
251
|
self,
|
|
231
252
|
path: Union[str, pathlib.Path],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy/code/check/abstract/runtime_guards.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{envoy.code.check-0.5.4 → envoy.code.check-0.5.6}/envoy.code.check.egg-info/namespace_packages.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|