Remove zuul_url from merger config

Currently the zuul_url is not used anywhere but still a required
merger setting. This removes it.

Change-Id: I627c8a18015f4c148c28d2f7e735b30cc1ef3862
changes/78/489378/1
Tobias Henkel 5 years ago
parent 01482ad9ce
commit 34ee088603
  1. 1
      etc/zuul.conf-sample
  2. 1
      tests/fixtures/zuul-connections-gerrit-and-github.conf
  3. 1
      tests/fixtures/zuul-connections-merger.conf
  4. 1
      tests/fixtures/zuul-connections-multiple-gerrits.conf
  5. 1
      tests/fixtures/zuul-connections-same-gerrit.conf
  6. 1
      tests/fixtures/zuul-disk-accounting.conf
  7. 1
      tests/fixtures/zuul-git-driver.conf
  8. 1
      tests/fixtures/zuul-github-driver.conf
  9. 1
      tests/fixtures/zuul-push-reqs.conf
  10. 1
      tests/fixtures/zuul-sql-driver-bad.conf
  11. 1
      tests/fixtures/zuul-sql-driver.conf
  12. 1
      tests/fixtures/zuul.conf
  13. 7
      zuul/executor/server.py
  14. 1
      zuul/manager/__init__.py
  15. 3
      zuul/merger/client.py
  16. 7
      zuul/merger/server.py
  17. 1
      zuul/model.py
  18. 8
      zuul/scheduler.py

@ -23,7 +23,6 @@ state_dir=/var/lib/zuul
git_dir=/var/lib/zuul/git
;git_user_email=zuul@example.com
;git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
default_username=zuul

@ -8,7 +8,6 @@ tenant_config=config/multi-driver/main.yaml
git_dir=/tmp/zuul-test/git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ status_url=http://zuul.example.com/status
git_dir=/tmp/zuul-test/git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ tenant_config=main.yaml
git_dir=/tmp/zuul-test/merger-git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ tenant_config=config/zuul-connections-same-gerrit/main.yaml
git_dir=/tmp/zuul-test/merger-git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ tenant_config=main.yaml
git_dir=/tmp/zuul-test/merger-git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ tenant_config=config/zuul-connections-same-gerrit/main.yaml
git_dir=/tmp/zuul-test/git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ status_url=http://zuul.example.com/status/#{change.number},{change.patchset}
git_dir=/tmp/zuul-test/git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ status_url=http://zuul.example.com/status
git_dir=/tmp/zuul-test/git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ layout_config=layout-connections-multiple-voters.yaml
git_dir=/tmp/zuul-test/merger-git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ tenant_config=main.yaml
git_dir=/tmp/zuul-test/merger-git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -8,7 +8,6 @@ tenant_config=main.yaml
git_dir=/tmp/zuul-test/merger-git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[executor]
git_dir=/tmp/zuul-test/executor-git

@ -507,7 +507,6 @@ class ExecutorServer(object):
# perhaps hostname+pid.
self.hostname = socket.gethostname()
self.log_streaming_port = log_streaming_port
self.zuul_url = config.get('merger', 'zuul_url')
self.merger_lock = threading.Lock()
self.verbose = False
self.command_map = dict(
@ -798,8 +797,7 @@ class ExecutorServer(object):
args['branch'], args['files'],
args.get('dirs', []))
result = dict(updated=True,
files=files,
zuul_url=self.zuul_url)
files=files)
job.sendWorkComplete(json.dumps(result))
def merge(self, job):
@ -808,8 +806,7 @@ class ExecutorServer(object):
ret = self.merger.mergeChanges(args['items'], args.get('files'),
args.get('dirs', []),
args.get('repo_state'))
result = dict(merged=(ret is not None),
zuul_url=self.zuul_url)
result = dict(merged=(ret is not None))
if ret is None:
result['commit'] = result['files'] = result['repo_state'] = None
else:

@ -675,7 +675,6 @@ class PipelineManager(object):
build_set = event.build_set
item = build_set.item
build_set.merge_state = build_set.COMPLETE
build_set.zuul_url = event.zuul_url
if event.merged:
build_set.commit = event.commit
build_set.files.setFiles(event.files)

@ -128,7 +128,6 @@ class MergeClient(object):
def onBuildCompleted(self, job):
data = getJobData(job)
zuul_url = data.get('zuul_url')
merged = data.get('merged', False)
updated = data.get('updated', False)
commit = data.get('commit')
@ -140,7 +139,7 @@ class MergeClient(object):
(job, merged, updated, commit))
job.setComplete()
if job.build_set:
self.sched.onMergeCompleted(job.build_set, zuul_url,
self.sched.onMergeCompleted(job.build_set,
merged, updated, commit, files,
repo_state)
# The test suite expects the job to be removed from the

@ -28,7 +28,6 @@ class MergeServer(object):
def __init__(self, config, connections={}):
self.config = config
self.zuul_url = config.get('merger', 'zuul_url')
merge_root = get_default(self.config, 'merger', 'git_dir',
'/var/lib/zuul/merger-git')
@ -97,8 +96,7 @@ class MergeServer(object):
ret = self.merger.mergeChanges(
args['items'], args.get('files'),
args.get('dirs'), args.get('repo_state'))
result = dict(merged=(ret is not None),
zuul_url=self.zuul_url)
result = dict(merged=(ret is not None))
if ret is None:
result['commit'] = result['files'] = result['repo_state'] = None
else:
@ -113,6 +111,5 @@ class MergeServer(object):
args['branch'], args['files'],
args.get('dirs'))
result = dict(updated=True,
files=files,
zuul_url=self.zuul_url)
files=files)
job.sendWorkComplete(json.dumps(result))

@ -1233,7 +1233,6 @@ class BuildSet(object):
self.previous_build_set = None
self.uuid = None
self.commit = None
self.zuul_url = None
self.dependent_items = None
self.merger_items = None
self.unable_to_merge = False

@ -136,17 +136,15 @@ class MergeCompletedEvent(ResultEvent):
"""A remote merge operation has completed
:arg BuildSet build_set: The build_set which is ready.
:arg str zuul_url: The URL of the Zuul Merger.
:arg bool merged: Whether the merge succeeded (changes with refs).
:arg bool updated: Whether the repo was updated (changes without refs).
:arg str commit: The SHA of the merged commit (changes with refs).
:arg dict repo_state: The starting repo state before the merge.
"""
def __init__(self, build_set, zuul_url, merged, updated, commit,
def __init__(self, build_set, merged, updated, commit,
files, repo_state):
self.build_set = build_set
self.zuul_url = zuul_url
self.merged = merged
self.updated = updated
self.commit = commit
@ -316,11 +314,11 @@ class Scheduler(threading.Thread):
self.wake_event.set()
self.log.debug("Done adding complete event for build: %s" % build)
def onMergeCompleted(self, build_set, zuul_url, merged, updated,
def onMergeCompleted(self, build_set, merged, updated,
commit, files, repo_state):
self.log.debug("Adding merge complete event for build set: %s" %
build_set)
event = MergeCompletedEvent(build_set, zuul_url, merged,
event = MergeCompletedEvent(build_set, merged,
updated, commit, files, repo_state)
self.result_event_queue.put(event)
self.wake_event.set()

Loading…
Cancel
Save