ci: add nightly contract tests with long-running tests and Slack notification#136
ci: add nightly contract tests with long-running tests and Slack notification#136devin-ai-integration[bot] wants to merge 4 commits intomainfrom
Conversation
…fication Co-Authored-By: tanderson@launchdarkly.com <tanderson@launchdarkly.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-authored-by: semgrep-code-launchdarkly[bot] <167133144+semgrep-code-launchdarkly[bot]@users.noreply.github.com>
There was a problem hiding this comment.
For reviewers: These tests are not passing because they are written against the Go impl. I need to update the FDv2 Data System spec to specify the edge case behavior and timings to either match Go or update Go and then update the Java, Dotnet, and Node impls to match that.
| if: ${{ inputs.test_slack_notification == true || inputs.test_slack_notification == 'true' }} | ||
| steps: | ||
| - name: Send test Slack notification | ||
| uses: slackapi/slack-github-action@v2.1.0 |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
To resolve this comment:
✨ Commit Assistant fix suggestion
| uses: slackapi/slack-github-action@v2.1.0 | |
| uses: slackapi/slack-github-action@3f4fd9c4819a1c06c6f2d56a8dd2c19b3bd33080 |
View step-by-step instructions
- Replace
uses: slackapi/slack-github-action@v2.1.0with a reference to the action's full commit SHA instead of the version tag. - Visit the action's repository at https://github.com/slackapi/slack-github-action, go to the "Releases" or "Tags" section, and find the commit SHA corresponding to
v2.1.0. - Use the full 40-character commit SHA in the
usesfield, for example:uses: slackapi/slack-github-action@b90c43eb73a2ada7ef1e8c9a23e4bab654742b91(replace with the correct SHA for v2.1.0). - Make this change for all instances of
slackapi/slack-github-action@v2.1.0in your workflow files.
Using the full commit SHA ensures the GitHub Action source cannot change unexpectedly.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by third-party-action-not-pinned-to-commit-sha.
You can view more details about this finding in the Semgrep AppSec Platform.
Requirements
Related issues
N/A
Describe the solution you've provided
Adds a new GitHub Actions workflow that runs the Java server SDK contract tests nightly (4am UTC) with the
-enable-long-running-testsflag enabled. If the tests fail, a Slack notification is sent to alert the team.Key details:
workflow_dispatchfor manual triggeringcicomposite action for build/setup, then runs the contract test make targets withTEST_HARNESS_PARAMS="-enable-long-running-tests"slackapi/slack-github-actionwith an incoming webhook (SLACK_WEBHOOK_URLsecret) to post to Slack on failure, including a link to the failed runItems for reviewer attention:
SLACK_WEBHOOK_URLsecret — this secret must be configured in the repo settings and the webhook must be routed to#sdks-java. The workflow itself does not specify a channel; the channel is determined by the webhook configuration.timeout-minutes— long-running tests could potentially hang indefinitely. Consider adding a timeout.failureonly, notcancelledortimed_out. Decide if those states should also notify.contract-testscomposite action, becauseTEST_HARNESS_PARAMSneeds to be passed to therun-contract-teststarget specifically. Verify this is acceptable.Describe alternatives you've considered
contract-testscomposite action to accept atest_harness_paramsinput, but that would change the shared action's interface for a nightly-only concern.rtCamp/action-slack-notify(used byldcli) instead ofslackapi/slack-github-action, but the official Slack action is more widely used across LD repos (terraform-provider-launchdarkly,streamer,ld-docs-private).Additional context
Link to Devin run
Requested by: tanderson@launchdarkly.com