From 7c520e93f97ee1aadbcd427f7591930ddeb9c863 Mon Sep 17 00:00:00 2001 From: Nico Stewart Date: Mon, 30 Sep 2024 12:35:33 -0400 Subject: [PATCH] Remove workflows we don't need --- .../auto-update-jmx-metrics-component.yml | 116 ------------------ .github/workflows/generate-weekly-report.yml | 24 ---- .github/workflows/mark-issues-as-stale.yml | 21 ---- 3 files changed, 161 deletions(-) delete mode 100644 .github/workflows/auto-update-jmx-metrics-component.yml delete mode 100644 .github/workflows/generate-weekly-report.yml delete mode 100644 .github/workflows/mark-issues-as-stale.yml diff --git a/.github/workflows/auto-update-jmx-metrics-component.yml b/.github/workflows/auto-update-jmx-metrics-component.yml deleted file mode 100644 index 8c16408f9778..000000000000 --- a/.github/workflows/auto-update-jmx-metrics-component.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: Auto-update JMX metrics component - -on: - schedule: - # Daily at 01:30 (UTC) - - cron: '30 1 * * *' - workflow_dispatch: - -jobs: - check-versions: - runs-on: ubuntu-latest - outputs: - latest-version: ${{ steps.check-versions.outputs.latest-version }} - already-added: ${{ steps.check-versions.outputs.already-added }} - already-opened: ${{ steps.check-versions.outputs.already-opened }} - steps: - - uses: actions/checkout@v4 - - - id: check-versions - name: Check versions - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - latest_version=$(gh release view \ - --repo open-telemetry/opentelemetry-java-contrib \ - --json tagName \ - --jq .tagName \ - | sed 's/^v//') - - # jmx metric gatherer is currently alpha - latest_version=$latest_version-alpha - - if grep -Pzo "version: \"$latest_version\",\s*jar:\s*\"JMX metrics gatherer\"" receiver/jmxreceiver/supported_jars.go; then - already_added=true - fi - - matches=$(gh pr list \ - --author opentelemetrybot \ - --state open \ - --search "in:title \"Add JMX metrics gatherer version $latest_version\"") - if [ ! -z "$matches" ] - then - already_opened=true - fi - - echo "latest-version=$latest_version" >> $GITHUB_OUTPUT - echo "already-added=$already_added" >> $GITHUB_OUTPUT - echo "already-opened=$already_opened" >> $GITHUB_OUTPUT - - update-jmx-metrics-component: - runs-on: ubuntu-latest - if: | - needs.check-versions.outputs.already-added != 'true' && - needs.check-versions.outputs.already-opened != 'true' - needs: - - check-versions - steps: - - uses: actions/checkout@v4 - - - name: Update version - env: - VERSION: ${{ needs.check-versions.outputs.latest-version }} - run: | - if [[ ! $VERSION =~ -alpha$ ]]; then - echo currently expecting jmx metrics version to end with "-alpha" - exit 1 - fi - - version=${VERSION//-alpha/} - hash=$(curl -L https://github.com/open-telemetry/opentelemetry-java-contrib/releases/download/v$version/opentelemetry-jmx-metrics.jar \ - | sha256sum \ - | cut -d ' ' -f 1) - - # NOTE there are intentional tab characters in the line below - sed -i "/^var jmxMetricsGathererVersions/a \ \"$hash\": {\n version: \"$VERSION\",\n jar: \"JMX metrics gatherer\",\n }," receiver/jmxreceiver/supported_jars.go - git diff - - - name: Use CLA approved github bot - run: | - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com - - - name: Create pull request against main - env: - VERSION: ${{ needs.check-versions.outputs.latest-version }} - # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - run: | - message="Add JMX metrics gatherer version $VERSION" - body="Add JMX metrics gatherer version \`$VERSION\`. - - cc @open-telemetry/java-contrib-approvers - " - branch="opentelemetrybot/add-jmx-metrics-gatherer-${VERSION}" - - git checkout -b $branch - git commit -a -m "$message" - git push --set-upstream origin $branch - url=$(gh pr create --title "$message" \ - --body "$body" \ - --base main) - - pull_request_number=${url//*\//} - - # see the template for change log entry file at blob/main/.chloggen/TEMPLATE.yaml - cat > .chloggen/add-jmx-metrics-gatherer-$VERSION.yaml << EOF - change_type: enhancement - component: jmxreceiver - note: Add the JMX metrics gatherer version $VERSION to the supported jars hash list - issues: [ $pull_request_number ] - EOF - - git add .chloggen/add-jmx-metrics-gatherer-$VERSION.yaml - - git commit -m "Add change log entry" - git push diff --git a/.github/workflows/generate-weekly-report.yml b/.github/workflows/generate-weekly-report.yml deleted file mode 100644 index 41048d45e9e7..000000000000 --- a/.github/workflows/generate-weekly-report.yml +++ /dev/null @@ -1,24 +0,0 @@ -# This action generates a weekly report as a github issue -# More details in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/24672 - -name: 'Generate Weekly Report' -on: - workflow_dispatch: - schedule: - # run every tuesday at 1am UTC - - cron: "0 1 * * 2" - -jobs: - get_issues: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: npm install js-yaml - working-directory: ./.github/workflows/scripts - - uses: actions/github-script@v7 - id: get-issues - with: - retries: 3 - script: | - const script = require('.github/workflows/scripts/generate-weekly-report.js') - await script({github, context}) diff --git a/.github/workflows/mark-issues-as-stale.yml b/.github/workflows/mark-issues-as-stale.yml deleted file mode 100644 index 8cb4c88d35f7..000000000000 --- a/.github/workflows/mark-issues-as-stale.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: 'Mark issues as stale' -on: - schedule: - - cron: "27 3 * * 1-5" # Run at an arbitrary time on weekdays. - -jobs: - mark-issues-as-stale: - runs-on: ubuntu-latest - if: ${{ github.repository_owner == 'open-telemetry' }} - steps: - - uses: actions/checkout@v4 - - - name: Run mark-issues-as-stale.sh - run: ./.github/workflows/scripts/mark-issues-as-stale.sh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DAYS_BEFORE_STALE: 60 - DAYS_BEFORE_CLOSE: 60 # Only used for the stale message. - STALE_LABEL: 'Stale' - EXEMPT_LABEL: 'never stale' -