Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildworker: start: fix worker startup failure after update #50

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

ynezz
Copy link
Member

@ynezz ynezz commented Sep 26, 2024

buildworker: start: fix worker startup failure after update

Workers are currently refusing to work:

 Unhandled Error
 Traceback (most recent call last):
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 673, in run
     runApp(config)
   File "/opt/venv/lib/python3.11/site-packages/twisted/scripts/twistd.py", line 29, in runApp
     runner.run()
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 370, in run
     self.application = self.createOrGetApplication()
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 437, in createOrGetApplication
     application = getApplication(self.config, passphrase)
 --- <exception caught here> ---
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 446, in getApplication
     application = service.loadApplication(filename, style, passphrase)
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/service.py", line 404, in loadApplication
     application = sob.loadValueFromFile(filename, "application")
   File "/opt/venv/lib/python3.11/site-packages/twisted/persisted/sob.py", line 174, in loadValueFromFile
     codeObj = compile(data, filename, "exec")
 builtins.SyntaxError: keyword argument repeated: connection_string (buildbot.tac, line 49)

as the buildbot.tac template changed in commit 4ba1dcb66155 ("worker:
Add option --connection-string for create-worker") and version v3.10.0.

So lets use this new --connection-string feature and get rid of the
sed-fu.

Fixes: efbddc9 ("Bump buildbot to v3.11.1 release")

ci: fix worker startup issue by adding missing env vars and cleanup unused vars

Workers are currently refusing to work:

  Unhandled Error
  Traceback (most recent call last):
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 673, in run
      runApp(config)
    File "/opt/venv/lib/python3.11/site-packages/twisted/scripts/twistd.py", line 29, in runApp
      runner.run()
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 370, in run
      self.application = self.createOrGetApplication()
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 437, in createOrGetApplication
      application = getApplication(self.config, passphrase)
  --- <exception caught here> ---
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 446, in getApplication
      application = service.loadApplication(filename, style, passphrase)
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/service.py", line 404, in loadApplication
      application = sob.loadValueFromFile(filename, "application")
    File "/opt/venv/lib/python3.11/site-packages/twisted/persisted/sob.py", line 174, in loadValueFromFile
      codeObj = compile(data, filename, "exec")
  builtins.SyntaxError: keyword argument repeated: connection_string (buildbot.tac, line 49)

and we're not aware about it, so lets fix it by adding the same
environment variables we're actually using in production.

While at it, cleanup the unused container_verify_string variables.

Fixed (failing) CI test is visible here https://github.com/openwrt/buildbot/actions/runs/11060475202/job/30731095086#step:5:48

…nused vars

Workers are currently refusing to work:

  Unhandled Error
  Traceback (most recent call last):
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 673, in run
      runApp(config)
    File "/opt/venv/lib/python3.11/site-packages/twisted/scripts/twistd.py", line 29, in runApp
      runner.run()
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 370, in run
      self.application = self.createOrGetApplication()
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 437, in createOrGetApplication
      application = getApplication(self.config, passphrase)
  --- <exception caught here> ---
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 446, in getApplication
      application = service.loadApplication(filename, style, passphrase)
    File "/opt/venv/lib/python3.11/site-packages/twisted/application/service.py", line 404, in loadApplication
      application = sob.loadValueFromFile(filename, "application")
    File "/opt/venv/lib/python3.11/site-packages/twisted/persisted/sob.py", line 174, in loadValueFromFile
      codeObj = compile(data, filename, "exec")
  builtins.SyntaxError: keyword argument repeated: connection_string (buildbot.tac, line 49)

and we're not aware about it, so lets fix it by adding the same
environment variables we're actually using in production.

While at it, cleanup the unused container_verify_string variables.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Workers are currently refusing to work:

 Unhandled Error
 Traceback (most recent call last):
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 673, in run
     runApp(config)
   File "/opt/venv/lib/python3.11/site-packages/twisted/scripts/twistd.py", line 29, in runApp
     runner.run()
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 370, in run
     self.application = self.createOrGetApplication()
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 437, in createOrGetApplication
     application = getApplication(self.config, passphrase)
 --- <exception caught here> ---
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/app.py", line 446, in getApplication
     application = service.loadApplication(filename, style, passphrase)
   File "/opt/venv/lib/python3.11/site-packages/twisted/application/service.py", line 404, in loadApplication
     application = sob.loadValueFromFile(filename, "application")
   File "/opt/venv/lib/python3.11/site-packages/twisted/persisted/sob.py", line 174, in loadValueFromFile
     codeObj = compile(data, filename, "exec")
 builtins.SyntaxError: keyword argument repeated: connection_string (buildbot.tac, line 49)

as the buildbot.tac template changed in commit 4ba1dcb66155 ("worker:
Add option --connection-string for create-worker") and in version v3.10.0.

So lets use this new `--connection-string` feature and get rid of the
sed-fu.

Fixes: efbddc9 ("Bump buildbot to v3.11.1 release")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
@ynezz ynezz force-pushed the ynezz/fix-workers branch 2 times, most recently from 99ad26a to 3812ff7 Compare September 26, 2024 21:25
@ynezz ynezz changed the title Ynezz/fix workers buildworker: start: fix worker startup failure after update Sep 26, 2024
@openwrt-bot openwrt-bot merged commit 3812ff7 into openwrt:main Sep 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants