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

[Feature] Allow executions to be filtered based on who launched them #671

Closed
2 of 13 tasks
katrogan opened this issue Jan 14, 2021 · 4 comments
Closed
2 of 13 tasks
Labels
enhancement New feature or request ui Admin console user interface
Milestone

Comments

@katrogan
Copy link
Contributor

Motivation: Why do you think this is important?
Individual users iterating on workflows are mostly concerned with the executions they've most recently launched. Since we have auth and can capture who launched an execution we should expose this so users can filter by their own (or others') executions.

Goal: What should the final outcome look like, ideally?
It should be possible to see executions you have launched (ideally, chronologically).

Describe alternatives you've considered
The current method of filtering through the executions page looking for your own.

Flyte component

  • Overall
  • Flyte Setup and Installation scripts
  • Flyte Documentation
  • Flyte communication (slack/email etc)
  • FlytePropeller
  • FlyteIDL (Flyte specification language)
  • Flytekit (Python SDK)
  • FlyteAdmin (Control Plane service)
  • FlytePlugins
  • DataCatalog
  • FlyteStdlib (common libraries)
  • FlyteConsole (UI)
  • Other

[Optional] Propose: Link/Inline
If you have ideas about the implementation please propose the change. If inline keep it short, if larger then you link to an external document.

Additional context
Add any other context or screenshots about the feature request here.

Is this a blocker for you to adopt Flyte
Please let us know if this makes it impossible to adopt Flyte

@katrogan katrogan added enhancement New feature or request untriaged This issues has not yet been looked at by the Maintainers labels Jan 14, 2021
@katrogan katrogan added ui Admin console user interface and removed untriaged This issues has not yet been looked at by the Maintainers labels Feb 9, 2021
@georgesnelling
Copy link
Contributor

georgesnelling commented Feb 24, 2021

Hey all, one of my former companies is Labkey (labkey.org and labkey.com) They build db management systems for researchers. Check out their sorting and filtering UI for their bug tracker: https://www.labkey.org/home/Developer/issues/issues-list.view

They've been working at sorting and filtering for 20 years or so. All their data tables and views support the same basic filtering and sorting UI. Their backend db is PostgreSQL.

Notice that as you add filter and change sorting, the URL is modified. All filtering and sorting is copy-pastable. They have the concept of a previous sort/filter when drilling into a detail page, also expressed in the URL. The filter and sorting syntax is not dissimilar to what qraphql does, but it follows URL encoding rules.

All the code is open source: server side is Java, client is typescript.

@georgesnelling
Copy link
Contributor

Prashant and friends: Please ignore my previous comment when looking at this issue. I am talking about a much larger feature than simply adding a filter for this one field.

@kumare3
Copy link
Contributor

kumare3 commented Mar 31, 2021

One thing to note - there are 2 cases

  1. When Authentication is disabled (DISABLE_AUTH) flag is set. Then, filterering by user/principal is not possible
  2. When authn is enabled, this should be available in the console

@katrogan
Copy link
Contributor Author

katrogan commented Apr 1, 2021

To clarify Ketan's comment it is actually possible to filter by user even when authentication is disabled. In this case, the user can pass a role when launching an execution that gets recorded in the filterable user field in the back-end.

To create an execution with a custom role you can use for testing this feature out, we'll use flyte-cli to get a launch plan "urn" (unique identifier) to create an execution with.

Using the go greet workflow as an example, let's walk through how to do that.

First, get existing launch plans.

$ flyte-cli list-launch-plan-names -p flytetester -d development -i -h localhost:30081
    ...
    recipes.basic.lp.go_greet
    ...

then we need to figure out a specific version to launch the execution with.

$ flyte-cli list-launch-plan-names -p flytetester -d development -i -h localhost:30081 -n recipes.basic.lp.go_greet
Welcome to Flyte CLI! Version: 0.17.0b2
Launch Plan Versions Found for flytetester:development:recipes.basic.lp.go_greet

Version                                            Urn                                                                              Schedule                       Schedule State 
1ea80638e9dd2ddaef6f199fffae0b439f445e5d           lp:flytetester:development:recipes.basic.lp.go_greet:1ea80638e9dd2ddaef6f199fffae0b439f445e5d 
...

Now that we have an urn, let's launch that. Note that the inputs number and day_of_week are workflow execution inputs.

flyte-cli execute-launch-plan -p flytetester -d development -i -h localhost:30081 -u lp:flytetester:development:recipes.basic.lp.go_greet:1ea80638e9dd2ddaef6f199fffae0b439f445e5d -r dariel -- number=2 day_of_week=Weds

Success, now we can view the execution in the console.

You can also view the raw execution data by visiting https://localhost:30081/api/v1/executions/flytetester/development/<execution name>

