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

Hide generated launch plans starting with .flytegen in the UI #5949

Merged
merged 6 commits into from
Nov 6, 2024

Conversation

troychiu
Copy link
Member

@troychiu troychiu commented Oct 31, 2024

Why are the changes needed?

Currently, the launch plan page will show generated launch plans, which make users hard to find their launch plan. We should hide them like we do for workflows.
Screenshot 2024-11-05 at 4 03 13 PM

What changes were proposed in this pull request?

  1. In ListNamedEntities, if no filter provided, filter by name starting with .flytegen. I did this instead of filtering by resource state since I would like to avoid a db migration.
  2. Allow launchplan type entities being updated.

How was this patch tested?

  1. unit tests
  2. integration tests with sandbox

Screenshots

Screenshot 2024-11-05 at 4 04 12 PM

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 65.38462% with 9 lines in your changes missing coverage. Please review.

Project coverage is 36.86%. Comparing base (553a702) to head (2c1010d).
Report is 22 commits behind head on master.

Files with missing lines Patch % Lines
...lyteadmin/pkg/manager/impl/named_entity_manager.go 16.66% 5 Missing ⚠️
...min/pkg/manager/impl/util/single_task_execution.go 69.23% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5949      +/-   ##
==========================================
+ Coverage   36.84%   36.86%   +0.01%     
==========================================
  Files        1309     1310       +1     
  Lines      130967   131246     +279     
==========================================
+ Hits        48259    48383     +124     
- Misses      78524    78665     +141     
- Partials     4184     4198      +14     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.05% <65.38%> (-0.09%) ⬇️
unittests-flytecopilot 11.73% <ø> (ø)
unittests-flytectl 62.44% <ø> (+0.03%) ⬆️
unittests-flyteidl 6.92% <ø> (-0.01%) ⬇️
unittests-flyteplugins 53.84% <ø> (+0.20%) ⬆️
unittests-flytepropeller 42.90% <ø> (-0.11%) ⬇️
unittests-flytestdlib 55.41% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@troychiu troychiu changed the title fix Hide generated launch plans starting with .flytegen in the UI Oct 31, 2024
Copy link
Contributor

@katrogan katrogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm but let's wait on FE to confirm expected usages

flyteadmin/pkg/common/filters.go Outdated Show resolved Hide resolved
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
@troychiu troychiu marked this pull request as ready for review November 6, 2024 00:35
katrogan
katrogan previously approved these changes Nov 6, 2024
Copy link
Contributor

@katrogan katrogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! do you mind updating the fully supported set of filter functions documentation here too: https://github.com/flyteorg/flyte/blob/96c467e14691eb3e956d3b21c05fb724c240fe97/docs/user_guide/concepts/control_plane/admin.rst#adding-request-filters

filters := make([]common.InlineFilter, 0)
if referenceEntity == core.ResourceType_WORKFLOW {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, love cleaning up this code (it's also very confusing we always force a filter on workflow state even if you filter on state down below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's confusing!

Signed-off-by: troychiu <[email protected]>
@troychiu troychiu merged commit f143481 into master Nov 6, 2024
51 checks passed
@troychiu troychiu deleted the flytegen-fix branch November 6, 2024 20:28
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