Skip to content

Remove workflows from GET profile endpoint + Add inUse flag #2703

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

Merged
merged 11 commits into from
Jul 2, 2025

Conversation

tw4l
Copy link
Member

@tw4l tw4l commented Jul 1, 2025

Connected to #2661

  • Removes crawl workflows from being returned as part of the profile response.
  • Frontend: removes display of workflows in profile details.
  • Adds 'inUse' flag to all profile responses to indicate profile is in use by at least one workflow
  • Adds 'profileid' as possible filter for workflows search in preparation for filtering by profile id ([Change]: Additional workflow filtering options: profiles, lastCrawlState #2708)
  • Make 'profile_in_use' a proper error (returning 400) on profile delete.

tw4l added 2 commits July 1, 2025 17:24
The frontend will fetch workflows separately via the paginated
list endpoint, filtering by profile id, to speed up loading of
profiles in the UI.
Temporarily solution, as we'll shortly want to add workflows back
to this the profile detail using a separate paginated API endpoint.
@tw4l tw4l requested a review from ikreymer July 1, 2025 21:36
@ikreymer
Copy link
Member

ikreymer commented Jul 2, 2025

Added inUse flag to the profile object to indicate that a profile is in use and can't be deleted, without having to enumerate all workflows.

Do we actually want to list workflows on the profile detail, rather than add a new filter (following the refactoring in #2702) in the workflow section?

@tw4l
Copy link
Member Author

tw4l commented Jul 2, 2025

Added inUse flag to the profile object to indicate that a profile is in use and can't be deleted, without having to enumerate all workflows.

I think we need to add this back to the list component delete as well (edit: done).

Do we actually want to list workflows on the profile detail, rather than add a new filter (following the refactoring in #2702) in the workflow section?

I think it's useful to be able to go to the workflow quickly from the profile - my take would be that we do both (edit: from Discord, solution is likely to add a link to the filtered workflow list from the profile detail)

@tw4l tw4l force-pushed the issue-2661-remove-workflows-from-profile-endpoint branch from 1de1b87 to a4f7d3e Compare July 2, 2025 20:06
@tw4l
Copy link
Member Author

tw4l commented Jul 2, 2025

Deletion notifications are now fixed:

Screenshot 2025-07-02 at 4 42 48 PM

Following #2702 , we discussed adding a workflow filter by profile and linking to that from the profile detail rather than creating yet another paginated workflow component.

@ikreymer
Copy link
Member

ikreymer commented Jul 2, 2025

Deletion notifications are now fixed:

Great! One we have filtering by profiles (eg. #2708), the error could include a link to workflows with that profile. Otherwise, I think this is good for this issue!

@ikreymer ikreymer changed the title Remove workflows from GET profile endpoint Remove workflows from GET profile endpoint + Add inUse flag Jul 2, 2025
@ikreymer ikreymer merged commit 5b4fee7 into main Jul 2, 2025
27 checks passed
@ikreymer ikreymer deleted the issue-2661-remove-workflows-from-profile-endpoint branch July 2, 2025 23:44
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.

2 participants