Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy v9.4.12 to production #4156

Merged
merged 73 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
4e5db36
Bump ecto_sql from 3.11.3 to 3.12.0 in /app
dependabot[bot] Aug 15, 2024
de11d0f
Bump dset from 3.1.3 to 3.1.4 in /app/assets
dependabot[bot] Sep 11, 2024
bccaa74
Bump @types/jest from 29.5.12 to 29.5.13 in /app/assets
dependabot[bot] Sep 13, 2024
2bef3d0
Bump micromatch from 4.0.5 to 4.0.8 in /lambdas/frame-extractor
dependabot[bot] Sep 18, 2024
3f31c1a
Bump version to 9.4.12
github-actions[bot] Sep 24, 2024
5b58c15
Bump credo from 1.7.7 to 1.7.8 in /app
dependabot[bot] Sep 27, 2024
f5ec717
Bump cachex from 3.6.0 to 4.0.0 in /app
dependabot[bot] Sep 30, 2024
2de477b
Bump sass from 1.78.0 to 1.79.4 in /app/assets
dependabot[bot] Sep 30, 2024
415301d
Fix "files is not defined" error in S3 object picker
mbklein Sep 30, 2024
87278cc
Merge pull request #4162 from nulib/5248-file-picker-error
mbklein Oct 1, 2024
cd47421
Bump @aws-sdk/client-s3 from 3.650.0 to 3.662.0 in /app/assets
dependabot[bot] Oct 2, 2024
1cab4a4
Bump @radix-ui/react-dialog from 1.1.1 to 1.1.2 in /app/assets
dependabot[bot] Oct 2, 2024
cec2c62
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/radix-ui/reac…
github-actions[bot] Oct 2, 2024
4cc7ccc
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/aws-sdk/clien…
github-actions[bot] Oct 2, 2024
241aba1
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/sass-1.79.4 i…
github-actions[bot] Oct 2, 2024
5314fb2
Merge dependabot/hex/app/deploy/staging/cachex-4.0.0 into combined-de…
github-actions[bot] Oct 2, 2024
e6aa82c
Merge dependabot/hex/app/deploy/staging/credo-1.7.8 into combined-dep…
github-actions[bot] Oct 2, 2024
bf1ccac
Merge dependabot/npm_and_yarn/lambdas/frame-extractor/micromatch-4.0.…
github-actions[bot] Oct 2, 2024
8e37cc5
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/types/jest-29…
github-actions[bot] Oct 2, 2024
7d0cca1
Merge dependabot/npm_and_yarn/app/assets/dset-3.1.4 into combined-dep…
github-actions[bot] Oct 2, 2024
6fb2eb3
Merge pull request #4165 from nulib/combined-dependencies
mbklein Oct 2, 2024
920bdf3
Fix introspection, migration, and casting for ecto_sql 3.12.x and ect…
mbklein Oct 2, 2024
1a18bb6
Merge pull request #4166 from nulib/ecto-dependencies
mbklein Oct 3, 2024
19c00f7
Bump react-dropzone from 14.2.3 to 14.2.9 in /app/assets
dependabot[bot] Oct 3, 2024
7c41db6
Bump @babel/runtime from 7.25.6 to 7.25.7 in /app/assets
dependabot[bot] Oct 3, 2024
d673a59
Bump @babel/plugin-transform-async-to-generator in /app/assets
dependabot[bot] Oct 3, 2024
1406718
Bump @aws-sdk/client-s3 from 3.662.0 to 3.663.0 in /app/assets
dependabot[bot] Oct 3, 2024
d5971c4
Bump @babel/preset-react from 7.24.7 to 7.25.7 in /app/assets
dependabot[bot] Oct 3, 2024
4ab6da3
Bump @babel/core from 7.25.2 to 7.25.7 in /app/assets
dependabot[bot] Oct 3, 2024
da88cca
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/core-7.…
github-actions[bot] Oct 3, 2024
65811f9
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/preset-…
github-actions[bot] Oct 3, 2024
d6ed4ab
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/aws-sdk/clien…
github-actions[bot] Oct 3, 2024
7680e15
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/plugin-…
github-actions[bot] Oct 3, 2024
da5b397
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/runtime…
github-actions[bot] Oct 3, 2024
1473243
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/react-dropzon…
github-actions[bot] Oct 3, 2024
71daf38
Merge pull request #4175 from nulib/combined-dependencies
mbklein Oct 3, 2024
ab61f02
Bump @babel/preset-typescript from 7.24.7 to 7.25.7 in /app/assets
dependabot[bot] Oct 3, 2024
41183e8
Bump @babel/preset-env from 7.25.4 to 7.25.7 in /app/assets
dependabot[bot] Oct 3, 2024
957ed26
Bump ecto_sql from 3.12.0 to 3.12.1 in /app
dependabot[bot] Oct 7, 2024
7ba9ddd
Bump cachex from 4.0.0 to 4.0.1 in /app
dependabot[bot] Oct 8, 2024
d8c7b0c
Bump @graphql-codegen/client-preset from 4.3.3 to 4.4.0 in /app/assets
dependabot[bot] Oct 8, 2024
2b73df5
Bump ecto_psql_extras from 0.8.1 to 0.8.2 in /app
dependabot[bot] Oct 9, 2024
d7e96da
Bump ex_aws from 2.5.5 to 2.5.6 in /app
dependabot[bot] Oct 9, 2024
ed4d1df
Bump typescript from 5.6.2 to 5.6.3 in /app/assets
dependabot[bot] Oct 9, 2024
e443f3a
Bump hls.js from 1.5.15 to 1.5.16 in /app/assets
dependabot[bot] Oct 9, 2024
60b043a
Bump @aws-sdk/client-s3 from 3.663.0 to 3.668.0 in /app/assets
dependabot[bot] Oct 10, 2024
9d901df
See if Terraform can provision localstack community edition
mbklein Oct 10, 2024
b3afbdf
Merge pull request #4190 from nulib/test-localstack-community-edition
mbklein Oct 10, 2024
4feb348
Bump xml2js and aws-sdk in /infrastructure/localstack/lambdas/digest-tag
dependabot[bot] Oct 10, 2024
5a85d89
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/aws-sdk/clien…
github-actions[bot] Oct 10, 2024
2da68bc
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/hls.js-1.5.16…
github-actions[bot] Oct 10, 2024
a4bd3c8
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/typescript-5.…
github-actions[bot] Oct 10, 2024
36d4554
Merge dependabot/hex/app/deploy/staging/ex_aws-2.5.6 into combined-de…
github-actions[bot] Oct 10, 2024
06c43a1
Merge dependabot/hex/app/deploy/staging/ecto_psql_extras-0.8.2 into c…
github-actions[bot] Oct 10, 2024
268a384
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/graphql-codeg…
github-actions[bot] Oct 10, 2024
db45829
Merge dependabot/hex/app/deploy/staging/cachex-4.0.1 into combined-de…
github-actions[bot] Oct 10, 2024
2368ffd
Merge dependabot/hex/app/deploy/staging/ecto_sql-3.12.1 into combined…
github-actions[bot] Oct 10, 2024
b03ac8d
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/preset-…
github-actions[bot] Oct 10, 2024
b478a4d
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/preset-…
github-actions[bot] Oct 10, 2024
f6a678d
Merge pull request #4192 from nulib/combined-dependencies
mbklein Oct 10, 2024
09e102f
Bump @graphql-codegen/cli from 5.0.2 to 5.0.3 in /app/assets
dependabot[bot] Oct 10, 2024
fb9f376
Merge dependabot/npm_and_yarn/infrastructure/localstack/lambdas/diges…
github-actions[bot] Oct 11, 2024
c29f05a
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/graphql-codeg…
github-actions[bot] Oct 11, 2024
2e24b5c
Merge pull request #4193 from nulib/combined-dependencies
mbklein Oct 11, 2024
5ac9576
Bump @aws-sdk/client-s3 from 3.668.0 to 3.669.0 in /app/assets
dependabot[bot] Oct 11, 2024
7f648a4
Bump @babel/core from 7.25.7 to 7.25.8 in /app/assets
dependabot[bot] Oct 11, 2024
5804a53
Bump recharts from 2.12.7 to 2.13.0 in /app/assets
dependabot[bot] Oct 11, 2024
f65156e
Bump @babel/preset-env from 7.25.7 to 7.25.8 in /app/assets
dependabot[bot] Oct 11, 2024
059ddfe
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/preset-…
github-actions[bot] Oct 11, 2024
43b77e8
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/recharts-2.13…
github-actions[bot] Oct 11, 2024
2773a2d
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/core-7.…
github-actions[bot] Oct 11, 2024
c63f8d5
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/aws-sdk/clien…
github-actions[bot] Oct 11, 2024
5aa7406
Merge pull request #4199 from nulib/combined-dependencies
mbklein Oct 11, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,22 @@ jobs:
ports:
- 9200:9200
localstack:
image: localstack/localstack-pro:2.1.0
image: localstack/localstack
env:
DOCKER_HOST: unix:///var/run/docker.sock
GATEWAY_LISTEN: 0.0.0.0:4566
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
ports:
- 4566:4566
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
steps:
- uses: actions/checkout@v2
- name: Provision Localstack using Cloud Pod
- uses: hashicorp/setup-terraform@v3
- name: Provision Localstack using Terraform
run: |
pip install localstack==2.1.0
curl -O https://nul-public.s3.amazonaws.com/meadow/test/localstack.pod
localstack pod load file://$PWD/localstack.pod
terraform init
terraform apply -auto-approve -var-file test.tfvars -var localstack_endpoint=https://localhost.localstack.cloud:4566
working-directory: ./infrastructure/localstack
- uses: actions/setup-node@v3
with:
node-version-file: ./.tool-versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const S3ObjectPicker = ({
case ChonkyActions.ChangeSelection.id:
if (
action.payload.selection.size == 0 &&
files.find(({ id }) => selectedFile == id)
files?.find(({ id }) => selectedFile == id)
) {
fileBrowserRef.current.setFileSelection(new Set([selectedFile]));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const S3ObjectProvider = forwardRef(
useImperativeHandle(ref, () => ({
findFileSetByUri: (value) => {
const objects = data?.ListIngestBucketObjects?.objects;
if (!objects) return null;
const found = objects?.find(({ uri }) => uri == value);
if (!found) return null;

const found = objects.find(({ uri }) => uri == value);
return { ...found, key: found.uri, uri: undefined };
},
}));
Expand Down
3,198 changes: 1,486 additions & 1,712 deletions app/assets/package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions app/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@apollo/react-hooks": "^4.0.0",
"@apollo/react-testing": "^4.0.0",
"@appbaseio/reactivesearch": "3.23.1",
"@aws-sdk/client-s3": "^3.650.0",
"@aws-sdk/client-s3": "^3.669.0",
"@emotion/react": "^11.13.3",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-brands-svg-icons": "^6.6.0",
Expand All @@ -30,7 +30,7 @@
"@honeybadger-io/js": "^6.10.0",
"@honeybadger-io/react": "^6.1.7",
"@nulib/design-system": "^1.5.1",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.2",
"@samvera/clover-iiif": "^2.10.1",
"@samvera/image-downloader": "^1.1.1",
"bulma": "^0.9.4",
Expand All @@ -48,7 +48,7 @@
"file-saver": "^2.0.5",
"graphql": "^16.9.0",
"graphql-tag": "^2.12.6",
"hls.js": "^1.5.15",
"hls.js": "^1.5.16",
"inflection": "^3.0.0",
"jest-environment-jsdom": "^29.7.0",
"js-cookie": "^3.0.5",
Expand All @@ -60,38 +60,38 @@
"react-beautiful-dnd": "^13.1.0",
"react-csv": "^2.2.2",
"react-device-detect": "^2.2.3",
"react-dropzone": "^14.2.1",
"react-dropzone": "^14.2.9",
"react-error-boundary": "^4.0.13",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.33.1",
"react-icons": "^5.3.0",
"react-json-pretty": "^2.2.0",
"recharts": "^2.12.7",
"recharts": "^2.13.0",
"use-clipboard-copy": "^0.2.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/core": "^7.25.8",
"@babel/plugin-proposal-class-properties": "^7.17.12",
"@babel/plugin-proposal-object-rest-spread": "^7.17.3",
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
"@babel/plugin-transform-async-to-generator": "^7.24.7",
"@babel/preset-env": "^7.25.4",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@babel/runtime": "^7.25.6",
"@babel/plugin-transform-async-to-generator": "^7.25.7",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@babel/runtime": "^7.25.7",
"@creativebulma/bulma-divider": "^1.1.0",
"@creativebulma/bulma-tooltip": "^1.2.0",
"@elastic/elasticsearch-mock": "^2.0.0",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/client-preset": "^4.3.3",
"@graphql-codegen/cli": "^5.0.3",
"@graphql-codegen/client-preset": "^4.4.0",
"@graphql-typed-document-node/core": "^3.2.0",
"@nulib/dcapi-types": "^2.5.0",
"@nulib/prettier-config": "^1.2.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.13",
"@types/react-beautiful-dnd": "^13.1.8",
"@types/react-router-dom": "^5.3.3",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
Expand All @@ -112,9 +112,9 @@
"react-dom": "^18.3.1",
"react-router-dom": "^5.3.0",
"react-router-prop-types": "^1.0.5",
"sass": "^1.78.0",
"sass": "^1.79.4",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"typescript": "^5.6.3",
"use-phoenix-channel": "^1.1.1"
}
}
1 change: 1 addition & 0 deletions app/lib/meadow/data/csv/import.ex
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ defmodule Meadow.Data.CSV.Import do
defp add_scheme(value, _), do: value

defp decode_field({:array, _}, nil), do: []
defp decode_field({type, {schema, spec}}, value), do: decode_field({type, schema, spec}, value)
defp decode_field({_, _, %Ecto.Embedded{cardinality: :many, related: _}}, nil), do: []
defp decode_field({_, _, %Ecto.Embedded{cardinality: :one, related: _}}, nil), do: nil
defp decode_field(_, nil), do: nil
Expand Down
4 changes: 3 additions & 1 deletion app/lib/meadow/data/schemas/types/edtf_date.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ defmodule Meadow.Data.Types.EDTFDate do

defp humanize(%{edtf: edtf}), do: humanize(edtf)

defp humanize(""), do: {:error, message: "cannot be blank"}

defp humanize(edtf) when is_binary(edtf) do
case EDTF.humanize(edtf) do
{:error, error} -> {:error, message: error}
{:error, _} -> :error
result -> {:ok, %{edtf: edtf, humanized: result}}
end
end
Expand Down
19 changes: 12 additions & 7 deletions app/lib/meadow/data/schemas/validations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ defmodule Meadow.Data.Schemas.Validations do
"""
def prepare_embed(%Ecto.Changeset{data: data, params: params} = change, field)
when is_atom(field) do
empty_struct = fn ->
{:parameterized, _type, field_spec} = data.__struct__.__schema__(:type, field)
field_spec.related.__struct__ |> Map.from_struct()
end

with f <- to_string(field),
current <- Enum.find([field, f], &Map.get(data, &1)) do
value =
cond do
Map.has_key?(params, f) and is_nil(Map.get(params, f)) -> empty_struct.()
Map.has_key?(params, f) and is_nil(Map.get(params, f)) -> empty_struct(data, field)
Map.has_key?(params, f) -> Map.get(params, f)
is_nil(current) -> empty_struct.()
is_nil(current) -> empty_struct(data, field)
true -> nil
end

Expand All @@ -35,4 +30,14 @@ defmodule Meadow.Data.Schemas.Validations do
end
end
end

defp empty_struct(data, field) do
field_spec =
case data.__struct__.__schema__(:type, field) do
{:parameterized, _type, f} -> f
{:parameterized, {_type, f}} -> f
end

field_spec.related.__struct__ |> Map.from_struct()
end
end
6 changes: 3 additions & 3 deletions app/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Code.require_file("lib/env.ex")
defmodule Meadow.MixProject do
use Mix.Project

@app_version "9.4.11"
@app_version "9.4.12"

def project do
[
Expand Down Expand Up @@ -58,13 +58,13 @@ defmodule Meadow.MixProject do
{:briefly, "~> 0.5.0"},
{:broadway_dashboard, "~> 0.3.0"},
{:broadway_sqs, "~> 0.7.0"},
{:cachex, "~> 3.2"},
{:cachex, "~> 4.0"},
{:configparser_ex, "~> 4.0.0"},
{:credo, "~> 1.7.0", only: [:dev, :test], runtime: false},
{:dataloader, "~> 1.0.6"},
{:ecto_enum, "~> 1.4.0"},
{:ecto_psql_extras, "~> 0.2"},
{:ecto_ranked, "~> 0.5.0"},
{:ecto_ranked, "~> 0.5"},
{:ecto_sql, "~> 3.0 and >= 3.4.4"},
{:elastix, "~> 0.10.0"},
{:ets, "~> 0.9.0"},
Expand Down
Loading
Loading