Commit Graph

623 Commits

Author SHA1 Message Date
Tessa Walsh
e94e179bb9
Fix crawl stopping tests (#875)
* Update currCrawlStopping references in backend tests

* Make sure previous crawl is fully stopped before next test
2023-05-23 12:39:53 -07:00
Tessa Walsh
5c944d4626
Remove uniqueness constraint on collection descriptions
Fix for copy-paste error
2023-05-23 11:03:13 -04:00
Ilya Kreymer
12f7db3ae2
tests: fixes for crawl cancel + crawl stopped (#864)
* tests:
- fix cancel crawl test by ensuring state is not running or waiting
- fix stop crawl test by ensuring stop is only initiated after at least one page has been crawled,
otherwise result may be failed, as no crawl data has been crawled yet (separate fix in crawler to avoid loop if stopped
before any data written webrecorder/browsertrix-crawler#314)
- bump page limit to 4 for tests to ensure crawl is partially complete, not fully complete when stopping
- allow canceled or partial_complete due to race condition

* chart: bump frontend limits in default, not just for tests (addresses #780)

* crawl stop before starting:
- if crawl stopped before it started, mark as canceled
- add test for stopping immediately, which should result in 'canceled' crawl
- attempt to increase resync interval for immediate failure
- nightly tests: increase page limit to test timeout

* backend:
- detect stopped-before-start crawl as 'failed' instead of 'done'
- stats: return stats counters as int instead of string
2023-05-22 20:17:29 -07:00
Tessa Walsh
28f1c815d0
Add crawlSuccessfulCount to workflows (#871) 2023-05-22 19:06:37 -04:00
Tessa Walsh
bd8b306fbd
Improve sorting workflows by lastUpdated (#826)
* Precompute config crawl stats

Includes a database migration to move preciously dynamically computed
crawl stats for workflows into the CrawlConfig model.

* Add lastRun sorting option and enable it by default

* Add modified as final sort key to order non-run workflows

* Remove currCrawl* fields and update frontend accordingly

* Add isCrawlRunning field to backend and use in frontend
2023-05-22 18:42:30 -04:00
Tessa Walsh
60fac2b677
Add collection sorting and filtering (#863)
* Sort by name and description (ascending by default)
* Filter by name
* Add endpoint to fetch collection names for search
* Add collation so that utf-8 chars sort as expected
2023-05-22 16:53:49 -04:00
sua yoo
821fbc12d8
Upgrade Shoelace to stable version (v2) (#856) 2023-05-22 10:01:48 -07:00
Ilya Kreymer
826c2e8298 version: bump to 1.6.0-beta.0 2023-05-19 11:29:31 -07:00
Tessa Walsh
f482831d53
Use collection uuid as id (instead of name) (#855)
Also ensure name is not empty by adding minimum length of 1

Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2023-05-19 09:03:48 -04:00
Ilya Kreymer
d07204e59d version: bump to 1.5.1 2023-05-18 17:28:42 -07:00
sua yoo
b5781c8869
Fix workflow edit back button (#857) 2023-05-17 12:07:12 -07:00
Henry Wilkinson
da33231be9
Removes webkit <summary> element triangle (#852) 2023-05-16 18:13:59 -04:00
Ilya Kreymer
a1ef93a46a version: bump to 1.5.0 for release! 2023-05-16 17:36:58 +02:00
Ilya Kreymer
ebee5e1788 version: bump to 1.5.0-beta.4 2023-05-12 07:34:50 +02:00
sua yoo
f250293794
Fix workflow edit page not loading (#848)
* fix workflow not loading

* don't add hash if editing

* remove controller
2023-05-12 07:33:35 +02:00
sua yoo
98d82184e6
Fix superadmin running crawls views (#846)
- Updates superadmin "Running Crawls" to show active crawls (starting, waiting, running, stopping) and sort by start by default
- Navigates to crawl workflow watch view on clicking crawl item
- Adds "Copy Crawl ID" to crawl actions for easy paste into "Jump to crawl"
- Navigates to crawl workflow watch when jumping to crawl
2023-05-11 08:15:52 +02:00
Ilya Kreymer
d8b36c0ae2 version: bump to 1.5.0-beta.3 2023-05-11 03:05:46 +02:00
sua yoo
a6435ae3d0
Improve Workflow Detail tab and button UX (#840)
- Adds primary action button next to "Actions" dropdown
- Switches "Edit Workflow Settings" button to icon button
- Redirects user to "Watch Crawl" tab when starting crawl
  - Now uses crawl ID from `data.started` in API `/run` response for more responsive UI
- Keeps "Watch Crawl" tab navigation button in list but disable when crawl is not running
  - Also handles watch view when workflow is not running to cover navigational edge cases
- Adds banner in "Crawls" list to direct users to the Watch Crawl when workflow is running
- Shows notification when crawl is done to make redirect to Crawls tab smoother
- Uses workflow scale when updating crawl scale
- Removes "All" from "View: All Finished Crawls" on Finished Crawl page for wording consistency
2023-05-11 02:57:38 +02:00
Ilya Kreymer
d1e5b0a021 version: bump to 1.5.0-beta.2 2023-05-10 14:55:35 +02:00
Ilya Kreymer
a6ddde496d
backend: fixes to 0005 migration: (#843)
- catch any errors on updating config (likely due to missing configmap), fix formatting
2023-05-10 12:00:41 +02:00
Ilya Kreymer
cf15d9c873
backend: ensure cid is a UUID, remove unneeded inactive check on crawls (#842)
* backend: ensure cid is a UUID, remove unneeded inactive check on crawls

* add UUID cast to cancel only
2023-05-10 11:59:44 +02:00
sua yoo
42794cad46
Add stop crawl confirmation dialog (#841)
* switch dialog control

* wait for workflow update to complete before showing dialog

* add stop dialog

* close scale after save

* update crawl text
2023-05-10 07:21:16 +02:00
Ilya Kreymer
82b21b6813
frontend crawl stopping improvements (#836) (#838)
* frontend crawl stopping improvements (#836)
- support new backend 'stopping' property
- for now, keep 'stopping' indicator state when crawl is running but stopping set to true
2023-05-08 23:52:49 -07:00
Ilya Kreymer
2cae065c46
Add Waiting state on the backend and frontend (#839)
* operator: add waiting state
- add pods as related objects
- inspect pod status, set crawl status to 'waiting' if no pods are running

frontend:
- frontend support for 'waiting' state
- show waiting icon from mocks

---------
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2023-05-08 17:05:01 -07:00
Ilya Kreymer
70319594c2
crawlconfig: fix default filename template, make configurable (#835)
* crawlconfig: fix default filename template, make configurable
- make default crawl file template configurable with 'default_crawl_filename_template' value in values.yaml
- set to '@ts-@hostsuffix.wacz' by default
- allow updating via 'crawlFilenameTemplate' in crawlconfig patch, which updates configmap
- tests: add test for custom 'default_crawl_filename_template'
2023-05-08 14:03:27 -07:00
Ilya Kreymer
fd7e81b8b7
stopping fix: backend fixes for #836 + prep for additional status fields (#837)
* stopping fix: backend fixes for #836
- sets 'stopping' field on crawl when crawl is being stopped (both via db and on k8s object)
- k8s: show 'stopping' as part of crawljob object, update subchart
- set 'currCrawlStopping' on workflow
- support old and new browsertrix-crawler stopping keys
- tests: add tests for new stopping state, also test canceling crawl (disable test for stopping crawl, currently failing)
- catch redis error when getting stats

operator: additional optimizations:
- run pvc removal as background task
- catch any exceptions in finalizer stage (eg. if db is down), return false until finalizer completes
2023-05-08 14:02:20 -07:00
Ilya Kreymer
064cd7e08a quickfix: fix stopping crawls with current browsertrix-crawler beta 2023-05-06 23:35:25 -07:00
Ilya Kreymer
b40d599e17
operator fixes: (#834)
- just pass cid from operator for consistency, don't load crawl from update_crawl (different object)
- don't throw in update_config_crawl_stats() to avoid exception in operator, only throw in crawlconfigs api
2023-05-06 13:02:33 -07:00
Ilya Kreymer
f992704491 version: bump version to 1.5.0-beta.1 2023-05-06 00:31:03 -07:00
Tessa Walsh
4f121fb868
Update precompute migration to only update active workflows (#833) 2023-05-05 21:35:03 -07:00
Tessa Walsh
8281ba723e
Pre-compute workflow last crawl information (#812)
* Precompute config crawl stats

* Includes a database migration to move preciously dynamically computed crawl stats for workflows into the CrawlConfig model.

* Add crawls.finished descending index

* Add last crawl fields to workflow tests
2023-05-05 15:12:52 -07:00
sua yoo
9fcbc3f87e
Allow users to set max depth/hop out within scope (#816)
- Adds an input to the Workflow creation and edit form for specifying crawl depth. This input is conditionally shown for seeded crawls when the scope is set to "Pages on this domain", "Pages on this domain & subdomains" or "Custom page prefix". The "any" scope is also supported for backwards compatibility but is not shown by default or in new configs.
- API implementation: The depth value is set in the primary seed config, i.e. the first seed in seeds: [], not in the outer .config.depth property.
2023-05-05 14:26:48 -07:00
Henry Wilkinson
7409e0637e
Improves crawl detail files list truncation (#830) 2023-05-05 14:25:29 -07:00
sua yoo
0d23b45dac
Crawl workflow detail page improvements (#823)
Resolves #817
- Adds relevant action buttons to each Workflow detail tab header
- Adds "Delete" action menu item to crawls in Crawls tab
- Prevent automatically switching to "Watch" tab after running crawl from detail page
- Removes "Stop" confirmation prompt and only shows "Cancel" confirmation prompt if there are one or more pages crawled
- Replaces "Cancel" confirmation prompt with web component dialog (partially addresses Switch to in-page dialogue boxes #619)
- Fixes hash routing to fix going back with browser back button
2023-05-05 13:50:45 -07:00
Ilya Kreymer
aae0e6590e
Ensure Volumes are deleted when crawl is canceled (#828)
* operator:
- ensures crawler pvcs are always deleted before crawl object is finalized (fixes #827)
- refactor to ensure finalizer handler always run when finalizing
- remove obsolete config entries
2023-05-05 12:05:54 -07:00
Tessa Walsh
48d34bc3c4
Add option to list workflows API endpoint to filter by schedule (#822)
* Add option to filter workflows by empty or non-empty schedule

* Add tests
2023-05-05 12:05:19 -07:00
Tessa Walsh
542ad7a24a
Update scale in workflow when crawl scale is updated (#820) 2023-05-05 11:59:57 -07:00
Tessa Walsh
774ae518f4
Set crawl-stop in redis from operator when crawl is stopped (#815)
Change redis to <crawl-id>:crawl-stop to match webrecorder/browsertrix-crawler#303
2023-05-05 11:34:24 -07:00
Ilya Kreymer
8aac6ccb6a
add authsign block to microk8s playbook (#776) 2023-05-05 11:32:32 -07:00
sua yoo
85c96de883
Show critical errors in Crawl detail logs (#811) 2023-05-05 11:30:38 -07:00
Henry Wilkinson
53539425aa
Fix issue template bug label addition
Had the wrong value in there, it should now auto apply the right label
2023-05-04 15:13:35 -04:00
Henry Wilkinson
e18b0ce9ad
Update bug.yml
Fixes title field
2023-05-04 14:58:18 -04:00
Henry Wilkinson
0a165cc22d
Adds bug report issue template (#797)
Co-authored-by: sua yoo <sua@webrecorder.org>
2023-05-04 14:54:37 -04:00
Henry Wilkinson
7978cb4d85
Crawl detail page update (#808)
- Removes the info bar rendering and moves relevant information to the Overview section
- Adds total crawl size to the overview section
2023-05-03 15:50:15 -04:00
Henry Wilkinson
76c9185d69
Improve Recursive font declaration (#791) 2023-05-03 14:19:21 -04:00
Tessa Walsh
b2005fe389
Fix crawl /errors API endpoint (#813)
* Fix crawl error slicing to ensure a consistent number of errors per page
* Fix total count in paginated API response
2023-05-03 13:58:38 -04:00
sua yoo
60581411eb
Refactor screencast IDs (#800)
Fixes #713, mapping watch windows to exact column/row by id
2023-05-03 10:33:04 -07:00
sua yoo
9a1c2ba871
Fix workflow limit empty values being set to 0 (#795)
* default to null

* pass undefined for removing values

* handle 0 default
2023-05-03 09:25:22 -07:00
Henry Wilkinson
9500fd97fa
Merge pull request #802 from webrecorder/frontend-workflow-controls-update 2023-05-03 00:21:20 -04:00
Henry Wilkinson
a13964c4c4
Merge pull request #809 from webrecorder/frontend-icon-button-aria-label-fixes 2023-05-01 15:38:49 -04:00