Submit_Workflow hangs on submission

オープン
#4 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Issue の _open_auth_url から始め、CallbackHandler が auth_code を httpd.handle_request() に渡す方法を追跡します。送信フローを再現し、localhost のコールバックが完了しない理由を調査します。認証が正常に戻り、AUTH が環境と src/.env に設定され、ハングせずに送信が続行されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

It hangs when attempting to submit to a namespace. URL opens, nothing is displayed. Env file created, but remains empty of info (just null strings)

  def _open_auth_url(auth_url: str, port: int) -> None:
      httpd = _ReusingHTTPServer(("localhost", port), CallbackHandler)
      webbrowser.open(auth_url)
      try:
          print(
              f"Please authorize the application in your browser. If it does not open automatically, visit: {auth_url}"
          )
          httpd.handle_request()
          os.environ["AUTH"] = httpd.auth_code
          dotenv.set_key("src/.env", "AUTH", httpd.auth_code)
          
      except OSError:
          print("ERROR: Port in use. Please restart your terminal.")
          os.environ["AUTH"] = ""
          print("ERROR: Port in use. Please restart your terminal.")
          exit(1)
      finally:
          print("Shutting down the server...")
          httpd.socket.shutdown(socket.SHUT_RDWR)
          httpd.server_close()

output:

(node:5049) [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for url.parse() vulnerabilities.
(Use node --trace-deprecation ... to show where the warning was created)
Please authorize the application in your browser. If it does not open automatically, visit: https://identity.diamond.ac.uk/realms/dls/protocol/openid-connect/auth?client_id=workflows-cli&response_type=code&redirect_uri=http://localhost:8000/&scope=openid posix-uid profile email fedid&state=&nonce=&code_challenge=JVZHGbR1yQmIgn4MniLQK9xVmvIujWozvSgf0F6zhQI&code_challenge_method=S256

Seems to be hanging on handle request?

Acceptance Criteria

  • Specific criteria that will be used to judge if the issue is fixed
主要言語
Python
スター
0
フォーク
0
平均マージ
10時間 26分
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DiamondLightSource/python-workflow-submitter のほかの issue

DiamondLightSource/python-workflow-submitter の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。