From 340134aef367e5537bce702c7675b04495337825 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 20:32:52 +0000 Subject: [PATCH 01/14] Bump version to 9.4.1 --- app/mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mix.exs b/app/mix.exs index 7774d9005..1a8413d06 100644 --- a/app/mix.exs +++ b/app/mix.exs @@ -3,7 +3,7 @@ Code.require_file("lib/env.ex") defmodule Meadow.MixProject do use Mix.Project - @app_version "9.4.0" + @app_version "9.4.1" def project do [ From 1c390dc43ce325f20dcedc4c76009b5a072a9d8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:22:27 +0000 Subject: [PATCH 02/14] Bump typescript from 5.5.3 to 5.5.4 in /app/assets Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.3 to 5.5.4. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.3...v5.5.4) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/assets/package-lock.json | 8 ++++---- app/assets/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/package-lock.json b/app/assets/package-lock.json index 1dc496f2e..b1b6ae2ba 100644 --- a/app/assets/package-lock.json +++ b/app/assets/package-lock.json @@ -101,7 +101,7 @@ "react-router-prop-types": "^1.0.5", "sass": "^1.77.6", "ts-node": "^10.9.2", - "typescript": "^5.5.3", + "typescript": "^5.5.4", "use-phoenix-channel": "^1.1.1" } }, @@ -21698,9 +21698,9 @@ } }, "node_modules/typescript": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", - "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "devOptional": true, "bin": { "tsc": "bin/tsc", diff --git a/app/assets/package.json b/app/assets/package.json index 1a63de144..9599341a8 100644 --- a/app/assets/package.json +++ b/app/assets/package.json @@ -111,7 +111,7 @@ "react-router-prop-types": "^1.0.5", "sass": "^1.77.6", "ts-node": "^10.9.2", - "typescript": "^5.5.3", + "typescript": "^5.5.4", "use-phoenix-channel": "^1.1.1" } } From 113093683c1aee7038434d163f60d1d78e100905 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:22:42 +0000 Subject: [PATCH 03/14] Bump hls.js from 1.5.11 to 1.5.13 in /app/assets Bumps [hls.js](https://github.com/video-dev/hls.js) from 1.5.11 to 1.5.13. - [Release notes](https://github.com/video-dev/hls.js/releases) - [Changelog](https://github.com/video-dev/hls.js/blob/master/docs/release-process.md) - [Commits](https://github.com/video-dev/hls.js/compare/v1.5.11...v1.5.13) --- updated-dependencies: - dependency-name: hls.js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/assets/package-lock.json | 8 ++++---- app/assets/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/package-lock.json b/app/assets/package-lock.json index 1dc496f2e..2321c22d0 100644 --- a/app/assets/package-lock.json +++ b/app/assets/package-lock.json @@ -35,7 +35,7 @@ "file-saver": "^2.0.5", "graphql": "^16.9.0", "graphql-tag": "^2.12.6", - "hls.js": "^1.5.11", + "hls.js": "^1.5.13", "inflection": "^3.0.0", "jest-environment-jsdom": "^29.7.0", "js-cookie": "^3.0.5", @@ -13181,9 +13181,9 @@ } }, "node_modules/hls.js": { - "version": "1.5.11", - "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.11.tgz", - "integrity": "sha512-q3We1izi2+qkOO+TvZdHv+dx6aFzdtk3xc1/Qesrvto4thLTT/x/1FK85c5h1qZE4MmMBNgKg+MIW8nxQfxwBw==" + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.13.tgz", + "integrity": "sha512-xRgKo84nsC7clEvSfIdgn/Tc0NOT+d7vdiL/wvkLO+0k0juc26NRBPPG1SfB8pd5bHXIjMW/F5VM8VYYkOYYdw==" }, "node_modules/hmac-drbg": { "version": "1.0.1", diff --git a/app/assets/package.json b/app/assets/package.json index 1a63de144..8fde46372 100644 --- a/app/assets/package.json +++ b/app/assets/package.json @@ -45,7 +45,7 @@ "file-saver": "^2.0.5", "graphql": "^16.9.0", "graphql-tag": "^2.12.6", - "hls.js": "^1.5.11", + "hls.js": "^1.5.13", "inflection": "^3.0.0", "jest-environment-jsdom": "^29.7.0", "js-cookie": "^3.0.5", From b56e1f45f369cb79eda502b1014a664a406568ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:23:07 +0000 Subject: [PATCH 04/14] Bump prettier from 3.3.2 to 3.3.3 in /app/assets Bumps [prettier](https://github.com/prettier/prettier) from 3.3.2 to 3.3.3. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.3.2...3.3.3) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/assets/package-lock.json | 8 ++++---- app/assets/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/package-lock.json b/app/assets/package-lock.json index 1dc496f2e..69f24c11d 100644 --- a/app/assets/package-lock.json +++ b/app/assets/package-lock.json @@ -94,7 +94,7 @@ "lodash.isnull": "^3.0.0", "lodash.isundefined": "3.0.1", "node-fetch": "^2.6.1", - "prettier": "^3.3.2", + "prettier": "^3.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^5.3.0", @@ -18857,9 +18857,9 @@ } }, "node_modules/prettier": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", - "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" diff --git a/app/assets/package.json b/app/assets/package.json index 1a63de144..e20216d97 100644 --- a/app/assets/package.json +++ b/app/assets/package.json @@ -104,7 +104,7 @@ "lodash.isnull": "^3.0.0", "lodash.isundefined": "3.0.1", "node-fetch": "^2.6.1", - "prettier": "^3.3.2", + "prettier": "^3.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^5.3.0", From bad890773baad1711b5bc5fcb623b98674c13ea6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:23:21 +0000 Subject: [PATCH 05/14] Bump sass from 1.77.6 to 1.77.8 in /app/assets Bumps [sass](https://github.com/sass/dart-sass) from 1.77.6 to 1.77.8. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.77.6...1.77.8) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/assets/package-lock.json | 8 ++++---- app/assets/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/package-lock.json b/app/assets/package-lock.json index 1dc496f2e..80701bf1a 100644 --- a/app/assets/package-lock.json +++ b/app/assets/package-lock.json @@ -99,7 +99,7 @@ "react-dom": "^18.3.1", "react-router-dom": "^5.3.0", "react-router-prop-types": "^1.0.5", - "sass": "^1.77.6", + "sass": "^1.77.8", "ts-node": "^10.9.2", "typescript": "^5.5.3", "use-phoenix-channel": "^1.1.1" @@ -20307,9 +20307,9 @@ } }, "node_modules/sass": { - "version": "1.77.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", - "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "version": "1.77.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz", + "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/app/assets/package.json b/app/assets/package.json index 1a63de144..1f9f7936b 100644 --- a/app/assets/package.json +++ b/app/assets/package.json @@ -109,7 +109,7 @@ "react-dom": "^18.3.1", "react-router-dom": "^5.3.0", "react-router-prop-types": "^1.0.5", - "sass": "^1.77.6", + "sass": "^1.77.8", "ts-node": "^10.9.2", "typescript": "^5.5.3", "use-phoenix-channel": "^1.1.1" From effcfac69874c86fb98fc8c7592a26f76f4d41a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:23:38 +0000 Subject: [PATCH 06/14] Bump @testing-library/jest-dom from 6.4.6 to 6.4.7 in /app/assets Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 6.4.6 to 6.4.7. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v6.4.6...v6.4.7) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/assets/package-lock.json | 8 ++++---- app/assets/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/package-lock.json b/app/assets/package-lock.json index 1dc496f2e..600badf70 100644 --- a/app/assets/package-lock.json +++ b/app/assets/package-lock.json @@ -75,7 +75,7 @@ "@nulib/dcapi-types": "^2.3.1", "@nulib/prettier-config": "^1.2.0", "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.4.6", + "@testing-library/jest-dom": "^6.4.7", "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", @@ -7621,9 +7621,9 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.6.tgz", - "integrity": "sha512-8qpnGVincVDLEcQXWaHOf6zmlbwTKc6Us6PPu4CRnPXCzo2OGBS5cwgMMOWdxDpEz1mkbvXHpEy99M5Yvt682w==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.7.tgz", + "integrity": "sha512-GaKJ0nijoNf30dWSOOzQEBkWBRk4rG3C/efw8zKrimNuZpnS/6/AEwo0WvZHgJxG84cNCgxt+mtbe1fsvfLp2A==", "dev": true, "dependencies": { "@adobe/css-tools": "^4.4.0", diff --git a/app/assets/package.json b/app/assets/package.json index 1a63de144..2616584da 100644 --- a/app/assets/package.json +++ b/app/assets/package.json @@ -85,7 +85,7 @@ "@nulib/dcapi-types": "^2.3.1", "@nulib/prettier-config": "^1.2.0", "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.4.6", + "@testing-library/jest-dom": "^6.4.7", "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", From 313e5eb979b6869fdaaa61726ed743e1522da94b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:23:50 +0000 Subject: [PATCH 07/14] Bump @apollo/client from 3.10.8 to 3.11.0 in /app/assets Bumps [@apollo/client](https://github.com/apollographql/apollo-client) from 3.10.8 to 3.11.0. - [Release notes](https://github.com/apollographql/apollo-client/releases) - [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/apollographql/apollo-client/compare/v3.10.8...v3.11.0) --- updated-dependencies: - dependency-name: "@apollo/client" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- app/assets/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/package-lock.json b/app/assets/package-lock.json index 1dc496f2e..6dad5b5d8 100644 --- a/app/assets/package-lock.json +++ b/app/assets/package-lock.json @@ -7,7 +7,7 @@ "license": "MIT", "dependencies": { "@absinthe/socket-apollo-link": "^0.2.1", - "@apollo/client": "*", + "@apollo/client": "latest", "@apollo/react-hooks": "^4.0.0", "@apollo/react-testing": "^4.0.0", "@appbaseio/reactivesearch": "3.23.1", @@ -247,9 +247,9 @@ } }, "node_modules/@apollo/client": { - "version": "3.10.8", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.10.8.tgz", - "integrity": "sha512-UaaFEitRrPRWV836wY2L7bd3HRCfbMie1jlYMcmazFAK23MVhz/Uq7VG1nwbotPb5xzFsw5RF4Wnp2G3dWPM3g==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.11.0.tgz", + "integrity": "sha512-gX+sfALW6m/EfydJAE3ogLci1SFIBJKlyyWcakcNgTMLm7PfKMJ2MysagIdKgCSapQjBUL8qxZVI62TLKqe2Ng==", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/caches": "^1.0.0", @@ -269,8 +269,8 @@ "peerDependencies": { "graphql": "^15.0.0 || ^16.0.0", "graphql-ws": "^5.5.5", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0", "subscriptions-transport-ws": "^0.9.0 || ^0.11.0" }, "peerDependenciesMeta": { From 09d34b14dd1713e161e48d4fe1ba65ad666b59cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:24:03 +0000 Subject: [PATCH 08/14] Bump @fortawesome/free-solid-svg-icons in /app/assets Bumps [@fortawesome/free-solid-svg-icons](https://github.com/FortAwesome/Font-Awesome) from 6.5.2 to 6.6.0. - [Release notes](https://github.com/FortAwesome/Font-Awesome/releases) - [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md) - [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.5.2...6.6.0) --- updated-dependencies: - dependency-name: "@fortawesome/free-solid-svg-icons" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- app/assets/package-lock.json | 19 +++++++++++++------ app/assets/package.json | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/assets/package-lock.json b/app/assets/package-lock.json index 1dc496f2e..e89ed7602 100644 --- a/app/assets/package-lock.json +++ b/app/assets/package-lock.json @@ -14,7 +14,7 @@ "@emotion/react": "^11.11.4", "@fortawesome/fontawesome-svg-core": "^6.5.1", "@fortawesome/free-brands-svg-icons": "^6.5.1", - "@fortawesome/free-solid-svg-icons": "^6.5.1", + "@fortawesome/free-solid-svg-icons": "^6.6.0", "@fortawesome/react-fontawesome": "^0.2.2", "@honeybadger-io/js": "^6.9.3", "@honeybadger-io/react": "^6.1.7", @@ -3243,17 +3243,24 @@ } }, "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.5.2.tgz", - "integrity": "sha512-QWFZYXFE7O1Gr1dTIp+D6UcFUF0qElOnZptpi7PBUMylJh+vFmIedVe1Ir6RM1t2tEQLLSV1k7bR4o92M+uqlw==", - "hasInstallScript": true, + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.6.0.tgz", + "integrity": "sha512-IYv/2skhEDFc2WGUcqvFJkeK39Q+HyPf5GHUrT/l2pKbtgEIv1al1TKd6qStR5OIwQdN1GZP54ci3y4mroJWjA==", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.5.2" + "@fortawesome/fontawesome-common-types": "6.6.0" }, "engines": { "node": ">=6" } }, + "node_modules/@fortawesome/free-solid-svg-icons/node_modules/@fortawesome/fontawesome-common-types": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.6.0.tgz", + "integrity": "sha512-xyX0X9mc0kyz9plIyryrRbl7ngsA9jz77mCZJsUkLl+ZKs0KWObgaEBoSgQiYWAsSmjz/yjl0F++Got0Mdp4Rw==", + "engines": { + "node": ">=6" + } + }, "node_modules/@fortawesome/react-fontawesome": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.2.tgz", diff --git a/app/assets/package.json b/app/assets/package.json index 1a63de144..53196b4b4 100644 --- a/app/assets/package.json +++ b/app/assets/package.json @@ -24,7 +24,7 @@ "@emotion/react": "^11.11.4", "@fortawesome/fontawesome-svg-core": "^6.5.1", "@fortawesome/free-brands-svg-icons": "^6.5.1", - "@fortawesome/free-solid-svg-icons": "^6.5.1", + "@fortawesome/free-solid-svg-icons": "^6.6.0", "@fortawesome/react-fontawesome": "^0.2.2", "@honeybadger-io/js": "^6.9.3", "@honeybadger-io/react": "^6.1.7", From f5e0678596ebedc290e448673e55cabce1da7d07 Mon Sep 17 00:00:00 2001 From: "Michael B. Klein" Date: Tue, 23 Jul 2024 16:03:56 +0000 Subject: [PATCH 09/14] Try to fix Livebook auth --- livebook/Dockerfile | 4 ++-- livebook/meadow_livebook_auth.exs | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/livebook/Dockerfile b/livebook/Dockerfile index 3f3388a0d..48bb04840 100644 --- a/livebook/Dockerfile +++ b/livebook/Dockerfile @@ -1,7 +1,7 @@ -FROM ghcr.io/livebook-dev/livebook +FROM ghcr.io/livebook-dev/livebook:latest ENV LIVEBOOK_AWS_CREDENTIALS=true ENV LIVEBOOK_IDENTITY_PROVIDER=custom:MeadowLivebookAuth -ENV LIVEBOOK_DISTRIBUTION=sname +ENV LIVEBOOK_DISTRIBUTION=name ENV LIVEBOOK_IP=0.0.0.0 ENV LIVEBOOK_DATA_PATH=/data ENV LIVEBOOK_HOME=${LIVEBOOK_DATA_PATH}/books diff --git a/livebook/meadow_livebook_auth.exs b/livebook/meadow_livebook_auth.exs index 1a4aa84c6..f44cdda5b 100644 --- a/livebook/meadow_livebook_auth.exs +++ b/livebook/meadow_livebook_auth.exs @@ -23,9 +23,22 @@ defmodule MeadowLivebookAuth do @spec authenticate(GenServer.server(), Plug.Conn.t(), keyword()) :: {Plug.Conn.t(), map() | nil} def authenticate(server, conn, _) do - with url <- get_meadow_url() do - set_state(server, :auth_url, url) - {conn, meadow_auth(url, conn)} + with url <- find_meadow_url(server), + user <- meadow_auth(url, conn) do + {conn, user} + end + end + + defp find_meadow_url(server) do + case get_state(server) do + %{auth_url: auth_url} -> + auth_url + + _ -> + with url <- get_meadow_url() do + set_state(server, :auth_url, url) + url + end end end From 44fa64dabdd849c760d019df4d7c55549a9af3ee Mon Sep 17 00:00:00 2001 From: "Michael B. Klein" Date: Wed, 24 Jul 2024 16:22:06 +0000 Subject: [PATCH 10/14] Fix Livebook v0.13.0 auth --- livebook/Dockerfile | 7 ++++--- livebook/meadow_livebook_auth.exs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/livebook/Dockerfile b/livebook/Dockerfile index 48bb04840..46420a9cf 100644 --- a/livebook/Dockerfile +++ b/livebook/Dockerfile @@ -1,9 +1,10 @@ FROM ghcr.io/livebook-dev/livebook:latest ENV LIVEBOOK_AWS_CREDENTIALS=true -ENV LIVEBOOK_IDENTITY_PROVIDER=custom:MeadowLivebookAuth -ENV LIVEBOOK_DISTRIBUTION=name -ENV LIVEBOOK_IP=0.0.0.0 ENV LIVEBOOK_DATA_PATH=/data +ENV LIVEBOOK_DISTRIBUTION=name ENV LIVEBOOK_HOME=${LIVEBOOK_DATA_PATH}/books +ENV LIVEBOOK_IDENTITY_PROVIDER=custom:MeadowLivebookAuth +ENV LIVEBOOK_IP=0.0.0.0 +ENV LIVEBOOK_TOKEN_ENABLED=false RUN mkdir -p ${LIVEBOOK_DATA_PATH}/books ADD ./meadow_livebook_auth.exs /app/user/extensions/meadow_livebook_auth.exs diff --git a/livebook/meadow_livebook_auth.exs b/livebook/meadow_livebook_auth.exs index f44cdda5b..9cf63caca 100644 --- a/livebook/meadow_livebook_auth.exs +++ b/livebook/meadow_livebook_auth.exs @@ -61,7 +61,7 @@ defmodule MeadowLivebookAuth do defp meadow_auth(url, conn) do with meadow_cookie <- conn |> Plug.Conn.fetch_cookies() |> Map.get(:cookies) |> Map.get("_meadow_key") do - Req.get(url, + Req.post(url, body: @query, headers: ["Content-Type": "application/graphql", Cookie: "_meadow_key=#{meadow_cookie}"] ) From 2d12b95924cbd4dcbdbf1cb3c055b280fef6463e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 11:42:40 +0000 Subject: [PATCH 11/14] Bump excoveralls from 0.18.1 to 0.18.2 in /app Bumps [excoveralls](https://github.com/parroty/excoveralls) from 0.18.1 to 0.18.2. - [Release notes](https://github.com/parroty/excoveralls/releases) - [Changelog](https://github.com/parroty/excoveralls/blob/master/CHANGELOG.md) - [Commits](https://github.com/parroty/excoveralls/compare/v0.18.1...v0.18.2) --- updated-dependencies: - dependency-name: excoveralls dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/mix.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/mix.lock b/app/mix.lock index b1c325d7d..098267580 100644 --- a/app/mix.lock +++ b/app/mix.lock @@ -13,7 +13,7 @@ "broadway_sqs": {:hex, :broadway_sqs, "0.7.4", "ab89b298f9253adb8534f92095b56d4879e35fe2f5a0730256f7e824572c637f", [:mix], [{:broadway, "~> 1.0", [hex: :broadway, repo: "hexpm", optional: false]}, {:ex_aws_sqs, "~> 3.2.1 or ~> 3.3", [hex: :ex_aws_sqs, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.3.7 or ~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:saxy, "~> 1.1", [hex: :saxy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7140085c4f7c4b27886b3a8f3d0942976f39f195fdbc2f652c5d7b157f93ae28"}, "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, "cachex": {:hex, :cachex, "3.6.0", "14a1bfbeee060dd9bec25a5b6f4e4691e3670ebda28c8ba2884b12fe30b36bf8", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2"}, - "castore": {:hex, :castore, "1.0.7", "b651241514e5f6956028147fe6637f7ac13802537e895a724f90bf3e36ddd1dd", [:mix], [], "hexpm", "da7785a4b0d2a021cd1292a60875a784b6caef71e76bf4917bdee1f390455cf5"}, + "castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"}, "certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"}, "configparser_ex": {:hex, :configparser_ex, "4.0.0", "17e2b831cfa33a08c56effc610339b2986f0d82a9caa0ed18880a07658292ab6", [:mix], [], "hexpm", "02e6d1a559361a063cba7b75bc3eb2d6ad7e62730c551cc4703541fd11e65e5b"}, "cowboy": {:hex, :cowboy, "2.12.0", "f276d521a1ff88b2b9b4c54d0e753da6c66dd7be6c9fca3d9418b561828a3731", [:make, :rebar3], [{:cowlib, "2.13.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "8a7abe6d183372ceb21caa2709bec928ab2b72e18a3911aa1771639bef82651e"}, @@ -38,7 +38,7 @@ "ex_aws_secretsmanager": {:hex, :ex_aws_secretsmanager, "2.0.0", "deff8c12335f0160882afeb9687e55a97fddcd7d9a82fc3a6fbb270797374773", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}], "hexpm", "8b2838af536c32263ff797012b29e87bad73ef34f43cfa60ebca8e84576f6d45"}, "ex_aws_sqs": {:hex, :ex_aws_sqs, "3.4.0", "f7c4d0177c1c954776363d3dc05e5dfd37ddf0e2c65ec3f047e5c9c7dd1b71ac", [:mix], [{:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:saxy, "~> 1.1", [hex: :saxy, repo: "hexpm", optional: true]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "b504482206ccaf767b714888e9d41a1cfcdcb241577985517114191c812f155a"}, "ex_aws_ssm": {:hex, :ex_aws_ssm, "2.1.0", "548b3d085d2916f54a5b5c5b273673175a46b04ff637624dab582957649eb680", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}], "hexpm", "a91a183dc131a780e74aad10d7866533ca6018a6c2bf0345d52fe3f3c494f9f7"}, - "excoveralls": {:hex, :excoveralls, "0.18.1", "a6f547570c6b24ec13f122a5634833a063aec49218f6fff27de9df693a15588c", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "d65f79db146bb20399f23046015974de0079668b9abb2f5aac074d078da60b8d"}, + "excoveralls": {:hex, :excoveralls, "0.18.2", "86efd87a0676a3198ff50b8c77620ea2f445e7d414afa9ec6c4ba84c9f8bdcc2", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "230262c418f0de64077626a498bd4fdf1126d5c2559bb0e6b43deac3005225a4"}, "exldap": {:hex, :exldap, "0.6.3", "98e8c4ad5e1773b921ba0a5f27c96a6d814a7dff1581e5648eaf7c4f594729e7", [:mix], [], "hexpm", "412fafabe43cfde52d85957776f54edad9258d88b261dab76e0458a43c618a2c"}, "expo": {:hex, :expo, "0.5.1", "249e826a897cac48f591deba863b26c16682b43711dd15ee86b92f25eafd96d9", [:mix], [], "hexpm", "68a4233b0658a3d12ee00d27d37d856b1ba48607e7ce20fd376958d0ba6ce92b"}, "faker": {:hex, :faker, "0.18.0", "943e479319a22ea4e8e39e8e076b81c02827d9302f3d32726c5bf82f430e6e14", [:mix], [], "hexpm", "bfbdd83958d78e2788e99ec9317c4816e651ad05e24cfd1196ce5db5b3e81797"}, From b20a6d71c94eb6bc5a2d9c717dfda75b309c68c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:35:36 +0000 Subject: [PATCH 12/14] Bump absinthe from 1.7.7 to 1.7.8 in /app Bumps [absinthe](https://github.com/absinthe-graphql/absinthe) from 1.7.7 to 1.7.8. - [Release notes](https://github.com/absinthe-graphql/absinthe/releases) - [Changelog](https://github.com/absinthe-graphql/absinthe/blob/main/CHANGELOG.md) - [Commits](https://github.com/absinthe-graphql/absinthe/compare/v1.7.7...v1.7.8) --- updated-dependencies: - dependency-name: absinthe dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mix.lock b/app/mix.lock index b1c325d7d..cd9cfc5f4 100644 --- a/app/mix.lock +++ b/app/mix.lock @@ -1,5 +1,5 @@ %{ - "absinthe": {:hex, :absinthe, "1.7.7", "ecbf4e9b21372dda271c79bb43dded3583b4f080348c5e68d9b5445e790ff17e", [:mix], [{:dataloader, "~> 1.0.0 or ~> 2.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:opentelemetry_process_propagator, "~> 0.2.1 or ~> 0.3", [hex: :opentelemetry_process_propagator, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2145519828bcb7c8621b72d7af2bcff88b01cba2774583c40ebd867e1d336ff6"}, + "absinthe": {:hex, :absinthe, "1.7.8", "43443d12ad2b4fcce60e257ac71caf3081f3d5c4ddd5eac63a02628bcaf5b556", [:mix], [{:dataloader, "~> 1.0.0 or ~> 2.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:opentelemetry_process_propagator, "~> 0.2.1 or ~> 0.3", [hex: :opentelemetry_process_propagator, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c4085df201892a498384f997649aedb37a4ce8a726c170d5b5617ed3bf45d40b"}, "absinthe_phoenix": {:hex, :absinthe_phoenix, "2.0.3", "74e0862f280424b7bc290f6f69e133268bce0b4e7db0218c7e129c5c2b1d3fd4", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:absinthe_plug, "~> 1.5", [hex: :absinthe_plug, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.5", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.13 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}], "hexpm", "caffaea03c17ea7419fe07e4bc04c2399c47f0d8736900623dbf4749a826fd2c"}, "absinthe_plug": {:hex, :absinthe_plug, "1.5.8", "38d230641ba9dca8f72f1fed2dfc8abd53b3907d1996363da32434ab6ee5d6ab", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "bbb04176647b735828861e7b2705465e53e2cf54ccf5a73ddd1ebd855f996e5a"}, "assertions": {:hex, :assertions, "0.20.1", "e6bfcefbf199bc760d273d5a204ad9ef8a4f6c2b4725fc51d10610d73062e57b", [:mix], [], "hexpm", "848284fbde52f752232d73b8f77060ad191e1a98c177873c4b8dc56c4958defd"}, From 7668faf8e6e61961cd773e66bd67ea4db757b373 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:49:51 +0000 Subject: [PATCH 13/14] Bump jason from 1.4.3 to 1.4.4 in /app Bumps [jason](https://github.com/michalmuskala/jason) from 1.4.3 to 1.4.4. - [Release notes](https://github.com/michalmuskala/jason/releases) - [Changelog](https://github.com/michalmuskala/jason/blob/v1.4.4/CHANGELOG.md) - [Commits](https://github.com/michalmuskala/jason/compare/v1.4.3...v1.4.4) --- updated-dependencies: - dependency-name: jason dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mix.lock b/app/mix.lock index b1c325d7d..6c2092b95 100644 --- a/app/mix.lock +++ b/app/mix.lock @@ -53,7 +53,7 @@ "hush_aws_secrets_manager": {:hex, :hush_aws_secrets_manager, "0.2.0", "308289205282b31168691180f5a85b8ef72d6ae2bac4e3cd5cb6f725a0499b99", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:ex_aws_secretsmanager, "~> 2.0", [hex: :ex_aws_secretsmanager, repo: "hexpm", optional: false]}, {:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}, {:hush, "~> 0.4", [hex: :hush, repo: "hexpm", optional: false]}], "hexpm", "e07d5515d0e9c44ab891c5402ce4f7827cb167eed8ef84b426d8d2962d07a4ab"}, "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, "inflex": {:hex, :inflex, "2.1.0", "a365cf0821a9dacb65067abd95008ca1b0bb7dcdd85ae59965deef2aa062924c", [:mix], [], "hexpm", "14c17d05db4ee9b6d319b0bff1bdf22aa389a25398d1952c7a0b5f3d93162dd8"}, - "jason": {:hex, :jason, "1.4.3", "d3f984eeb96fe53b85d20e0b049f03e57d075b5acda3ac8d465c969a2536c17b", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "9a90e868927f7c777689baa16d86f4d0e086d968db5c05d917ccff6d443e58a3"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], [], "hexpm", "fc3499fed7a726995aa659143a248534adc754ebd16ccd437cd93b649a95091f"}, "jumper": {:hex, :jumper, "1.0.1", "3c00542ef1a83532b72269fab9f0f0c82bf23a35e27d278bfd9ed0865cecabff", [:mix], [], "hexpm", "318c59078ac220e966d27af3646026db9b5a5e6703cb2aa3e26bcfaba65b7433"}, "jwt": {:hex, :jwt, "0.1.11", "4f18896c4a182530ed445312c45ac353d801fbdfd54f538910370e9cf12687cf", [:rebar3], [{:base64url, "~> 0.0.1", [hex: :base64url, repo: "hexpm", optional: false]}, {:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm", "b483fbb786d1bd050b3c551d323112d604e5b0f9cf9dc5671adeec462c2e36bb"}, From 6ba4b8d8a7a716d1c74baab6954200505e8a4b1e Mon Sep 17 00:00:00 2001 From: "Michael B. Klein" Date: Tue, 30 Jul 2024 20:58:38 +0000 Subject: [PATCH 14/14] Tweak Sitemap generation Include all public, published items in sitemap Have index point at api/sitemap/ route --- app/config/dev.exs | 1 + app/config/releases.exs | 11 +++++++++-- app/config/test.exs | 1 + app/lib/meadow/utils/sitemap.ex | 9 ++++++--- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/config/dev.exs b/app/config/dev.exs index d0a9ecd7f..bfa8a39f4 100644 --- a/app/config/dev.exs +++ b/app/config/dev.exs @@ -124,6 +124,7 @@ if prefix = System.get_env("DEV_PREFIX") do end config :meadow, :sitemaps, + base_url: "https://dc.library.northwestern.edu/", gzip: false, store: Sitemapper.FileStore, sitemap_url: "https://devbox.library.northwestern.edu:3333/", diff --git a/app/config/releases.exs b/app/config/releases.exs index 0b2dafcbc..b1d9d47b4 100644 --- a/app/config/releases.exs +++ b/app/config/releases.exs @@ -105,7 +105,9 @@ config :meadow, bucket: aws_secret("meadow", dig: ["buckets", "sitemap"]), path: "/" ], - sitemap_url: aws_secret("meadow", dig: ["dc", "base_url"]) + base_url: aws_secret("meadow", dig: ["dc", "base_url"]), + sitemap_url: + aws_secret("meadow", dig: ["dc", "base_url"], apply: &{:ok, Path.join(&1, "api/sitemap")}) ], validation_ping_interval: environment_secret("VALIDATION_PING_INTERVAL", default: "1000") @@ -125,7 +127,12 @@ config :meadow, Meadow.Scheduler, overlap: false, timezone: "America/Chicago", jobs: [ - # Runs daily at the configured time (default: 2AM Central) + # Sitemap generation runs daily at the configured time (default: 1AM Central) + { + aws_secret("meadow", dig: ["scheduler", "sitemap"], default: "0 1 * * *"), + {Meadow.Utils.Sitemap, :generate, []} + }, + # Preservation check runs daily at the configured time (default: 2AM Central) { aws_secret("meadow", dig: ["scheduler", "preservation_check"], default: "0 2 * * *"), {Meadow.Data.PreservationChecks, :start_job, []} diff --git a/app/config/test.exs b/app/config/test.exs index 551fc23bf..46e977fbd 100644 --- a/app/config/test.exs +++ b/app/config/test.exs @@ -119,6 +119,7 @@ config :honeybadger, config :meadow, :sitemaps, gzip: true, store: Sitemapper.S3Store, + base_url: "http://localhost:3333/", sitemap_url: "http://localhost:3333/", store_config: [bucket: prefix("uploads"), path: ""] diff --git a/app/lib/meadow/utils/sitemap.ex b/app/lib/meadow/utils/sitemap.ex index 72ec49d30..367220df2 100644 --- a/app/lib/meadow/utils/sitemap.ex +++ b/app/lib/meadow/utils/sitemap.ex @@ -2,9 +2,12 @@ defmodule Meadow.Utils.Sitemap do @moduledoc """ Generate and upload Digital Collection sitemaps """ - alias Meadow.Data.{Collections, Works} + alias Meadow.Data.Collections + alias Meadow.Data.Schemas.Work alias Meadow.Repo + import Ecto.Query + require Logger @doc """ @@ -74,7 +77,7 @@ defmodule Meadow.Utils.Sitemap do end defp work_urls do - Works.work_query(visibility: "OPEN", work_type: "IMAGE") + from(w in Work, where: w.visibility["id"] == ^"OPEN" and w.published) |> Repo.stream() |> Stream.map(fn %{id: id, updated_at: updated_at} -> %Sitemapper.URL{ @@ -88,7 +91,7 @@ defmodule Meadow.Utils.Sitemap do defp expand_url(path) do config() - |> Keyword.get(:sitemap_url) + |> Keyword.get(:base_url) |> URI.parse() |> URI.merge(path) |> URI.to_string()