You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I visualize a flow run in a local server, the flow runs successfully but the visual info on server does not work very well. I do not see any task runs, and the flow runs do not appear in the UI as blocks.
Version 2 was working fine !
15:05:55.665 | INFO | prefect.engine - Created flow run 'righteous-dragon' for flow 'log-repo-info'
15:05:55.665 | INFO | prefect.engine - View at http://192.168.1.10:4200/runs/flow-run/b99db794-7b04-4b70-af3d-7eeb6bd51948
15:05:57.441 | INFO | Task run 'get_repo_info-2bd' - Finished in state Completed()
15:05:57.441 | INFO | Flow run 'righteous-dragon' - Stars 🌠 : 17477
15:05:59.144 | INFO | Task run 'get_contributors-838' - Finished in state Completed()
15:05:59.146 | INFO | Flow run 'righteous-dragon' - Number of contributors 👷: 30
15:05:59.188 | INFO | Flow run 'righteous-dragon' - Finished in state Completed()
Version info
Version: 3.1.1
API version: 0.8.4
Python version: 3.12.7
Git commit: 6b50a2b9
Built: Fri, Nov 8, 2024 12:38 PM
OS/Arch: win32/AMD64
Profile: default
Server type: server
Pydantic version: 2.9.2
importhttpx# an HTTP client library and dependency of Prefectfromprefectimportflow, task@task(retries=2)defget_repo_info(repo_owner: str, repo_name: str):
"""Get info about a repo - will retry twice after failing"""url=f"https://api.github.com/repos/{repo_owner}/{repo_name}"api_response=httpx.get(url)
api_response.raise_for_status()
repo_info=api_response.json()
returnrepo_info@taskdefget_contributors(repo_info: dict):
"""Get contributors for a repo"""contributors_url=repo_info["contributors_url"]
response=httpx.get(contributors_url)
response.raise_for_status()
contributors=response.json()
returncontributors@flow(log_prints=True)deflog_repo_info(repo_owner: str="PrefectHQ", repo_name: str="prefect"):
""" Given a GitHub repository, logs the number of stargazers and contributors for that repo. """repo_info=get_repo_info(repo_owner, repo_name)
print(f"Stars 🌠 : {repo_info['stargazers_count']}")
contributors=get_contributors(repo_info)
print(f"Number of contributors 👷: {len(contributors)}")
if__name__=="__main__":
log_repo_info()
The text was updated successfully, but these errors were encountered:
hi @kavvkon - thanks for the issue. Do you have any rules that would prevent websocket traffic? also do you see anything about the EventsWorker still processing items?
Yes that should be it. The prefect server is hosted in another PC in intranet, (not through https). But I am in a corporate network and there are some restrictions. Any idea how to bypass and ignore SSL related errors ?
Bug summary
When I visualize a flow run in a local server, the flow runs successfully but the visual info on server does not work very well. I do not see any task runs, and the flow runs do not appear in the UI as blocks.
Version 2 was working fine !
Successful run:
C:\Windows>C:/Users/paul/Anaconda3/envs/prefect_env/python.exe my_gh_workflow.py
15:05:55.665 | INFO | prefect.engine - Created flow run 'righteous-dragon' for flow 'log-repo-info'
15:05:55.665 | INFO | prefect.engine - View at http://192.168.1.10:4200/runs/flow-run/b99db794-7b04-4b70-af3d-7eeb6bd51948
15:05:57.441 | INFO | Task run 'get_repo_info-2bd' - Finished in state Completed()
15:05:57.441 | INFO | Flow run 'righteous-dragon' - Stars 🌠 : 17477
15:05:59.144 | INFO | Task run 'get_contributors-838' - Finished in state Completed()
15:05:59.146 | INFO | Flow run 'righteous-dragon' - Number of contributors 👷: 30
15:05:59.188 | INFO | Flow run 'righteous-dragon' - Finished in state Completed()
Version info
Additional context
Calling this file my_gh_workflow.py based on this example from https://docs.prefect.io/3.0/get-started/quickstart
The text was updated successfully, but these errors were encountered: