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.2.3 to production #3883

Merged
merged 44 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7ad08b0
Bump prettier from 3.2.4 to 3.2.5 in /app/assets
dependabot[bot] Feb 28, 2024
d07bda1
Bump version to 9.2.3
github-actions[bot] Mar 14, 2024
d67c71c
Fix new style issues in prettier 3.2.5
mbklein Mar 14, 2024
ebe5241
Bump telemetry_metrics from 0.6.2 to 1.0.0 in /app
dependabot[bot] Mar 19, 2024
b0a813d
Bump ex_aws from 2.5.1 to 2.5.3 in /app
dependabot[bot] Mar 20, 2024
0651fdf
Bump phoenix_live_reload from 1.5.2 to 1.5.3 in /app
dependabot[bot] Mar 29, 2024
70141e8
Bump plug_cowboy from 2.7.0 to 2.7.1 in /app
dependabot[bot] Apr 3, 2024
7501573
Bump absinthe_phoenix from 2.0.2 to 2.0.3 in /app
dependabot[bot] Apr 3, 2024
de54fc5
Bump @babel/runtime from 7.24.0 to 7.24.4 in /app/assets
dependabot[bot] Apr 4, 2024
1032706
Bump @babel/core from 7.24.0 to 7.24.4 in /app/assets
dependabot[bot] Apr 4, 2024
b6ed78a
Bump excoveralls from 0.18.0 to 0.18.1 in /app
dependabot[bot] Apr 8, 2024
7fb75be
Bump phoenix from 1.7.11 to 1.7.12 in /app
dependabot[bot] Apr 12, 2024
363f97b
Bump logger_file_backend from 0.0.13 to 0.0.14 in /app
dependabot[bot] Apr 15, 2024
8538632
Update Clover info panel to be default closed
adamjarling Apr 18, 2024
12c79f9
Merge pull request #3912 from nulib/4647-clover-more-info-default
adamjarling Apr 23, 2024
67fb4d5
Bump recharts from 2.12.1 to 2.12.6 in /app/assets
dependabot[bot] Apr 23, 2024
8442719
Bump @samvera/clover-iiif from 2.4.0 to 2.7.5 in /app/assets
dependabot[bot] Apr 23, 2024
c4b7a98
Add more logging to ARK listener
mbklein Apr 24, 2024
3494b62
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/recharts-2.12…
github-actions[bot] Apr 24, 2024
91b4a4b
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/samvera/clove…
github-actions[bot] Apr 24, 2024
75400ba
Merge dependabot/hex/app/deploy/staging/logger_file_backend-0.0.14 in…
github-actions[bot] Apr 24, 2024
ae4706b
Merge dependabot/hex/app/deploy/staging/phoenix-1.7.12 into combined-…
github-actions[bot] Apr 24, 2024
e34adf4
Merge dependabot/hex/app/deploy/staging/excoveralls-0.18.1 into combi…
github-actions[bot] Apr 24, 2024
728bc7d
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/core-7.…
github-actions[bot] Apr 24, 2024
45c9318
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/babel/runtime…
github-actions[bot] Apr 24, 2024
e8b7d9b
Merge dependabot/hex/app/deploy/staging/absinthe_phoenix-2.0.3 into c…
github-actions[bot] Apr 24, 2024
0e3fc18
Merge dependabot/hex/app/deploy/staging/plug_cowboy-2.7.1 into combin…
github-actions[bot] Apr 24, 2024
05c38a6
Merge dependabot/hex/app/deploy/staging/phoenix_live_reload-1.5.3 int…
github-actions[bot] Apr 24, 2024
e204411
Merge dependabot/hex/app/deploy/staging/ex_aws-2.5.3 into combined-de…
github-actions[bot] Apr 24, 2024
6b1d85e
Merge dependabot/hex/app/deploy/staging/telemetry_metrics-1.0.0 into …
github-actions[bot] Apr 24, 2024
3de6bef
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/prettier-3.2.…
github-actions[bot] Apr 24, 2024
65adc78
Merge pull request #3919 from nulib/combined-dependencies
mbklein Apr 24, 2024
a3bb18a
Merge pull request #3918 from nulib/4529-ark-notification-logging
mbklein Apr 24, 2024
06a5f4c
Bump rc-progress from 3.5.1 to 4.0.0 in /app/assets
dependabot[bot] Apr 25, 2024
eae525f
Bump downshift from 8.5.0 to 9.0.4 in /app/assets
dependabot[bot] Apr 25, 2024
e6c9f20
Bump @testing-library/react from 15.0.2 to 15.0.4 in /app/assets
dependabot[bot] Apr 25, 2024
bd9d0fc
Bump @samvera/clover-iiif from 2.7.5 to 2.8.0 in /app/assets
dependabot[bot] Apr 25, 2024
75b8471
Bump @apollo/client from 3.9.11 to 3.10.1 in /app/assets
dependabot[bot] Apr 25, 2024
900127c
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/apollo/client…
github-actions[bot] Apr 25, 2024
0db03cd
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/samvera/clove…
github-actions[bot] Apr 25, 2024
77f9efe
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/testing-libra…
github-actions[bot] Apr 25, 2024
5485748
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/downshift-9.0…
github-actions[bot] Apr 25, 2024
5fc2d71
Merge dependabot/npm_and_yarn/app/assets/deploy/staging/rc-progress-4…
github-actions[bot] Apr 25, 2024
2f7d94b
Merge pull request #3926 from nulib/combined-dependencies
mbklein Apr 25, 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
8 changes: 4 additions & 4 deletions app/assets/js/components/IngestSheet/List.test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { render, cleanup } from "@testing-library/react";
import { cleanup, render } from "@testing-library/react";