where the execution name was what was output in the above command, e.g. Launched execution: ex:flytetester:development:f77fc8bb1c34c45e39b3 -> has an execution name of f77fc8bb1c34c45e39b3

Verify that the raw execution data does indeed have your role captured. You should see something like

"metadata": {
  "principal": "dariel",
...

You should now be able to use https://docs.flyte.org/en/latest/dive_deep/admin_service.html#using-the-admin-service to filter executions by user "dariel"

@kumare3 kumare3 added this to the 0.13.0 milestone Apr 27, 2021
@kumare3 kumare3 closed this as completed Apr 27, 2021
eapolinario pushed a commit to eapolinario/flyte that referenced this issue Dec 20, 2022
* Minor updates
Grammar, and rendering fix
Updates based on comments
Update contribute.rst
Signed-off-by: SmritiSatyanV <[email protected]>

* Moving panel-and-toc image to static-resources repo and updating the url (flyteorg#671)

Co-authored-by: Alekhya Sai <[email protected]>
eapolinario pushed a commit to eapolinario/flyte that referenced this issue Dec 20, 2022
* Added reuse able workflow (flyteorg#660)

Signed-off-by: Yuvraj <[email protected]>
Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Add directive (flyteorg#663)

Signed-off-by: SmritiSatyanV <[email protected]>
Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Added links from Flytelab (flyteorg#652)

* Added link from Flytelab

Added weather forecasting application link
Minor grammar fixes
Signed-off-by: SmritiSatyanV <[email protected]>

* Created weather_forecast.rst

Created rst file to add github repo to weather-forecasting, and blog
Signed-off-by: SmritiSatyanV <[email protected]>

* Fixed errors-1

Signed-off-by: SmritiSatyanV <[email protected]>

* Updated weather_forecasting.rst

Signed-off-by: SmritiSatyanV <[email protected]>

* Added flytelab and blog link

Added description, and right links.
Signed-off-by: SmritiSatyanV <[email protected]>

* Changes to tutorials.rst

Placed the weather forecasting tab in a different position
Signed-off-by: SmritiSatyanV <[email protected]>

* updated ml_training.rst

Added description for ml_training file
Signed-off-by: SmritiSatyanV <[email protected]>

* Changes based on review

Signed-off-by: SmritiSatyanV <[email protected]>

* Changed weather forecasting drop down to flytelab

Signed-off-by: SmritiSatyanV <[email protected]>

* Changes based on comments

Signed-off-by: SmritiSatyanV <[email protected]>
Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Add AWS Batch example (flyteorg#636)

* Added aws batch example

Signed-off-by: Kevin Su <[email protected]>

* Updated dependency

Signed-off-by: Kevin Su <[email protected]>

* Update dockerfile

Signed-off-by: Kevin Su <[email protected]>

* Fixed tests

Signed-off-by: Kevin Su <[email protected]>

* rerun tests

Signed-off-by: Kevin Su <[email protected]>

* Fixed tests

Signed-off-by: Kevin Su <[email protected]>

* rerun tests

Signed-off-by: Kevin Su <[email protected]>

* Fixed tests

Signed-off-by: Kevin Su <[email protected]>

* Fixed tests

Signed-off-by: Kevin Su <[email protected]>

* Fixed tests

Signed-off-by: Kevin Su <[email protected]>

* address comment

Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Moving register files example to use flytectl

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Update fast serialization

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Apply suggestions from code review

Co-authored-by: Samhita Alla <[email protected]>
Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Apply suggestions from code review

Co-authored-by: Samhita Alla <[email protected]>
Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Updated index.rst (flyteorg#670)

rephrased a sentence
Signed-off-by: SmritiSatyanV <[email protected]>
Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Minor updates (flyteorg#669)

* Minor updates
Grammar, and rendering fix
Updates based on comments
Update contribute.rst
Signed-off-by: SmritiSatyanV <[email protected]>

* Moving panel-and-toc image to static-resources repo and updating the url (flyteorg#671)

Co-authored-by: Alekhya Sai <[email protected]>
Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Update backend_plugins.py (flyteorg#653)

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Update fast_registration.py

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Update flyte_python_types.py iteration 1

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Remove flyte-cli references

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Remove fast_registration.py in favor of deploying_workflows.py

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Rewording a few sentences

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Add new line

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Remove references from lp_schedules.py

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Update instructions

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Update settings commnent

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Worked on review suggestions

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

* Add alternative option

Signed-off-by: Alekhya Sai Punnamaraju <[email protected]>

Co-authored-by: Yuvraj <[email protected]>
Co-authored-by: SmritiSatyanV <[email protected]>
Co-authored-by: Kevin Su <[email protected]>
Co-authored-by: Samhita Alla <[email protected]>
Co-authored-by: Niels Bantilan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ui Admin console user interface
Projects
None yet
Development

No branches or pull requests

3 participants