Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 91 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ opt-level = 0

[workspace]
# TODO: add other as they are fixed
members=["src/devtool", "src/gen-api-client", "src/cli", "src/client",
"src/problem-loader", "src/invoker",
"src/dist-files-generator", "src/dist-builder", "src/ppc", "src/svaluer", "src/invoker-api"]
members=[ "src/devtool", "src/gen-api-client", "src/cli", "src/client",
"src/problem-loader", "src/invoker", "src/dist-files-generator",
"src/dist-builder", "src/svaluer", "src/invoker-api", "src/pps/api",
"src/pps/cli", "src/pps/server" ]
3 changes: 3 additions & 0 deletions k8s/jjs/templates/init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ spec:
- name: shared
mountPath: /shared
command: ["/bin/bash", "/cmap/init_problems"]
env:
- name: RUST_LOG
value: info,pps_cli=trace,pps_server=trace,pps_api=trace
- name: problems-upload
image: "{{ .Values.image.repositoryPrefix }}toolkit:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down
22 changes: 20 additions & 2 deletions src/dist-builder/src/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@ use crate::{
Params,
};
use anyhow::Context as _;
use std::{io::Write, path::Path, process::Command};
use std::{
io::Write,
path::{Path, PathBuf},
process::Command,
};
use util::cmd::CommandExt;

pub(crate) struct DockerEmitter;

impl DockerEmitter {
fn package_name_to_path(pkg_name: &str) -> PathBuf {
if pkg_name.starts_with("pps-") {
pkg_name.replace('-', "/").into()
} else {
pkg_name.into()
}
}

fn emit_inner(
params: &Params,
docker_context: &Path,
Expand All @@ -20,7 +32,13 @@ impl DockerEmitter {
let mut cmd = Command::new(&params.cfg.build.tool_info.docker);
cmd.arg("build");
cmd.arg("-f");
cmd.arg(params.src.join("src").join(pkg_name).join("Dockerfile"));
cmd.arg(
params
.src
.join("src")
.join(Self::package_name_to_path(pkg_name))
.join("Dockerfile"),
);
let tag = options
.tag
.clone()
Expand Down
2 changes: 1 addition & 1 deletion src/dist-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ fn make_rust_package_list() -> Vec<RustPackage> {
//add("cleanup", "jjs-cleanup", Section::Tool);
//add("envck", "jjs-env-check", Section::Tool);
//add("setup", "jjs-setup", Section::Tool);
add("ppc", "jjs-ppc", Section::Tool);
add("pps-cli", "jjs-pps", Section::Tool);
//add("userlist", "jjs-userlist", Section::Tool);
add("cli", "jjs-cli", Section::Tool);
add("invoker", "jjs-invoker", Section::Daemon);
Expand Down
2 changes: 1 addition & 1 deletion src/invoker/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, type_alias_impl_trait)]
#![type_length_limit = "4323264"]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is issue in either rust or tracing.

pub mod api;
pub mod config;
pub mod controller;
Expand Down
1 change: 1 addition & 0 deletions src/invoker/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![type_length_limit = "4323264"]
use anyhow::Context;
use invoker::controller::JudgeRequestAndCallbacks;
use std::sync::Arc;
Expand Down
30 changes: 0 additions & 30 deletions src/ppc/Cargo.toml

This file was deleted.

Loading