Skip to content

post_answer関数で複数回答のbulk insertをできるようにする #503

post_answer関数で複数回答のbulk insertをできるようにする

post_answer関数で複数回答のbulk insertをできるようにする #503

Triggered via push October 9, 2023 15:16
Status Failure
Total duration 4m 38s
Artifacts

ci.yaml

on: push
rustfmt check
18s
rustfmt check
Lint and test server
3m 58s
Lint and test server
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 10 warnings
unused variable: `answers`: infra/resource/src/database/form.rs#L455
error: unused variable: `answers` --> infra/resource/src/database/form.rs:455:17 | 455 | let answers = RealAnswers::find() | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_answers` | = note: `-D unused-variables` implied by `-D warnings`
unreachable expression: infra/resource/src/database/form.rs#L475
error: unreachable expression --> infra/resource/src/database/form.rs:475:28 | 474 | uuid: todo!(), | ------- any code following this expression is unreachable 475 | timestamp: answer.time_stamp, | ^^^^^^^^^^^^^^^^^ unreachable expression | = note: `-D unreachable-code` implied by `-D warnings`
Lint and test server
Clippy had exited with the 101 exit code: Checking libc v0.2.147 Checking cfg-if v1.0.0 Checking serde v1.0.188 Checking once_cell v1.18.0 Checking memchr v2.6.3 Checking pin-project-lite v0.2.12 Checking getrandom v0.2.10 Checking itoa v1.0.8 Checking futures-core v0.3.28 Checking value-bag v1.4.1 Checking log v0.4.19 Checking smallvec v1.10.0 Checking spin v0.5.2 Checking bytes v1.4.0 Checking futures-io v0.3.28 Checking libm v0.2.7 Checking slab v0.4.8 Checking rand_core v0.6.4 Checking num-traits v0.2.16 Checking ryu v1.0.14 Checking tinyvec_macros v0.1.1 Checking tinyvec v1.6.0 Checking scopeguard v1.1.0 Checking futures-sink v0.3.28 Checking percent-encoding v2.3.0 Checking form_urlencoded v1.2.0 Checking lock_api v0.4.10 Checking unicode-normalization v0.1.22 Checking parking_lot_core v0.9.8 Checking serde_json v1.0.107 Checking pin-utils v0.1.0 Checking ppv-lite86 v0.2.17 Checking unicode-bidi v0.3.13 Compiling time-core v0.1.1 Checking rand_chacha v0.3.1 Compiling time-macros v0.2.9 Checking parking_lot v0.12.1 Checking futures-task v0.3.28 Checking futures-channel v0.3.28 Checking uuid v1.4.1 Checking const-oid v0.9.4 Checking futures-util v0.3.28 Checking time v0.3.22 Checking rand v0.8.5 Checking typenum v1.16.0 Checking idna v0.4.0 Checking tracing-core v0.1.31 Checking signal-hook-registry v1.4.1 Checking mio v0.8.8 Checking num_cpus v1.16.0 Checking socket2 v0.5.3 Checking url v2.4.0 Checking tokio v1.32.0 Checking generic-array v0.14.7 Checking tracing v0.1.37 Checking block-buffer v0.10.4 Checking crypto-common v0.1.6 Checking thiserror v1.0.49 Checking lazy_static v1.4.0 Checking hex v0.4.3 Checking subtle v2.5.0 Checking digest v0.10.7 Checking untrusted v0.7.1 Checking ring v0.16.20 Checking num-integer v0.1.45 Checking crossbeam-utils v0.8.16 Checking event-listener v2.5.3 Checking rustls-webpki v0.101.2 Checking bitflags v2.3.3 Checking fnv v1.0.7 Checking sct v0.7.0 Checking either v1.8.1 Checking base64ct v1.6.0 Checking zeroize v1.6.0 Checking iana-time-zone v0.1.57 Checking pem-rfc7468 v0.7.0 Checking chrono v0.4.31 Checking rustls v0.21.6 Checking num-bigint v
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/presentation/src/auth.rs#L5
Original: ``` http::{Request, StatusCode}, ``` Expected: ``` http::{HeaderValue, Request, StatusCode}, ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/presentation/src/auth.rs#L1
Original: ``` use axum::http::HeaderValue; ``` Expected: ``` ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/migration/src/m20230811_062425_create_answer_tables.rs#L7
Original: ``` ``` Expected: ``` m20231008_135425_create_user_table::UsersTable, ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/migration/src/m20230811_062425_create_answer_tables.rs#L3
Original: ``` use crate::m20231008_135425_create_user_table::UsersTable; ``` Expected: ``` ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/migration/src/m20220101_000001_create_table.rs#L3
Original: ``` ``` Expected: ``` use crate::m20231008_135425_create_user_table::UsersTable; ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/migration/src/m20220101_000001_create_table.rs#L1
Original: ``` use crate::m20231008_135425_create_user_table::UsersTable; ``` Expected: ``` ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/infra/resource/src/database/form.rs#L409
Original: ``` let id = self.pool.execute(Statement::from_sql_and_values( DatabaseBackend::MySql, "INSERT INTO answers (form_id, user, title) VALUES (?, (SELECT id FROM users WHERE uuid = UUID_TO_BIN(?)), ?)", [answer.form_id.to_owned().into(), answer.uuid.to_string().into(), embed_title.into()]) ) ``` Expected: ``` let id = self .pool .execute(Statement::from_sql_and_values( DatabaseBackend::MySql, "INSERT INTO answers (form_id, user, title) VALUES (?, (SELECT id FROM users \ WHERE uuid = UUID_TO_BIN(?)), ?)", [ answer.form_id.to_owned().into(), answer.uuid.to_string().into(), embed_title.into(), ], )) ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/infra/entities/src/prelude.rs#L3
Original: ``` pub use super::answers::Entity as Answers; pub use super::default_answer_titles::Entity as DefaultAnswerTitles; pub use super::form_choices::Entity as FormChoices; pub use super::form_meta_data::Entity as FormMetaData; pub use super::form_questions::Entity as FormQuestions; pub use super::form_webhooks::Entity as FormWebhooks; pub use super::real_answers::Entity as RealAnswers; pub use super::response_period::Entity as ResponsePeriod; pub use super::users::Entity as Users; ``` Expected: ``` pub use super::{ answers::Entity as Answers, default_answer_titles::Entity as DefaultAnswerTitles, form_choices::Entity as FormChoices, form_meta_data::Entity as FormMetaData, form_questions::Entity as FormQuestions, form_webhooks::Entity as FormWebhooks, real_answers::Entity as RealAnswers, response_period::Entity as ResponsePeriod, users::Entity as Users, }; ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/infra/entities/src/form_questions.rs#L5
Original: ``` ``` Expected: ``` use super::sea_orm_active_enums::QuestionType; ```
rustfmt check: /home/runner/work/seichi-portal-backend/seichi-portal-backend/server/infra/entities/src/form_questions.rs#L3
Original: ``` use super::sea_orm_active_enums::QuestionType; ``` Expected: ``` ```