[anneal] Add playground tests and automation - #3542
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## Gbja7ynjo5n4gf6rek56jhkaclymvo22y #3542 +/- ##
==================================================================
Coverage 91.85% 91.85%
==================================================================
Files 20 20
Lines 6093 6093
==================================================================
Hits 5597 5597
Misses 496 496 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
96fbe28 to
235ebb0
Compare
ec5fa85 to
2794cad
Compare
052a98c to
7a30d24
Compare
08c5847 to
8e193e6
Compare
7a30d24 to
78dea19
Compare
8e193e6 to
c734c2d
Compare
78dea19 to
86216b4
Compare
c734c2d to
fdc3579
Compare
86216b4 to
be43838
Compare
fdc3579 to
1368df3
Compare
be29b26 to
b331bc9
Compare
1368df3 to
49a987a
Compare
b331bc9 to
f67a454
Compare
49a987a to
3abbf63
Compare
gherrit-pr-id: Gy322h35gdjhwda5fpdipdcqegd7gyqsa
f67a454 to
8347998
Compare
3abbf63 to
7624240
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 834799855b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -0,0 +1,265 @@ | |||
| # This file was generated by ci/generate and should not be modified by hand | |||
There was a problem hiding this comment.
Move playground workflow into the active workflow tree
This workflow is committed under anneal/v1/playground/rust-anneal-playground/.github/workflows, but this repository's active workflows live under the repository-root .github/workflows directory; GitHub Actions only discovers workflow files from that root location (see GitHub's workflow docs). As committed, none of the new backend/frontend/integration/release automation will trigger for pushes or PRs in this repo, so the added tests and deploy jobs are inert unless a root workflow delegates into this playground directory.
Useful? React with 👍 / 👎.
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: "${{ env.GH_CONTAINER_REGISTRY_USERNAME }}" | ||
| password: "${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}" |
There was a problem hiding this comment.
Avoid registry pushes in pull_request validation
This login is in a job that also runs for labeled pull_request events, but repository secrets such as GH_CONTAINER_REGISTRY_TOKEN are not passed to workflows triggered from forked PRs. In that approved-external-PR case the login/push of the provisional compiler images fails before integration tests can run; build/load the images within the test job or otherwise avoid requiring registry credentials for PR validation.
Useful? React with 👍 / 👎.
| # │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday; 7 is also Sunday on some systems) | ||
| # │ │ │ │ │ | ||
|
|
||
| 23 * * * * /home/ec2-user/update.sh |
There was a problem hiding this comment.
Point the cron entry at the Ubuntu deployment path
The Ubuntu deployment docs and the new update.sh/systemd service all use /home/ubuntu, but the sample crontab invokes /home/ec2-user/update.sh. Following the documented Ubuntu setup installs this crontab without an ec2-user home, so the hourly artifact/image refresh never runs and the playground stops receiving releases until the path is corrected.
Useful? React with 👍 / 👎.
| types: | ||
| - labeled |
There was a problem hiding this comment.
Rerun approved PR CI after new commits
With pull_request limited to only the labeled activity, CI runs at the moment the CI: approved label is added but does not run again when the contributor pushes more commits to that same approved PR. In that common review flow, the new commit can be merged without these playground checks ever validating the code that actually landed; keep the label gate, but also include synchronize/opened and gate on the existing label.
Useful? React with 👍 / 👎.
| PLAYGROUND_GITHUB_TOKEN: "${{ secrets.PLAYGROUND_GITHUB_TOKEN }}" | ||
| run: |- | ||
| killall -q ui || true | ||
| chmod +x ./server/ui && ./server/ui & | ||
| bundle exec rspec |
There was a problem hiding this comment.
Skip gist specs when the GitHub token is absent
This always runs the full RSpec suite even when PLAYGROUND_GITHUB_TOKEN is unset or empty, which is what forked PRs and local CI runs without that secret receive. Several of the added specs load or save Gists through endpoints that return PLAYGROUND_GITHUB_TOKEN not set up for reading/writing gists, so otherwise valid integration runs fail solely because the credential is unavailable; skip the gist/external specs when the token is missing.
Useful? React with 👍 / 👎.
| location / { | ||
| proxy_set_header Host $host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_pass http://localhost:8080; |
There was a problem hiding this comment.
Preserve WebSocket upgrades through nginx
The frontend opens /websocket for streaming output, stdin, and process control, but this reverse proxy forwards every request as a normal HTTP proxy request without the WebSocket upgrade headers or HTTP/1.1. Under the documented nginx deployment, the WebSocket handshake will not reach the Axum /websocket handler correctly, so the streaming/stdin/kill functionality covered by the new tests is broken in production until the location forwards Upgrade/Connection and uses HTTP/1.1.
Useful? React with 👍 / 👎.
|
|
||
| click_on 'View help' | ||
| expect(page).to be_at_url('/help') | ||
| expect(page).to have_content('The Rust Playground') |
There was a problem hiding this comment.
Update navigation specs for the Anneal help title
These new navigation assertions still expect the upstream Rust Playground help heading, but this fork renders <h1>Anneal Playground</h1> in ui/frontend/Help.tsx. Once the integration suite is actually run against the Anneal UI, the help-navigation scenarios fail even though the page is displaying the fork's intended title; update the expected text to match the fork.
Useful? React with 👍 / 👎.
| 'This is my old code' | ||
| end | ||
|
|
||
| def some_default_code |
There was a problem hiding this comment.
Update reset spec for the Anneal default source
The reset tests still expect the original Hello, world! default source, but the fork's initial editor contents are the Anneal PositiveUsize example in ui/frontend/reducers/code.ts. Any reset-to-default scenario will therefore fail after the reset succeeds, because the editor correctly restores the Anneal sample rather than this string.
Useful? React with 👍 / 👎.
Latest Update: v12 — Compare vs v11
📚 Full Patch History
Links show the diff between the row version and the column version.
⬇️ Download this PR
Branch
git fetch origin refs/heads/Gy322h35gdjhwda5fpdipdcqegd7gyqsa && git checkout -b pr-Gy322h35gdjhwda5fpdipdcqegd7gyqsa FETCH_HEADCheckout
git fetch origin refs/heads/Gy322h35gdjhwda5fpdipdcqegd7gyqsa && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/Gy322h35gdjhwda5fpdipdcqegd7gyqsa && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.