@@ -83,12 +83,14 @@ jobs:
8383 path : |
8484 ${{ steps.get-dependencies.outputs.site_packages_loc }}
8585 ${{ steps.get-dependencies.outputs.site_bin_dir }}
86- key : ${{ runner.os }}-${{ matrix.python }}-build-${{ env.cache-name }}-${{ hashFiles('setup.py') }}-v22
86+ key : ${{ runner.os }}-${{ matrix.python }}-build-${{ env.cache-name }}-${{ hashFiles('setup.py') }}-v24
8787
8888 - name : Install py-dependencies
8989 if : steps.cache-dependencies.outputs.cache-hit != 'true'
9090 shell : bash
9191 run : |
92+ python -m pip install --upgrade pip
93+
9294 pip install -e ".[boto3,pandas,pysftp,tests]"
9395
9496 # ensure that numpy c extensions are installed on windows
@@ -121,40 +123,6 @@ jobs:
121123 else
122124 echo "synapse_pat_available=true" >> $GITHUB_OUTPUT;
123125 fi
124- - name : OpenTelemtry pre-check
125- id : otel-check
126- if : ${{ steps.secret-check.outputs.secrets_available == 'true' && steps.secret-check.outputs.synapse_pat_available == 'true' }}
127- shell : bash
128- run : |
129- # Leave disabled during normal integration test runs - Enable when we want to
130- # collect the data.
131- # echo "run_opentelemetry=true" >> $GITHUB_OUTPUT;
132- echo "run_opentelemetry=false" >> $GITHUB_OUTPUT;
133-
134- # AWS CLI is pre-installed on github hosted runners - Commented out for GH runs
135- # curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
136- # unzip awscliv2.zip
137- # sudo ./aws/install
138- # curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb"
139- # sudo dpkg -i session-manager-plugin.deb
140- # - name: Create AWS Config
141- # if: ${{ steps.otel-check.outputs.run_opentelemetry == 'true' }}
142- # shell: bash
143- # run: |
144- # touch test.awsConfig
145- # printf "[default]\nregion = us-east-1\ncredential_process = \"tests/integration/synapse_creds.sh\" \"https://sc.sageit.org\" \"${{ secrets.synapse_personal_access_token }}\"\n" >> test.awsConfig
146- # chmod +x tests/integration/synapse_creds.sh
147- # If you are exporting data using `otlp` you can start a port forwading session
148- # - name: SSM Port Forward Start
149- # if: ${{ steps.otel-check.outputs.run_opentelemetry == 'true' }}
150- # shell: bash
151- # env:
152- # AWS_CONFIG_FILE: "test.awsConfig"
153- # run: |
154- # # Start a port-forwarding session in a non-interactive way. AWS will clean-up
155- # # stale sessions after 20 minutes of inactivity
156- # aws ssm start-session --target i-0ffcdecd1edf375ee --document-name AWS-StartPortForwardingSession --parameters "portNumber"=["4318"],"localPortNumber"=["4318"] & disown
157- # sleep 15
158126
159127 # run integration tests iff the decryption keys for the test configuration are available.
160128 # they will not be available in pull requests from forks.
@@ -192,23 +160,31 @@ jobs:
192160 export EXTERNAL_S3_BUCKET_NAME="${{secrets.EXTERNAL_S3_BUCKET_NAME}}"
193161 export EXTERNAL_S3_BUCKET_AWS_ACCESS_KEY_ID="${{secrets.EXTERNAL_S3_BUCKET_AWS_ACCESS_KEY_ID}}"
194162 export EXTERNAL_S3_BUCKET_AWS_SECRET_ACCESS_KEY="${{secrets.EXTERNAL_S3_BUCKET_AWS_SECRET_ACCESS_KEY}}"
195- if [ ${{ steps.otel-check.outputs.run_opentelemetry }} == "true" ]; then
196- # Set to 'file' to enable OpenTelemetry export to file
197- export SYNAPSE_OTEL_INTEGRATION_TEST_EXPORTER="file"
163+
164+ # Set env vars for OTEL
165+ export OTEL_EXPORTER_OTLP_ENDPOINT="${{ vars.OTEL_EXPORTER_OTLP_ENDPOINT }}"
166+ export OTEL_SERVICE_INSTANCE_ID="${{ vars.OTEL_SERVICE_INSTANCE_ID }}"
167+ export SYNAPSE_INTEGRATION_TEST_OTEL_ENABLED="${{ vars.SYNAPSE_INTEGRATION_TEST_OTEL_ENABLED }}"
168+ export OTEL_EXPORTER_OTLP_HEADERS="${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}"
169+
170+ # Setup ignore patterns based on Python version
171+ IGNORE_FLAGS="--ignore=tests/integration/synapseclient/test_command_line_client.py"
172+
173+ if [ "${{ matrix.python }}" == "3.9" ]; then
174+ # For min Python version, ignore async tests
175+ IGNORE_FLAGS="$IGNORE_FLAGS --ignore=tests/integration/synapseclient/models/async/"
176+ echo "Running integration tests for Min Python version (3.9) - ignoring async tests"
177+ elif [ "${{ matrix.python }}" == "3.13" ]; then
178+ # For max Python version, ignore synchronous tests
179+ IGNORE_FLAGS="$IGNORE_FLAGS --ignore=tests/integration/synapseclient/models/synchronous/"
180+ echo "Running integration tests for Max Python version (3.13) - ignoring synchronous tests"
198181 fi
199182
200183 # use loadscope to avoid issues running tests concurrently that share scoped fixtures
201- pytest -sv --reruns 3 --cov-append --cov=. --cov-report xml tests/integration -n 8 --ignore=tests/integration/synapseclient/test_command_line_client.py --dist loadscope
184+ pytest -sv --reruns 3 --cov-append --cov=. --cov-report xml tests/integration -n 8 $IGNORE_FLAGS --dist loadscope
202185
203186 # Execute the CLI tests in a non-dist way because they were causing some test instability when being run concurrently
204187 pytest -sv --reruns 3 --cov-append --cov=. --cov-report xml tests/integration/synapseclient/test_command_line_client.py
205- - name : Upload otel spans
206- uses : actions/upload-artifact@v4
207- if : always()
208- with :
209- name : otel_spans_integration_testing_${{ matrix.os }}
210- path : tests/integration/otel_spans_integration_testing_*.ndjson
211- if-no-files-found : ignore
212188 - name : Upload coverage report
213189 id : upload_coverage_report
214190 uses : actions/upload-artifact@v4
0 commit comments