import IngestSheetList from "./List";
import "@testing-library/jest-dom/extend-expect";
import React from "react";
import { renderWithRouter } from "../../services/testing-helpers";

const projectId = "abcdefg123";
Expand All @@ -10,7 +10,7 @@ afterEach(cleanup);

xtest("IngestSheetList component renders", () => {
const { container } = renderWithRouter(
<IngestSheetList projectId={projectId} />
<IngestSheetList projectId={projectId} />,
);
expect(container).toBeTruthy();
});
Expand Down
3 changes: 3 additions & 0 deletions app/assets/js/components/UI/IIIF/Viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ const IIIFViewer = ({ fileSets, iiifContent, workTypeId }) => {

const options = {
canvasHeight: 480,
informationPanel: {
open: false,
},
openSeadragon: {
gestureSettingsMouse: {
scrollToZoom: false,
Expand Down
7 changes: 3 additions & 4 deletions app/assets/js/screens/Home/Home.test.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from "react";
import { render, cleanup } from "@testing-library/react";
// this adds custom jest matchers from jest-dom
import "@testing-library/jest-dom/extend-expect";
import { cleanup, render } from "@testing-library/react";

import HomePage from "./Home";
import React from "react";
import { renderWithRouter } from "../../services/testing-helpers";

jest.mock("../../services/elasticsearch");
Expand Down
6 changes: 3 additions & 3 deletions app/assets/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"jsx": "react", // Allow command-click open components in a new file in VSCode
"baseUrl": ".",
"paths": {
"@js/*": ["js/*"],
},
"@js/*": ["js/*"]
}
},
"exclude": ["node_modules", "static"],
"exclude": ["node_modules", "static"]
}
5,027 changes: 2,868 additions & 2,159 deletions app/assets/package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions app/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"@honeybadger-io/react": "^6.1.7",
"@nulib/design-system": "^1.5.1",
"@radix-ui/react-dialog": "^1.0.5",
"@samvera/clover-iiif": "2.4.0",
"@samvera/clover-iiif": "^2.8.0",
"@samvera/image-downloader": "^1.1.1",
"bulma": "^0.9.4",
"bulma-checkradio": "^2.1.3",
"bulma-pageloader": "^0.3.0",
"bulma-switch": "^2.0.0",
"bulma-toast": "^2.4.4",
"classnames": "^2.5.1",
"downshift": "^8.5.0",
"downshift": "^9.0.4",
"edtf": "^4.6.0",
"esbuild-plugin-svgr": "^2.1.0",
"faker": "^5.5.3",
Expand All @@ -53,7 +53,7 @@
"node-webvtt": "^1.9.4",
"phoenix": "^1.7.11",
"prop-types": "^15.8.1",
"rc-progress": "^3.5.1",
"rc-progress": "^4.0.0",
"react-beautiful-dnd": "^13.1.0",
"react-csv": "^2.2.2",
"react-device-detect": "^2.2.3",
Expand All @@ -63,19 +63,19 @@
"react-hook-form": "^7.33.1",
"react-icons": "^5.0.1",
"react-json-pretty": "^2.2.0",
"recharts": "^2.12.1",
"recharts": "^2.12.6",
"use-clipboard-copy": "^0.2.0"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/core": "^7.24.4",
"@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.22.5",
"@babel/preset-env": "^7.24.0",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@babel/runtime": "^7.24.0",
"@babel/runtime": "^7.24.4",
"@creativebulma/bulma-divider": "^1.1.0",
"@creativebulma/bulma-tooltip": "^1.2.0",
"@elastic/elasticsearch-mock": "^2.0.0",
Expand All @@ -84,9 +84,9 @@
"@graphql-typed-document-node/core": "^3.2.0",
"@nulib/dcapi-types": "^2.1.0",
"@nulib/prettier-config": "^1.2.0",
"@testing-library/dom": "^9.3.4",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.2.1",
"@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^15.0.4",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"@types/react-beautiful-dnd": "^13.1.8",
Expand All @@ -104,7 +104,7 @@
"lodash.isnull": "^3.0.0",
"lodash.isundefined": "3.0.1",
"node-fetch": "^2.6.1",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^5.3.0",
Expand Down
10 changes: 5 additions & 5 deletions app/assets/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
"noUnusedParameters": false,
"paths": {
"@/*": ["*"],
"@js/*": ["js/*"],
"@js/*": ["js/*"]
},
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "ES6",
"types": ["jest", "node", "@testing-library/jest-dom"],
"types": ["jest", "node", "@testing-library/jest-dom"]
},
"include": [
"js/**/*.ts",
"js/**/*.js",
"js/**/*.jsx",
"js/**/*.tsx",
"types/**/*.d.ts",
"./jest.setup.ts",
"./jest.setup.ts"
],
"exclude": [
"node_modules",
"node_modules/@honeybadger-io/react/honeybadger-react.d.ts",
],
"node_modules/@honeybadger-io/react/honeybadger-react.d.ts"
]
}
18 changes: 13 additions & 5 deletions app/lib/meadow/ark_listener.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@ defmodule Meadow.ArkListener do

