Skip to content

Commit 7145c2f

Browse files
authored
Merge pull request #969 from rust-lang/orchestrate-evaluate
2 parents 06e2083 + b852856 commit 7145c2f

File tree

6 files changed

+290
-56
lines changed

6 files changed

+290
-56
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,17 @@ jobs:
319319
killall -q ui || true
320320
chmod +x ./server/ui && ./server/ui &
321321
bundle exec rspec
322+
- name: Run tests with feature flags
323+
env:
324+
PLAYGROUND_UI_ROOT: server/build/
325+
PLAYGROUND_CORS_ENABLED: true
326+
PLAYGROUND_GITHUB_TOKEN: "${{ secrets.PLAYGROUND_GITHUB_TOKEN }}"
327+
PLAYGROUND_ORCHESTRATOR_ENABLED: 1
328+
PLAYGROUND_EXECUTE_VIA_WEBSOCKET_THRESHOLD: 1.0
329+
run: |-
330+
killall -q ui || true
331+
chmod +x ./server/ui && ./server/ui &
332+
bundle exec rspec
322333
- name: Preserve screenshots
323334
if: "${{ failure() }}"
324335
uses: actions/upload-artifact@v3

ci/workflows.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,18 @@ workflows:
447447
chmod +x ./server/ui && ./server/ui &
448448
bundle exec rspec
449449
450+
- name: "Run tests with feature flags"
451+
env:
452+
PLAYGROUND_UI_ROOT: server/build/
453+
PLAYGROUND_CORS_ENABLED: true
454+
PLAYGROUND_GITHUB_TOKEN: ${{ secrets.PLAYGROUND_GITHUB_TOKEN }}
455+
PLAYGROUND_ORCHESTRATOR_ENABLED: 1
456+
PLAYGROUND_EXECUTE_VIA_WEBSOCKET_THRESHOLD: 1.0
457+
run: |-
458+
killall -q ui || true
459+
chmod +x ./server/ui && ./server/ui &
460+
bundle exec rspec
461+
450462
- name: "Preserve screenshots"
451463
if: ${{ failure() }}
452464
uses: actions/upload-artifact@v3

tests/spec/features/navigation_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
expect(page).to be_at_url('/')
3131
end
3232

33-
scenario "Navigating to help changes the URL", :flaky do
33+
scenario "Navigating to help changes the URL" do
3434
visit '/'
3535
expect(page).to have_content('RUN')
3636

ui/src/main.rs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl MetricsToken {
179179
}
180180

181181
#[derive(Debug, Snafu)]
182-
pub enum Error {
182+
enum Error {
183183
#[snafu(display("Sandbox creation failed: {}", source))]
184184
SandboxCreation { source: sandbox::Error },
185185
#[snafu(display("Compilation operation failed: {}", source))]
@@ -208,6 +208,23 @@ pub enum Error {
208208
Deserialization { source: serde_json::Error },
209209
#[snafu(display("Unable to serialize response: {}", source))]
210210
Serialization { source: serde_json::Error },
211+
212+
#[snafu(context(false))]
213+
EvaluateRequest {
214+
source: server_axum::api_orchestrator_integration_impls::ParseEvaluateRequestError,
215+
},
216+
217+
#[snafu(context(false))]
218+
CompileRequest {
219+
source: server_axum::api_orchestrator_integration_impls::ParseCompileRequestError,
220+
},
221+
222+
#[snafu(context(false))]
223+
ExecuteRequest {
224+
source: server_axum::api_orchestrator_integration_impls::ParseExecuteRequestError,
225+
},
226+
227+
// Remove at a later point. From here ...
211228
#[snafu(display("The value {:?} is not a valid target", value))]
212229
InvalidTarget { value: String },
213230
#[snafu(display("The value {:?} is not a valid assembly flavor", value))]
@@ -224,6 +241,7 @@ pub enum Error {
224241
InvalidEdition { value: String },
225242
#[snafu(display("The value {:?} is not a valid crate type", value))]
226243
InvalidCrateType { value: String },
244+
// ... to here
227245
#[snafu(display("No request was provided"))]
228246
RequestMissing,
229247
#[snafu(display("The cache has been poisoned"))]
@@ -241,6 +259,11 @@ pub enum Error {
241259
source: orchestrator::coordinator::Error,
242260
},
243261

262+
#[snafu(display("Unable to convert the evaluate request"))]
263+
Evaluate {
264+
source: orchestrator::coordinator::ExecuteError,
265+
},
266+
244267
#[snafu(display("Unable to convert the compile request"))]
245268
Compile {
246269
source: orchestrator::coordinator::CompileError,

0 commit comments

Comments
 (0)