frontend: Do not re-create services in EXTSVC_CONFIG_FILE
Created by: mrnugget
This fixes #5134 (closed) by using the suggested changes and extending them to also allow the in-place modification of external services in case they have the same display name.
I tested this with 3 GitHub external services and 1 AWS CC external
service in external-services-config.json
defined and then booted up
frontend
with debug log messages enabled:
msg="Adding external service" displayName="AWSCODECOMMIT #1"
msg="Adding external service" displayName="GITHUB #1"
msg="Adding external service" displayName="GITHUB #2"
msg="Adding external service" displayName="GITHUB #3"
After updating GITHUB #2
in the JSON and restarting:
msg="Updating external service" id=3 displayName="GITHUB #2"
Without changing the JSON and restarting:
<no changes>
After updating GITHUB #1
in the JSON and restarting:
msg="Updating external service" id=2 displayName="GITHUB #1"
After removing GITHUB #3
from JSON and restarting:
msg="Deleting external service" id=4 displayName="GITHUB #3"
After re-adding GITHUB #3
to JSON and restarting:
msg="Adding external service" displayName="GITHUB #3"