diff --git a/.azure/app-cloud-e2e.yml b/.azure/app-cloud-e2e.yml index c7262c2bc5..aed2cd07b9 100644 --- a/.azure/app-cloud-e2e.yml +++ b/.azure/app-cloud-e2e.yml @@ -24,8 +24,10 @@ variables: jobs: - job: App_cloud_e2e_testing - pool: - vmImage: 'ubuntu-latest' + pool: azure-cpus + container: + image: mcr.microsoft.com/playwright/python:v1.25.2-focal + options: "--shm-size=2g" timeoutInMinutes: "30" cancelTimeoutInMinutes: "2" strategy: @@ -56,6 +58,7 @@ jobs: clean: all steps: - bash: | + whoami python --version pip --version displayName: 'Info' @@ -80,10 +83,10 @@ jobs: - bash: | python -m pip install playwright - python -m playwright install --with-deps + python -m playwright install # --with-deps displayName: 'Install Playwright system dependencies' - - bash: pip install -e . + - bash: pip install -e . --find-links https://download.pytorch.org/whl/cpu/torch_stable.html displayName: 'Install lightning' - bash: | @@ -110,12 +113,12 @@ jobs: TEST_APP_NAME: $(name) HAR_LOCATION: './artifacts/hars' SLOW_MO: '50' - LAI_USER: $(LAI_USER) - LAI_PASS: $(LAI_PASS) - LIGHTNING_USER_ID: $(LIGHTNING_USER_ID) - LIGHTNING_API_KEY: $(LIGHTNING_API_KEY) + # LAI_USER: $(LAI_USER) + # LAI_PASS: $(LAI_PASS) + LIGHTNING_USER_ID: $(LIGHTNING_USER_ID_PROD) + LIGHTNING_API_KEY: $(LIGHTNING_API_KEY_PROD) LIGHTNING_USERNAME: $(LIGHTNING_USERNAME) - LIGHTNING_CLOUD_URL: $(LIGHTNING_CLOUD_URL) + LIGHTNING_CLOUD_URL: $(LIGHTNING_CLOUD_URL_PROD) displayName: 'Run the tests' - publish: '$(Build.ArtifactStagingDirectory)/videos' @@ -125,16 +128,16 @@ jobs: - bash: | time python -c "from lightning.app import testing; testing.delete_cloud_lightning_apps()" env: - LAI_USER: $(LAI_USER) - LAI_PASS: $(LAI_PASS) - LIGHTNING_USER_ID: $(LIGHTNING_USER_ID) - LIGHTNING_API_KEY: $(LIGHTNING_API_KEY) + # LAI_USER: $(LAI_USER) + # LAI_PASS: $(LAI_PASS) + LIGHTNING_USER_ID: $(LIGHTNING_USER_ID_PROD) + LIGHTNING_API_KEY: $(LIGHTNING_API_KEY_PROD) LIGHTNING_USERNAME: $(LIGHTNING_USERNAME) - LIGHTNING_CLOUD_URL: $(LIGHTNING_CLOUD_URL) + LIGHTNING_CLOUD_URL: $(LIGHTNING_CLOUD_URL_PROD) PR_NUMBER: $(local_id) TEST_APP_NAME: $(name) - GRID_USER_ID: $(LIGHTNING_USER_ID) # TODO: clarify the meaning - GRID_USER_KEY: $(LIGHTNING_API_KEY) # TODO: clarify the meaning - GRID_URL: $(LIGHTNING_CLOUD_URL) - _GRID_USERNAME: $(LIGHTNING_USERNAME) + # GRID_USER_ID: $(LIGHTNING_USER_ID) # TODO: clarify the meaning + # GRID_USER_KEY: $(LIGHTNING_API_KEY) # TODO: clarify the meaning + # GRID_URL: $(LIGHTNING_CLOUD_URL) + # _GRID_USERNAME: $(LIGHTNING_USERNAME) displayName: 'Clean Previous Apps' diff --git a/src/lightning_app/testing/testing.py b/src/lightning_app/testing/testing.py index 884c02a052..1ccc8ba1ff 100644 --- a/src/lightning_app/testing/testing.py +++ b/src/lightning_app/testing/testing.py @@ -224,7 +224,7 @@ def run_app_in_cloud(app_folder: str, app_name: str = "app.py", extra_args: [str context = browser.new_context( # Eventually this will need to be deleted http_credentials=HttpCredentials( - {"username": os.getenv("LAI_USER").strip(), "password": os.getenv("LAI_PASS")} + {"username": os.getenv("LAI_USER", "").strip(), "password": os.getenv("LAI_PASS", "")} ), record_video_dir=os.path.join(Config.video_location, TEST_APP_NAME), record_har_path=Config.har_location,