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.6 to production #4104

Merged
merged 17 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a9fd0c1
Bump hls.js from 1.5.13 to 1.5.14 in /app/assets
dependabot[bot] Aug 15, 2024
068bf49
Bump react-icons from 5.2.1 to 5.3.0 in /app/assets
dependabot[bot] Aug 15, 2024
5327672
Bump downshift from 9.0.6 to 9.0.8 in /app/assets
dependabot[bot] Aug 15, 2024
d8312a6
Bump @fortawesome/fontawesome-svg-core in /app/assets
dependabot[bot] Aug 15, 2024
3332f39
Bump @babel/core from 7.24.7 to 7.25.2 in /app/assets
dependabot[bot] Aug 15, 2024
2a74237
Bump postgrex from 0.19.0 to 0.19.1 in /app
dependabot[bot] Aug 15, 2024
322596b
Bump version to 9.4.6
github-actions[bot] Aug 15, 2024
ae95905
Uncomment and reorder embedding fields in search config
bmquinn Aug 16, 2024
30f0b41
Change reindex all indexing order, add logging to bulk indexing
bmquinn Aug 16, 2024
a86a897
Put the embedding text fields in the right order
mbklein Aug 16, 2024
e8f6373
Merge dependabot/hex/app/deploy/staging/postgrex-0.19.1 into combined…
github-actions[bot] Aug 16, 2024
4070b9e
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/core-7.…
github-actions[bot] Aug 16, 2024
be06987
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/fortawesome/f…
github-actions[bot] Aug 16, 2024
c548104
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/downshift-9.0…
github-actions[bot] Aug 16, 2024
d80ad5e
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/react-icons-5…
github-actions[bot] Aug 16, 2024
c4040e0
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/hls.js-1.5.14…
github-actions[bot] Aug 16, 2024
1024d22
Merge pull request #4105 from nulib/combined-dependencies
mbklein Aug 16, 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
237 changes: 111 additions & 126 deletions app/assets/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions app/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@apollo/react-testing": "^4.0.0",
"@appbaseio/reactivesearch": "3.23.1",
"@emotion/react": "^11.13.0",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-brands-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
Expand All @@ -38,14 +38,14 @@
"bulma-switch": "^2.0.0",
"bulma-toast": "^2.4.4",
"classnames": "^2.5.1",
"downshift": "^9.0.6",
"downshift": "^9.0.8",
"edtf": "^4.6.0",
"esbuild-plugin-svgr": "^2.1.0",
"faker": "^5.5.3",
"file-saver": "^2.0.5",
"graphql": "^16.9.0",
"graphql-tag": "^2.12.6",
"hls.js": "^1.5.13",
"hls.js": "^1.5.14",
"inflection": "^3.0.0",
"jest-environment-jsdom": "^29.7.0",
"js-cookie": "^3.0.5",
Expand All @@ -61,13 +61,13 @@
"react-error-boundary": "^4.0.13",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.33.1",
"react-icons": "^5.2.1",
"react-icons": "^5.3.0",
"react-json-pretty": "^2.2.0",
"recharts": "^2.12.7",
"use-clipboard-copy": "^0.2.0"
},
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/core": "^7.25.2",
"@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",
Expand Down
34 changes: 17 additions & 17 deletions app/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -84,25 +84,25 @@ config :meadow, Meadow.Search.Cluster,
aws_secret("meadow", dig: ["search", "embedding_dimensions"], default: nil),
embedding_text_fields: [
:title,
:alternate_title,
:description,
:collection,
# :alternate_title,
# :caption,
# :table_of_contents,
# :abstract,
# :contributor,
# :creator,
# :date_created,
# :genre,
# :subject,
# :style_period,
# :language,
# :location,
# :publisher,
# :scope_and_contents,
# :technique,
# :physical_description_material,
# :physical_description_size,
:creator,
:contributor,
:date_created,
:genre,
:subject,
:style_period,
:language,
:location,
:publisher,
:technique,
:physical_description_material,
:physical_description_size,
:caption,
:table_of_contents,
:scope_and_contents,
:abstract,
]

