Code repository Storage could create link in UI to script in repo web instance #5042
Unanswered
smartass101
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
GitLab
,GitHub
,Bitbucket
, etc.Storage
classes can be somewhat inspected in the UI to discover the location of a flow definition. However, the information is presented in the form of something like keyword arguments and one has to reconstruct from those how to e.g. go to the right URL. If instead these classes could directly create a clickable URL in the UI, one could immediately navigate to the script as displayed by the repository web interface.This would bring about at least something close to the Airflow feature where one can easily inspect the code for a given flow definition.
Authentication after clinking the URL, etc. could still happen on the client/browser side even for local repo instances, so I don't think this constitutes any breach of the hybrid model.
For instance, given a storage
GitHub(repo="my/repo", path="/flows/flow.py", ref='tag')
this could easily create a link to URLhttps://github.com/my/repo/prefect/blob/tag/flows/flow.py
and upon clicking it one would immediately see the flow definition details. If it was a private repo, GitHub would take care of authentication.The only possible
hitch
in the implementation I can think of is that the creation of the URL by theGitHub
instance would possibly require some Python backend and might not be doable directly in the UI. Therefore, it might be better to create the URLalready during the flow registration when theGitHub
storage instance is available and store it.Beta Was this translation helpful? Give feedback.
All reactions