@impl true
def handle_notification(:works, :delete, %{id: id}, state) do
Arks.work_deleted(id)
{:noreply, state}
with_log_metadata module: __MODULE__, id: id do
Logger.info("Received DELETE notification for ARK on work #{id}")
Arks.work_deleted(id)
{:noreply, state}
end
end

def handle_notification(:works, :insert, %{id: id}, state) do
Works.get_work(id) |> Arks.mint_ark()
{:noreply, state}
with_log_metadata module: __MODULE__, id: id do
Logger.info("Received INSERT notification for ARK on work #{id}")
Works.get_work(id) |> Arks.mint_ark()
{:noreply, state}
end
end

def handle_notification(:works, _op, %{id: id}, state) do
def handle_notification(:works, op, %{id: id}, state) do
with_log_metadata module: __MODULE__, id: id do
Logger.info("Received #{String.upcase(to_string(op))} notification for ARK on work #{id}")

case Works.get_work!(id) do
nil -> :noop
work -> update_ark_metadata(work)
Expand Down
6 changes: 6 additions & 0 deletions app/lib/meadow/utils/arks.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ defmodule Meadow.Arks do
"""
def mint_ark(%Work{descriptive_metadata: %{ark: ark}} = work)
when not is_nil(ark) do
Logger.warn("Not minting ARK for work #{work.id} because it already has one: #{ark}")
{:noop, work}
end

def mint_ark(nil), do: {:noop, nil}

def mint_ark(%Work{} = work) do
Logger.info("Minting ARK for work #{work.id}")

case work |> initial_ark() |> Ark.mint() do
{:ok, result} ->
Logger.info("Minted ARK #{result.ark} for work #{work.id}")
Works.update_work(work, %{descriptive_metadata: %{ark: result.ark}})

{:error, error_message} ->
Expand Down Expand Up @@ -106,6 +110,8 @@ defmodule Meadow.Arks do
end

defp update_existing_ark(work, _, ark) do
Logger.info("Updating ARK #{ark.ark} for work #{work.id}")

case Ark.put(ark) do
{:ok, result} ->
Logger.info("Ark successfully updated. #{inspect(result)}")
Expand Down
4 changes: 2 additions & 2 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.2.2"
@app_version "9.2.3"

def project do
[
Expand Down Expand Up @@ -102,7 +102,7 @@ defmodule Meadow.MixProject do
{:sigaws, git: "https://github.com/nulib/sigaws.git", branch: "otp-24", override: true},
{:sitemapper, "~> 0.8.0"},
{:sweet_xml, "~> 0.6"},
{:telemetry_metrics, "~> 0.6"},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 0.5"},
{:tzdata, "~> 1.1.0"},
{:ueberauth_nusso, "~> 1.0"},
Expand Down
Loading
Loading