2010YOUY01 commented on code in PR #23414:
URL: https://github.com/apache/datafusion/pull/23414#discussion_r3555797376


##########
xtask/src/ci_workflow_rust.rs:
##########
@@ -0,0 +1,44 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use crate::ci_jobs::{JOBS, JobInfo};
+use crate::ci_workflows::WorkflowInfo;
+
+const VERIFY_CLEAN_JOB_NAME: &str = "verify-clean";
+const SKIPPED_JOBS: &[&str] = &[
+    // TODO: Enable these after local setup is fixed.
+    "linux-wasm-pack",
+    "verify-benchmark-results",
+    "sqllogictest-postgres",
+];
+
+pub(crate) const WORKFLOW_RUST: WorkflowInfo = WorkflowInfo {
+    name: "rust",
+    help_usage: "ci workflow rust",
+    help_description: "Run Rust CI jobs locally",
+    jobs,
+};
+
+fn jobs() -> Vec<&'static JobInfo> {
+    let verify_clean = JOBS
+        .iter()
+        .find(|job| job.name == VERIFY_CLEAN_JOB_NAME)
+        .unwrap_or_else(|| panic!("missing `{VERIFY_CLEAN_JOB_NAME}` job"));
+    let mut jobs = vec![verify_clean];

Review Comment:
   Yes, this is intentional, now the whole workflow requires a clean local git 
repo to run (no uncommitted changes), though I think there is room to improve 
it later.
   
   To better simulate GitHub CI, we should try to reproduce the actual commands 
it runs as closely as possible.
   
   Currently, GitHub CI runs several `verify-clean` checks between tests to 
ensure that no generated or modified files are left behind after each test, 
using `git diff`.
   
   So for the local reproducer to behave the same way, we need to ensure there 
are no uncommitted changes before running the full workflow.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to