Aircloak / aircloak

This repository contains the Aircloak Air frontend as well as the code for our Cloak query and anonymization platform
2 stars 0 forks source link

Aggregated CASE expressions can no longer return 0 #4828

Closed edongashi closed 3 years ago

edongashi commented 3 years ago

Closes #4662.

aircloak-robot commented 3 years ago

air_test job errored 😢

You can see the full build log by running: ci/production.sh build_log pr 4828 air_test

You can restart the build by running: ci/production.sh force_build pr 4828 air_test

You can start the remote console by running: ci/production.sh remote_console pr 4828 air

Log tail:

14:53:38.429 [info]  alter table data_sources

14:53:38.432 [info]  == Migrated 20200708143003 in 0.0s

14:53:38.436 [info]  == Running 20200709081518 Air.Repo.Migrations.AddIndexToApiTokensForAccessType.change/0 forward

14:53:38.436 [info]  create index api_tokens_id_access_index

14:53:38.439 [info]  == Migrated 20200709081518 in 0.0s

14:53:38.442 [info]  == Running 20200710105907 Air.Repo.Migrations.RemoveNativeUsersFromLdapGroups.up/0 forward

14:53:38.460 [debug] %Postgrex.Query{cache: :reference, columns: nil, name: "ecto_12802", param_formats: nil, param_oids: nil, param_types: nil, ref: nil, result_formats: nil, result_oids: nil, result_types: nil, statement: "SELECT g0.\"id\", g0.\"name\", g0.\"source\", g0.\"ldap_dn\", g0.\"admin\", g0.\"system\", g0.\"inserted_at\", g0.\"updated_at\" FROM \"groups\" AS g0", types: nil} uses unknown oid(s) 17675forcing us to reload type information from the database. This is expected behaviour whenever you migrate your database.

14:53:38.471 [debug] QUERY OK source="groups" db=0.7ms
SELECT g0."id", g0."name", g0."source", g0."ldap_dn", g0."admin", g0."system", g0."inserted_at", g0."updated_at" FROM "groups" AS g0 []

14:53:38.471 [info]  == Migrated 20200710105907 in 0.0s

14:53:38.475 [info]  == Running 20201019140409 Air.Repo.Migrations.AddIndexForFasterLoadOfLastDataSource.change/0 forward

14:53:38.476 [info]  create index queries_user_id_context_index

14:53:38.478 [info]  == Migrated 20201019140409 in 0.0s

14:53:38.484 [info]  == Running 20201110161633 Air.Repo.Migrations.AddSoftDeleteToExplorerAnalysis.change/0 forward

14:53:38.485 [info]  alter table explorer_analyses

14:53:38.486 [info]  == Migrated 20201110161633 in 0.0s
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[os_mon] memory supervisor port (memsup): Erlang has closed
mix test

14:53:44.096 [info]  Compiling auto-completions
Excluding tags: [:disabled, :pending]

.........................................................................................................................................

  1) test .all_data_source_metadata returns statistics in various stages (Air.Service.ExplorerTest)
     test/air/service/explorer_test.exs:250
     match (=) failed
     The following variables were pinned:
       data_source_id = 18
     code:  assert [%{stats: %{complete: 0, processing: 2, error: 0, total: 2}, id: ^data_source_id}, _] = Explorer.all_data_source_metadata()
     left:  [%{stats: %{complete: 0, processing: 2, error: 0, total: 2}, id: ^data_source_id}, _]
     right: [
              %{
                id: 18,
                name: "name_84D480800F4A0D28AB8F",
                selected_tables: ["foos"],
                stats: %{
                  complete: 0,
                  error: 0,
                  processing: 1,
                  total: 1
                },
                tables: [
                  %{name: "bars", status: :not_enabled},
                  %{name: "foos", status: :processing}
                ],
                unanalyzable_tables: []
              },
              %{
                id: 19,
                name: "name_D38A8BA46DDA44183E94",
                selected_tables: [],
                stats: %{
                  complete: 0,
                  error: 0,
                  processing: 0,
                  total: 0
                },
                tables: [
                  %{name: "bars", status: :not_enabled},
                  %{name: "foos", status: :not_enabled}
                ],
                unanalyzable_tables: []
              }
            ]
     stacktrace:
       test/air/service/explorer_test.exs:256: anonymous fn/1 in Air.Service.ExplorerTest."test .all_data_source_metadata returns statistics in various stages"/1
       test/air/service/explorer_test.exs:256: (test)

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Finished in 278.2 seconds
677 tests, 1 failure

Randomized with seed 42860
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
Makefile:21: recipe for target 'test' failed
make: *** [test] Error 1
=> 336 sec

aircloak_ci: error: 
error running `/home/ci/.aircloak_ci/data/cache/builds/pr-4828/src/air/ci/container.sh run_in_container aircloak_ci_y8Q-xQeiYQ5rYXS_0S_NEw make test`
aircloak_ci: result: `error`
aircloak-robot commented 3 years ago

Standard tests have passed 💯

aircloak-robot commented 3 years ago

Pull request can be merged 🎉

edongashi commented 3 years ago

@sebastian waiting on your blessing to merge.

sebastian commented 3 years ago

Ok, I discussed this more in depth with Paul. I should have done that before asking you to implement. Sorry. Let's skip this for now. The cost of the breaking change is higher than the added protection given the commercial deployments we have today.

Let's close, but not delete the branch for now. That way we can resurrect it if need be.