Skip to content

docker-compose up fails with 11 errors #551

@gabegm

Description

@gabegm

Tested on master and v2.2.0.

$ docker-compose up
Sending build context to Docker daemon  339.4kB
Step 1/4 : FROM rust:1
 ---> d4572ea67e7e
Step 2/4 : COPY . /app
 ---> Using cache
 ---> d97b737197ef
Step 3/4 : WORKDIR /app
 ---> Using cache
 ---> 07ba01bbe2ce
Step 4/4 : RUN cargo build
 ---> Running in 9707e2dc17f0
    Updating crates.io index
 Downloading crates ...
  Downloaded adler v1.0.2
.
.
.
Compiling pgml-dashboard v2.2.0 (/app)
error: failed to find data for query SELECT * FROM pgml.notebooks WHERE id = $1
  --> src/models.rs:89:13
   |
89 |             sqlx::query_as!(Notebook, "SELECT * FROM pgml.notebooks WHERE id = $1", id,)
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query INSERT INTO pgml.notebooks (name) VALUES ($1) RETURNING *
   --> src/models.rs:96:12
    |
96  |           Ok(sqlx::query_as!(
    |  ____________^
97  | |             Notebook,
98  | |             "INSERT INTO pgml.notebooks (name) VALUES ($1) RETURNING *",
99  | |             name,
100 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query SELECT * FROM pgml.notebooks
   --> src/models.rs:106:12
    |
106 |         Ok(sqlx::query_as!(Notebook, "SELECT * FROM pgml.notebooks")
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query SELECT * FROM pgml.notebook_cells
                       WHERE notebook_id = $1
                       AND deleted_at IS NULL
                   ORDER BY cell_number
   --> src/models.rs:112:12
    |
112 |           Ok(sqlx::query_as!(
    |  ____________^
113 | |             Cell,
114 | |             "SELECT * FROM pgml.notebook_cells
115 | |                 WHERE notebook_id = $1
...   |
118 | |             self.id,
119 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query UPDATE pgml.notebook_cells
                       SET
                       execution_time = NULL,
                       rendering = NULL
                   WHERE notebook_id = $1
                   AND cell_type = $2
   --> src/models.rs:125:17
    |
125 |           let _ = sqlx::query!(
    |  _________________^
126 | |             "UPDATE pgml.notebook_cells
127 | |                 SET
128 | |                 execution_time = NULL,
...   |
133 | |             CellType::Sql as i32,
134 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query
                   WITH
                       lock AS (
                           SELECT * FROM pgml.notebooks WHERE id = $1 FOR UPDATE
                       ),
                       max_cell AS (
                           SELECT COALESCE(MAX(cell_number), 0) AS cell_number
                           FROM pgml.notebook_cells
                           WHERE notebook_id = $1
                           AND deleted_at IS NULL
                       )
                   INSERT INTO pgml.notebook_cells
                       (notebook_id, cell_type, contents, cell_number, version)
                   VALUES
                       ($1, $2, $3, (SELECT cell_number + 1 FROM max_cell), 1)
                   RETURNING id,
                           notebook_id,
                           cell_type,
                           contents,
                           rendering,
                           execution_time,
                           cell_number,
                           version,
                           deleted_at
   --> src/models.rs:187:12
    |
187 |           Ok(sqlx::query_as!(
    |  ____________^
188 | |             Cell,
189 | |             "
190 | |             WITH
...   |
215 | |             contents,
216 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query SELECT
                           id,
                           notebook_id,
                           cell_type,
                           contents,
                           rendering,
                           execution_time,
                           cell_number,
                           version,
                           deleted_at
                       FROM pgml.notebook_cells
                       WHERE id = $1

   --> src/models.rs:222:12
    |
222 |           Ok(sqlx::query_as!(
    |  ____________^
223 | |             Cell,
224 | |             "SELECT
225 | |                     id,
...   |
237 | |             id,
238 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query UPDATE pgml.notebook_cells
                   SET
                       cell_type = $1,
                       contents = $2,
                       version = version + 1
                   WHERE id = $3
   --> src/models.rs:252:17
    |
252 |           let _ = sqlx::query!(
    |  _________________^
253 | |             "UPDATE pgml.notebook_cells
254 | |             SET
255 | |                 cell_type = $1,
...   |
261 | |             self.id,
262 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query UPDATE pgml.notebook_cells
                   SET deleted_at = NOW()
                   WHERE id = $1
                   RETURNING id,
                           notebook_id,
                           cell_type,
                           contents,
                           rendering,
                           execution_time,
                           cell_number,
                           version,
                           deleted_at
   --> src/models.rs:270:12
    |
270 |           Ok(sqlx::query_as!(
    |  ____________^
271 | |             Cell,
272 | |             "UPDATE pgml.notebook_cells
273 | |             SET deleted_at = NOW()
...   |
284 | |             self.id
285 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query UPDATE pgml.notebook_cells SET rendering = $1 WHERE id = $2
   --> src/models.rs:339:9
    |
339 | /         sqlx::query!(
340 | |             "UPDATE pgml.notebook_cells SET rendering = $1 WHERE id = $2",
341 | |             rendering,
342 | |             self.id
343 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)

error: failed to find data for query INSERT INTO pgml.uploaded_files (id, created_at) VALUES (DEFAULT, DEFAULT)
                       RETURNING id, created_at
   --> src/models.rs:798:12
    |
798 |           Ok(sqlx::query_as!(
    |  ____________^
799 | |             UploadedFile,
800 | |             "INSERT INTO pgml.uploaded_files (id, created_at) VALUES (DEFAULT, DEFAULT)
801 | |                 RETURNING id, created_at"
802 | |         )
    | |_________^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `pgml-dashboard` due to 11 previous errors
warning: build failed, waiting for other jobs to finish...
1 error occurred:
	* Status: The command '/bin/sh -c cargo build' returned a non-zero code: 101, Code: 101

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy