Don't explode if we're unable to load extension entrypoint metadata.

Review Request #12480 — Created July 20, 2022 and submitted

Information

Djblets
release-3.x

Reviewers

In certain pathological cases related to in-progress upgrades of a
server, we may get into a situation where an entrypoint appears to
exist, but attempting to load it gives us empty metadata. Most of the
extension info code is written to handle when the metadata dict is
empty, but we were basing the htdocs path for media on whatever the
Name was, which would end up attempting to pass in None as an
argument to os.path.join(). This change updates it so we use the
extension ID as a fallback if the Name doesn't exist in the metadata.

Ran unit tests.

Summary ID
Don't explode if we're unable to load extension entrypoint metadata.
In certain pathological cases related to in-progress upgrades of a server, we may get into a situation where an entrypoint appears to exist, but attempting to load it gives us empty metadata. Most of the extension info code is written to handle when the metadata dict is empty, but we were basing the htdocs path for media on whatever the `Name` was, which would end up attempting to pass in `None` as an argument to `os.path.join()`. This change updates it so we use the extension ID as a fallback if the Name doesn't exist in the metadata. Testing Done: Ran unit tests.
7960082ab6a3a97312b5dd85061ad74655c63cf3
maubin
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.x (1b89498)
Loading...