From bccccde568c05a7a641110c90d4ed95047cdea4e Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 22 Jun 2024 18:01:47 -0700 Subject: [PATCH] remove mapbox references (#32811) --- .github/workflows/selfdrive_tests.yaml | 2 -- .github/workflows/tools_tests.yaml | 3 +-- Jenkinsfile | 3 --- selfdrive/test/process_replay/model_replay.py | 25 ------------------- 4 files changed, 1 insertion(+), 32 deletions(-) diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index e9a067041268e2..ea591cbf47a267 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -123,7 +123,6 @@ jobs: timeout-minutes: 15 run: | ${{ env.RUN }} "source selfdrive/test/setup_xvfb.sh && \ - export MAPBOX_TOKEN='pk.eyJ1Ijoiam5ld2IiLCJhIjoiY2xxNW8zZXprMGw1ZzJwbzZneHd2NHljbSJ9.gV7VPRfbXFetD-1OVF0XZg' && \ $PYTEST --timeout 60 -m 'not slow' && \ ./selfdrive/ui/tests/create_test_translations.sh && \ QT_QPA_PLATFORM=offscreen ./selfdrive/ui/tests/test_translations && \ @@ -301,7 +300,6 @@ jobs: run: > ${{ env.RUN }} "PYTHONWARNINGS=ignore && source selfdrive/test/setup_xvfb.sh && - export MAPBOX_TOKEN='pk.eyJ1Ijoiam5ld2IiLCJhIjoiY2xxNW8zZXprMGw1ZzJwbzZneHd2NHljbSJ9.gV7VPRfbXFetD-1OVF0XZg' && python selfdrive/ui/tests/test_ui/run.py" - name: Upload Test Report uses: actions/upload-artifact@v4 diff --git a/.github/workflows/tools_tests.yaml b/.github/workflows/tools_tests.yaml index 9a26ca9a20936a..a1c95c046514e6 100644 --- a/.github/workflows/tools_tests.yaml +++ b/.github/workflows/tools_tests.yaml @@ -34,8 +34,7 @@ jobs: ${{ env.RUN }} "scons -j$(nproc)" - name: Run bridge test run: | - ${{ env.RUN }} "export MAPBOX_TOKEN='pk.eyJ1Ijoiam5ld2IiLCJhIjoiY2xxNW8zZXprMGw1ZzJwbzZneHd2NHljbSJ9.gV7VPRfbXFetD-1OVF0XZg' && \ - source selfdrive/test/setup_xvfb.sh && \ + ${{ env.RUN }} "source selfdrive/test/setup_xvfb.sh && \ source selfdrive/test/setup_vsound.sh && \ CI=1 pytest tools/sim/tests/test_metadrive_bridge.py" diff --git a/Jenkinsfile b/Jenkinsfile index 321237716b291d..654aed49c5b6db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,6 @@ export SOURCE_DIR=${env.SOURCE_DIR} export GIT_BRANCH=${env.GIT_BRANCH} export GIT_COMMIT=${env.GIT_COMMIT} export AZURE_TOKEN='${env.AZURE_TOKEN}' -export MAPBOX_TOKEN='${env.MAPBOX_TOKEN}' # only use 1 thread for tici tests since most require HIL export PYTEST_ADDOPTS="-n 0" @@ -135,10 +134,8 @@ def pcStage(String stageName, Closure body) { def setupCredentials() { withCredentials([ string(credentialsId: 'azure_token', variable: 'AZURE_TOKEN'), - string(credentialsId: 'mapbox_token', variable: 'MAPBOX_TOKEN') ]) { env.AZURE_TOKEN = "${AZURE_TOKEN}" - env.MAPBOX_TOKEN = "${MAPBOX_TOKEN}" } } diff --git a/selfdrive/test/process_replay/model_replay.py b/selfdrive/test/process_replay/model_replay.py index cba2edfd58b5a8..28826144e8666c 100755 --- a/selfdrive/test/process_replay/model_replay.py +++ b/selfdrive/test/process_replay/model_replay.py @@ -81,31 +81,6 @@ def model_replay(lr, frs): 'wideRoadCameraState': FrameReader(get_url(TEST_ROUTE, SEGMENT, log_type="ecamera"), readahead=True) } - # Update tile refs - if update: - import urllib - import requests - import threading - import http.server - from openpilot.tools.lib.openpilotci import upload_bytes - os.environ['MAPS_HOST'] = 'http://localhost:5000' - - class HTTPRequestHandler(http.server.BaseHTTPRequestHandler): - def do_GET(self): - assert len(self.path) > 10 # Sanity check on path length - r = requests.get(f'https://api.mapbox.com{self.path}', timeout=30) - upload_bytes(r.content, urllib.parse.urlparse(self.path).path.lstrip('/')) - self.send_response(r.status_code) - self.send_header('Content-type','text/html') - self.end_headers() - self.wfile.write(r.content) - - server = http.server.HTTPServer(("127.0.0.1", 5000), HTTPRequestHandler) - thread = threading.Thread(None, server.serve_forever, daemon=True) - thread.start() - else: - os.environ['MAPS_HOST'] = BASE_URL.rstrip('/') - log_msgs = [] # run replays if not NO_MODEL: