From cf4a9c56671cbe6da393b2c8489a521502957261 Mon Sep 17 00:00:00 2001 From: Tyler Jang Date: Wed, 13 Nov 2024 00:35:12 -0800 Subject: [PATCH] (Chore): Various repo cleanup and support quarantining (#905) Clean up some old todos and change the nightly+weekly cadences slightly to hopefully be less flaky. Also adds the setup needed to support quarantining Successful [run](https://github.com/trunk-io/plugins/actions/runs/11678088415/job/32517018048?pr=905) verifying intended functionality --- .github/actions/action_tests/action.yaml | 3 ++- .github/actions/linter_tests/action.yaml | 5 +++-- .github/actions/tool_tests/action.yaml | 3 ++- .github/dependabot.yaml | 9 ++------- .github/workflows/nightly.yaml | 4 ++-- .github/workflows/upgrade_trunk.yaml | 4 ++-- .github/workflows/windows_nightly.yaml | 2 +- linters/ansible-lint/plugin.yaml | 1 - linters/plugin.yaml | 1 - linters/scalafmt/plugin.yaml | 2 ++ tests/utils/landing_state.ts | 3 +-- 11 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/actions/action_tests/action.yaml b/.github/actions/action_tests/action.yaml index faac5b6c3..74775a4e6 100644 --- a/.github/actions/action_tests/action.yaml +++ b/.github/actions/action_tests/action.yaml @@ -55,6 +55,7 @@ runs: run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --passWithNoTests --ci shell: bash working-directory: ${{ inputs.path }} + continue-on-error: true env: JEST_SUITE_NAME: Action Tests PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} @@ -80,6 +81,6 @@ runs: junit-paths: junit.xml org-slug: trunk-staging-org token: ${{ inputs.trunk-staging-token }} - continue-on-error: true + quarantine: true env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io diff --git a/.github/actions/linter_tests/action.yaml b/.github/actions/linter_tests/action.yaml index 43bc45381..0f2af97d3 100644 --- a/.github/actions/linter_tests/action.yaml +++ b/.github/actions/linter_tests/action.yaml @@ -98,13 +98,14 @@ runs: run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci shell: bash working-directory: ${{ inputs.path }} + continue-on-error: true env: PLUGINS_TEST_LINTER_VERSION: ${{ inputs.linter-version }} PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }} SOURCERY_TOKEN: ${{ inputs.sourcery-token }} # Debug recurrent eslint circular JSON errors - DEBUG: Driver:eslint:*,Driver:nixpkgs-fmt:* + DEBUG: Driver:eslint:*,Driver:nixpkgs-fmt:*,Driver:trunk-toolbox:* JEST_SUITE_NAME: Linter Tests JEST_JUNIT_SUITE_NAME: "{title} ${{ runner.os }} ${{ inputs.ref-type }} ${{ inputs.linter-version }}" @@ -129,6 +130,6 @@ runs: junit-paths: junit.xml org-slug: trunk-staging-org token: ${{ inputs.trunk-staging-token }} - continue-on-error: true + quarantine: true env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io diff --git a/.github/actions/tool_tests/action.yaml b/.github/actions/tool_tests/action.yaml index 598f8c7cd..f9cba9e88 100644 --- a/.github/actions/tool_tests/action.yaml +++ b/.github/actions/tool_tests/action.yaml @@ -71,6 +71,7 @@ runs: run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci shell: bash working-directory: ${{ inputs.path }} + continue-on-error: true env: PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }} @@ -97,6 +98,6 @@ runs: junit-paths: junit.xml org-slug: trunk-staging-org token: ${{ inputs.trunk-staging-token }} - continue-on-error: true + quarantine: true env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 71d8bd7c0..667b66339 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -5,8 +5,7 @@ updates: schedule: interval: weekly day: sunday - # trunk-ignore(yamllint/quoted-strings) - time: "08:00" # UTC + time: "10:00" # UTC groups: dependencies: patterns: @@ -18,13 +17,9 @@ updates: schedule: interval: weekly day: sunday - # trunk-ignore(yamllint/quoted-strings) - time: "08:00" # UTC + time: "10:00" # UTC groups: dependencies: patterns: - "*" - # TODO(Tyler): Readd once eslint9 is resolved. - ignore: - - dependency-name: eslint open-pull-requests-limit: 2 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index d0a5b8f33..38ca98d4b 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -1,8 +1,8 @@ name: Nightly on: schedule: - # Times in UTC (PST+8), this translates to running Mon-Fri at midnight/1am (depending on DST) - - cron: 0 8 * * 1-5 + # Times in UTC (PST+8), this translates to running Mon-Fri at 2am/3am (depending on DST) + - cron: 0 10 * * 1-5 # Only enable on pull requests for testing # pull_request: # paths: [.github/workflows/nightly.yaml] diff --git a/.github/workflows/upgrade_trunk.yaml b/.github/workflows/upgrade_trunk.yaml index 611dc1ee4..d9a6fc8b9 100644 --- a/.github/workflows/upgrade_trunk.yaml +++ b/.github/workflows/upgrade_trunk.yaml @@ -1,8 +1,8 @@ name: Upgrade Trunk Weekly on: schedule: - # Weekly at midnight W morning - - cron: 0 8 * * 3 + # Weekly W morning + - cron: 0 10 * * 3 workflow_dispatch: {} permissions: read-all diff --git a/.github/workflows/windows_nightly.yaml b/.github/workflows/windows_nightly.yaml index 83ffbdfba..5825a4486 100644 --- a/.github/workflows/windows_nightly.yaml +++ b/.github/workflows/windows_nightly.yaml @@ -1,6 +1,6 @@ name: Windows Tests on: - # TODO(Tyler): Preserve this workflow for testing, but in the future we'll want to remove it. + # NOTE(Tyler): Preserve this workflow for testing, but in the future we'll want to remove it. workflow_dispatch: {} permissions: read-all diff --git a/linters/ansible-lint/plugin.yaml b/linters/ansible-lint/plugin.yaml index ca71524ac..0e9caec4d 100644 --- a/linters/ansible-lint/plugin.yaml +++ b/linters/ansible-lint/plugin.yaml @@ -1,7 +1,6 @@ version: 0.1 tools: definitions: - # TODO(Tyler): Once we can make ansible its own tool without breaking upgrade, this should be extracted into its own tool directory - name: ansible-lint runtime: python package: ansible-lint diff --git a/linters/plugin.yaml b/linters/plugin.yaml index a4ad69cf9..3150762b0 100644 --- a/linters/plugin.yaml +++ b/linters/plugin.yaml @@ -455,7 +455,6 @@ lint: - name: postcss extensions: - # TODO(Tyler): Do we want to include css here as well? - pcss - postcss diff --git a/linters/scalafmt/plugin.yaml b/linters/scalafmt/plugin.yaml index a1ce10dcb..e3fecea56 100644 --- a/linters/scalafmt/plugin.yaml +++ b/linters/scalafmt/plugin.yaml @@ -46,3 +46,5 @@ lint: parse_regex: scalafmt ${semver} run: scalafmt --version known_good_version: 3.4.3 + # We don't support this semver format, and it's a prerelease + known_bad_versions: [3.8.4-RC1] diff --git a/tests/utils/landing_state.ts b/tests/utils/landing_state.ts index 4613cb2ca..da433ca78 100644 --- a/tests/utils/landing_state.ts +++ b/tests/utils/landing_state.ts @@ -21,8 +21,7 @@ const normalizePlatformPath = (originalPath: string | undefined) => { return originalPath; }; -// TODO(Tyler): These extract functions are used to filter down to deterministic fields. In the future -// we should preserve the original structure and use jest matchers on the non-deterministic fields. +// These extract functions are used to filter down to deterministic fields. const extractLintActionFields = ({ actionDurationMs: _actionDurationMs, cacheHit: _cacheHit,