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') }}-v23
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'
@@ -123,40 +123,6 @@ jobs:
123123 else
124124 echo "synapse_pat_available=true" >> $GITHUB_OUTPUT;
125125 fi
126- - name : OpenTelemtry pre-check
127- id : otel-check
128- if : ${{ steps.secret-check.outputs.secrets_available == 'true' && steps.secret-check.outputs.synapse_pat_available == 'true' }}
129- shell : bash
130- run : |
131- # Leave disabled during normal integration test runs - Enable when we want to
132- # collect the data.
133- # echo "run_opentelemetry=true" >> $GITHUB_OUTPUT;
134- echo "run_opentelemetry=false" >> $GITHUB_OUTPUT;
135-
136- # AWS CLI is pre-installed on github hosted runners - Commented out for GH runs
137- # curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
138- # unzip awscliv2.zip
139- # sudo ./aws/install
140- # curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb"
141- # sudo dpkg -i session-manager-plugin.deb
142- # - name: Create AWS Config
143- # if: ${{ steps.otel-check.outputs.run_opentelemetry == 'true' }}
144- # shell: bash
145- # run: |
146- # touch test.awsConfig
147- # 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
148- # chmod +x tests/integration/synapse_creds.sh
149- # If you are exporting data using `otlp` you can start a port forwading session
150- # - name: SSM Port Forward Start
151- # if: ${{ steps.otel-check.outputs.run_opentelemetry == 'true' }}
152- # shell: bash
153- # env:
154- # AWS_CONFIG_FILE: "test.awsConfig"
155- # run: |
156- # # Start a port-forwarding session in a non-interactive way. AWS will clean-up
157- # # stale sessions after 20 minutes of inactivity
158- # aws ssm start-session --target i-0ffcdecd1edf375ee --document-name AWS-StartPortForwardingSession --parameters "portNumber"=["4318"],"localPortNumber"=["4318"] & disown
159- # sleep 15
160126
161127 # run integration tests iff the decryption keys for the test configuration are available.
162128 # they will not be available in pull requests from forks.
@@ -194,10 +160,12 @@ jobs:
194160 export EXTERNAL_S3_BUCKET_NAME="${{secrets.EXTERNAL_S3_BUCKET_NAME}}"
195161 export EXTERNAL_S3_BUCKET_AWS_ACCESS_KEY_ID="${{secrets.EXTERNAL_S3_BUCKET_AWS_ACCESS_KEY_ID}}"
196162 export EXTERNAL_S3_BUCKET_AWS_SECRET_ACCESS_KEY="${{secrets.EXTERNAL_S3_BUCKET_AWS_SECRET_ACCESS_KEY}}"
197- if [ ${{ steps.otel-check.outputs.run_opentelemetry }} == "true" ]; then
198- # Set to 'file' to enable OpenTelemetry export to file
199- export SYNAPSE_OTEL_INTEGRATION_TEST_EXPORTER="file"
200- fi
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 }}"
201169
202170 # Setup ignore patterns based on Python version
203171 IGNORE_FLAGS="--ignore=tests/integration/synapseclient/test_command_line_client.py"
@@ -217,13 +185,6 @@ jobs:
217185
218186 # Execute the CLI tests in a non-dist way because they were causing some test instability when being run concurrently
219187 pytest -sv --reruns 3 --cov-append --cov=. --cov-report xml tests/integration/synapseclient/test_command_line_client.py
220- - name : Upload otel spans
221- uses : actions/upload-artifact@v4
222- if : always()
223- with :
224- name : otel_spans_integration_testing_${{ matrix.os }}
225- path : tests/integration/otel_spans_integration_testing_*.ndjson
226- if-no-files-found : ignore
227188 - name : Upload coverage report
228189 id : upload_coverage_report
229190 uses : actions/upload-artifact@v4
0 commit comments