config :meadow,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/meadow/data/indexer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defmodule Meadow.Data.Indexer do
end

def reindex_all(version) do
reindex_all(version, [FileSet, Work, Collection])
reindex_all(version, [Collection, Work, FileSet])
end

def reindex_all(version, schemas) when is_list(schemas) do
Expand Down
3 changes: 2 additions & 1 deletion app/lib/meadow/indexing/v2/work.ex
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ defmodule Meadow.Indexing.V2.Work do
|> Enum.reject(fn v ->
is_nil(v) or byte_size(v) == 0
end)
|> Enum.reverse()
|> Enum.join("\n")

Map.put(map, :embedding_text_length, String.length(value))
|> Map.put(:embedding_text, String.slice(value, 0, 2048))
|> Map.put(:embedding_text, String.slice(value, 0, 2047))
end

defp prepare_embedding_value(%{label: v}), do: prepare_embedding_value(v)
Expand Down
24 changes: 22 additions & 2 deletions app/lib/meadow/search/bulk.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ defmodule Meadow.Search.Bulk do
Bulk indexing operations for search
"""

use Meadow.Utils.Logging
require Logger

alias Meadow.Search.Config, as: SearchConfig
alias Meadow.Search.HTTP

Expand Down Expand Up @@ -35,7 +38,24 @@ defmodule Meadow.Search.Bulk do
do: :timer.sleep(wait_interval)

defp upload_batch(docs, index) do
bulk_document = docs |> Enum.join("\n")
HTTP.post("/#{index}/_bulk", bulk_document <> "\n")
with_log_metadata module: __MODULE__, index: index do
bulk_document = docs |> Enum.join("\n")

Logger.info("Uploading batch of #{Enum.count(docs)} documents to #{index}")

case HTTP.post("/#{index}/_bulk", bulk_document <> "\n") do
{:ok, %{status_code: status} = response} ->
Logger.info("Bulk upload status: #{status}")
{:ok, response}

{:retry, response} ->
Logger.warn("Bulk upload retrying")
{:retry, response}

{:error, error} ->
Logger.error("Bulk upload failed: #{inspect(error)}")
{:error, error}
end
end
end
end
2 changes: 1 addition & 1 deletion 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.5"
@app_version "9.4.6"

def project do
[
Expand Down
2 changes: 1 addition & 1 deletion app/mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"plug_cowboy": {:hex, :plug_cowboy, "2.7.1", "87677ffe3b765bc96a89be7960f81703223fe2e21efa42c125fcd0127dd9d6b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "02dbd5f9ab571b864ae39418db7811618506256f6d13b4a45037e5fe78dc5de3"},
"plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"},
"poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm", "ba8836feea4b394bb718a161fc59a288fe0109b5006d6bdf97b6badfcf6f0f25"},
"postgrex": {:hex, :postgrex, "0.19.0", "f7d50e50cb42e0a185f5b9a6095125a9ab7e4abccfbe2ab820ab9aa92b71dbab", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "dba2d2a0a8637defbf2307e8629cb2526388ba7348f67d04ec77a5d6a72ecfae"},
"postgrex": {:hex, :postgrex, "0.19.1", "73b498508b69aded53907fe48a1fee811be34cc720e69ef4ccd568c8715495ea", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "8bac7885a18f381e091ec6caf41bda7bb8c77912bb0e9285212829afe5d8a8f8"},
"quantum": {:hex, :quantum, "3.5.3", "ee38838a07761663468145f489ad93e16a79440bebd7c0f90dc1ec9850776d99", [:mix], [{:crontab, "~> 1.1", [hex: :crontab, repo: "hexpm", optional: false]}, {:gen_stage, "~> 0.14 or ~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.2", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "500fd3fa77dcd723ed9f766d4a175b684919ff7b6b8cfd9d7d0564d58eba8734"},
"ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
"retry": {:hex, :retry, "0.18.0", "dc58ebe22c95aa00bc2459f9e0c5400e6005541cf8539925af0aa027dc860543", [:mix], [], "hexpm", "9483959cc7bf69c9e576d9dfb2b678b71c045d3e6f39ab7c9aa1489df4492d73"},
Expand Down
Loading