flows: inspector (#1469)
* flows: add initial inspector Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * flows: change naming a bit Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web/flow: add inspector frame Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * core: don't use shadydom when inspecting Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * flows: add current stage to api Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * stages/*: fix imports Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * flows: deep-copy plan instead of just adding Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web/flows: ui Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * flows: restrict inspector to admin Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web/admin: add buttons to launch flow with inspector Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web/flows: don't automatically follow redirects when inspector is open Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * flows: make current_plan optional, only require historry Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web/flows: handle error messages in inspector Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web/flows: improve UI when flow is done Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * flows: add is_completed flag to inspector Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * flows: fix monkeypatches for tests Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * flows: add inspector tests Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * ci: re-enable cache Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		
							
								
								
									
										126
									
								
								.github/workflows/ci-main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										126
									
								
								.github/workflows/ci-main.yml
									
									
									
									
										vendored
									
									
								
							@ -25,14 +25,14 @@ jobs:
 | 
			
		||||
      - uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: '3.9'
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: scripts/ci_prepare.sh
 | 
			
		||||
      - name: run pylint
 | 
			
		||||
        run: pipenv run pylint authentik tests lifecycle
 | 
			
		||||
@ -43,14 +43,14 @@ jobs:
 | 
			
		||||
      - uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: '3.9'
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: scripts/ci_prepare.sh
 | 
			
		||||
      - name: run black
 | 
			
		||||
        run: pipenv run black --check authentik tests lifecycle
 | 
			
		||||
@ -61,14 +61,14 @@ jobs:
 | 
			
		||||
      - uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: '3.9'
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: scripts/ci_prepare.sh
 | 
			
		||||
      - name: run isort
 | 
			
		||||
        run: pipenv run isort --check authentik tests lifecycle
 | 
			
		||||
@ -79,14 +79,14 @@ jobs:
 | 
			
		||||
      - uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: '3.9'
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: scripts/ci_prepare.sh
 | 
			
		||||
      - name: run bandit
 | 
			
		||||
        run: pipenv run bandit -r authentik tests lifecycle
 | 
			
		||||
@ -113,14 +113,14 @@ jobs:
 | 
			
		||||
      - uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: '3.9'
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: scripts/ci_prepare.sh
 | 
			
		||||
      - name: run migrations
 | 
			
		||||
        run: pipenv run python -m lifecycle.migrate
 | 
			
		||||
@ -138,14 +138,14 @@ jobs:
 | 
			
		||||
          # Copy current, latest config to local
 | 
			
		||||
          cp authentik/lib/default.yml local.env.yml
 | 
			
		||||
          git checkout $(git describe --abbrev=0 --match 'version/*')
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: scripts/ci_prepare.sh
 | 
			
		||||
      - name: run migrations to stable
 | 
			
		||||
        run: pipenv run python -m lifecycle.migrate
 | 
			
		||||
@ -168,14 +168,14 @@ jobs:
 | 
			
		||||
      - uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: '3.9'
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: scripts/ci_prepare.sh
 | 
			
		||||
      - uses: testspace-com/setup-testspace@v1
 | 
			
		||||
        with:
 | 
			
		||||
@ -197,14 +197,14 @@ jobs:
 | 
			
		||||
      - uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: '3.9'
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: scripts/ci_prepare.sh
 | 
			
		||||
      - uses: testspace-com/setup-testspace@v1
 | 
			
		||||
        with:
 | 
			
		||||
@ -236,14 +236,14 @@ jobs:
 | 
			
		||||
      - uses: testspace-com/setup-testspace@v1
 | 
			
		||||
        with:
 | 
			
		||||
          domain: ${{github.repository_owner}}
 | 
			
		||||
      # - id: cache-pipenv
 | 
			
		||||
      #   uses: actions/cache@v2.1.6
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     path: ~/.local/share/virtualenvs
 | 
			
		||||
      #     key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - id: cache-pipenv
 | 
			
		||||
        uses: actions/cache@v2.1.6
 | 
			
		||||
        with:
 | 
			
		||||
          path: ~/.local/share/virtualenvs
 | 
			
		||||
          key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
 | 
			
		||||
      - name: prepare
 | 
			
		||||
        # env:
 | 
			
		||||
        #   INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        env:
 | 
			
		||||
          INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
 | 
			
		||||
        run: |
 | 
			
		||||
          scripts/ci_prepare.sh
 | 
			
		||||
          docker-compose -f tests/e2e/ci.docker-compose.yml up -d
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user