Fraunhofer-AISEC / ids-clearing-house-service

This is an implementation of the IDS Clearing House
Apache License 2.0
0 stars 11 forks source link

Multistage docker build not working #14

Closed sebplorenz closed 2 years ago

sebplorenz commented 2 years ago

Hi,

I started the docker multistage build using docker with build -f docker/clearing-house-api-multistage.Dockerfile .

When compiling the rust stuff it fails with the following error:

Compiling core-lib v0.7.0 (https://github.com/Fraunhofer-AISEC/ids-clearing-house-core.git#aaf9ddb0)
   Compiling ch-lib v0.7.5 (/app/ch-lib)
warning: unused import: `crate::model::ids::InfoModelId::SimpleId`
 --> ch-lib/src/model/ids/message.rs:4:5
  |
4 | use crate::model::ids::InfoModelId::SimpleId;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `ch-lib` (lib) generated 1 warning
   Compiling clearing-house-api v0.7.5 (/app/clearing-house-api)
error[E0432]: unresolved import `core_lib::model::JwksCache`
 --> clearing-house-api/src/main.rs:5:5
  |
5 | use core_lib::model::JwksCache;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `JwksCache` in `model`

error[E0432]: unresolved imports `core_lib::constants::DEFAULT_NUM_RESPONSE_ENTRIES`, `core_lib::constants::MAX_NUM_RESPONSE_ENTRIES`
  --> clearing-house-api/src/clearing_house_api.rs:16:27
   |
16 | use core_lib::constants::{DEFAULT_NUM_RESPONSE_ENTRIES, MAX_NUM_RESPONSE_ENTRIES};
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^ no `MAX_NUM_RESPONSE_ENTRIES` in `constants`
   |                           |
   |                           no `DEFAULT_NUM_RESPONSE_ENTRIES` in `constants`

error[E0432]: unresolved import `core_lib::model::SortingOrder`
  --> clearing-house-api/src/clearing_house_api.rs:27:5
   |
27 | use core_lib::model::SortingOrder;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `SortingOrder` in `model`

error[E0432]: unresolved import `core_lib::model::SortingOrder`
  --> clearing-house-api/src/clearing_house_api.rs:28:22
   |
28 | use core_lib::model::SortingOrder::Ascending;
   |                      ^^^^^^^^^^^^ could not find `SortingOrder` in `model`

error[E0599]: no method named `get_documents_for_pid_paginated` found for reference `&rocket::State<DocumentApiClient>` in the current scope
   --> clearing-house-api/src/clearing_house_api.rs:349:27
    |
349 |             match doc_api.get_documents_for_pid_paginated(&apikey.raw, &pid, sanitized_page, sanitized_size, sanitized_sort) {
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `get_documents_for_pid`

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `clearing-house-api` due to 5 previous errors
The command '/bin/sh -c cargo build --release' returned a non-zero code: 101
kragall commented 2 years ago

You do realize that you fixed the version of clearing-house-core to a version from November, while you build the clearing-house-service with the current version?

sebplorenz commented 2 years ago

No. So what do I have to do to build the latest version from the repo? Besides calling build -f docker/clearing-house-api-multistage.Dockerfile .?

kragall commented 2 years ago

If you use an unmodified version from the repo it should build the version of the app and pull the latest version of the core. If you did not fix the version of the core yourself, maybe it's a caching problem. Try to empty the cache and try again. When compiling it should use the current version of the core 0.7.5

sebplorenz commented 2 years ago

Works for 0.7.5