Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable sending metrics and traces #2993

Merged
merged 13 commits into from
Oct 3, 2024
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: echo ${{ github.event.number }} > PR_NUMBER.txt
- name: Archive PR number
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: PR_NUMBER
path: PR_NUMBER.txt
60 changes: 60 additions & 0 deletions .github/workflows/smoketest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Playwright Tests against open-vsx.org
on:
push:
branches:
- production
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: open-vsx.org
- uses: actions/checkout@v4
with:
repository: eclipse/openvsx
path: openvsx
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install dependencies
working-directory: ./openvsx/webui
run: yarn
- name: Install Playwright Browsers
working-directory: ./openvsx/webui
run: yarn playwright install --with-deps
- name: Get server version
id: read_version
run: |
read -r line < ./open-vsx.org/Dockerfile
version="${line:19}"
echo "version=${line:19}" >> "$GITHUB_OUTPUT"
- name: Wait 10 minutes for deployment
run: sleep 10m
- name: Get running server version
id: running_version
uses: fjogeleit/http-request-action@v1
with:
url: "https://open-vsx.org/api/version"
method: GET
- name: Check new server deployment is running
id: check_version
run: |
echo "is_version=${{ steps.running_version.outputs.status == 200 && fromJson(steps.running_version.outputs.response).version == steps.read_version.outputs.version }}" >> "$GITHUB_OUTPUT"
- name: Run Playwright tests
if: steps.check_version.outputs.is_version == 'true'
working-directory: ./openvsx/webui
run: yarn smoke-tests
- uses: actions/upload-artifact@v4
if: steps.check_version.outputs.is_version == 'true'
with:
name: playwright-report
path: openvsx/webui/playwright-report/
retention-days: 30
- name: Fail smoke test
if: steps.check_version.outputs.is_version != 'true'
uses: actions/github-script@v7
with:
script: |
core.setFailed('Deployed version is not ${{ steps.read_version.outputs.version }}')
4 changes: 2 additions & 2 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Download PR number artifact
if: github.event.workflow_run.event == 'pull_request'
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: Build
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -32,7 +32,7 @@ jobs:
full_name: ${{ github.event.repository.full_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/logback-sprin
COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/ehcache.xml BOOT-INF/classes/

# Replace version placeholder with arg value
RUN sed -i "s/<SERVER_VERSION>/$SERVER_VERSION/g" config/application.yml
RUN sed -i "s/<SERVER_VERSION>/$SERVER_VERSION/g" config/application.yml
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ This repository contains the source of [open-vsx.org](https://open-vsx.org), the

The main artifact is the Docker image available at [ghcr.io/eclipsefdn/openvsx-website](https://github.com/orgs/EclipseFdn/packages/container/package/openvsx-website). It contains the server application with customized frontend and base configuration.

## Publishing and Managing Extensions

For information on publishing and managing extensions at [open-vsx.org](https://open-vsx.org), please see
the [open-vsx.org wiki](https://github.com/EclipseFdn/open-vsx.org/wiki).

## Claiming Namespace Ownership

[Open VSX namespaces](https://github.com/eclipse/openvsx/wiki/Namespace-Access) are public by default. [Create an issue here](https://github.com/EclipseFdn/open-vsx.org/issues/new/choose) to claim ownership of a namespace.
Expand Down
6 changes: 5 additions & 1 deletion configuration/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ server:
spring:
application:
name: openvsx-server
autoconfigure:
# don't send traces to Zipkin
exclude: org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration
config:
import: file:${DEPLOYMENT_CONFIG}
cache:
Expand Down Expand Up @@ -77,7 +80,7 @@ management:
exposure:
include:
- health
- prometheus
# - prometheus
tracing:
sampling:
probability: 0.1
Expand Down Expand Up @@ -162,6 +165,7 @@ ovsx:
elasticsearch:
enabled: true
ssl: true
search:
relevance:
rating: 0.2
downloads: 1.0
Expand Down
Loading