- Adds two new crawl finished state, stopped_by_user and stopped_quota_reached - Tracking other possible 'stop reasons' in operator, though not making them distinct states for now. - Updated frontend with 'Stopped by User' and 'Stopped: Time Quota Reached', shown with same icon as current partial_complete - Added migration of partial_complete to either stopped_by_user or complete (no historical quota data available) - Addresses edge case in scaling: if crawl never scaled (no redis entry, no pod), automatically scale down - Edge case in status: if crawl is somehow 'canceled' but not deleted, immediately delete crawl object and begin finalizing. --------- Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
		
			
				
	
	
		
			43 lines
		
	
	
		
			882 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			882 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Backend Lint + Type Check
 | 
						|
 | 
						|
on:
 | 
						|
  push:
 | 
						|
    paths:
 | 
						|
      - 'backend/**'
 | 
						|
  pull_request:
 | 
						|
    paths:
 | 
						|
      - 'backend/**'
 | 
						|
 | 
						|
jobs:
 | 
						|
  unit-tests:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    steps:
 | 
						|
      - name: checkout
 | 
						|
        uses: actions/checkout@v2
 | 
						|
 | 
						|
      - name: Set up Python
 | 
						|
        uses: actions/setup-python@v4
 | 
						|
        with:
 | 
						|
          python-version: '3.10'
 | 
						|
 | 
						|
      - name: Install dependencies
 | 
						|
        run: |
 | 
						|
          cd backend/
 | 
						|
          python -m pip install --upgrade pip
 | 
						|
          pip install -r requirements.txt
 | 
						|
          pip install -U black pylint mypy          
 | 
						|
 | 
						|
      - name: Style Check
 | 
						|
        run: |
 | 
						|
          black --check backend/btrixcloud/          
 | 
						|
 | 
						|
      - name: Lint Check
 | 
						|
        run: |
 | 
						|
          cd backend/
 | 
						|
          pylint btrixcloud/          
 | 
						|
 | 
						|
      - name: Type Check
 | 
						|
        run: |
 | 
						|
          cd backend/
 | 
						|
          mypy --install-types --non-interactive --check-untyped-defs btrixcloud/          
 |