Skip to content

Commit

Permalink
Merge pull request #3727 from nulib/deploy/staging
Browse files Browse the repository at this point in the history
Deploy v9.1.2 to production
  • Loading branch information
mbklein authored Jan 22, 2024
2 parents 8031948 + ec6a1a2 commit bf45db9
Show file tree
Hide file tree
Showing 23 changed files with 523 additions and 851 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ And force a re-index:
Meadow.Data.Indexer.reindex_all()
```

### Doing development on the Meadow Pipeline lambdas

In the AWS developer environment, the lambdas associated with the pipeline are shared amongst developers. In order to do development and see whether it's working you can override the configuration to use your local files instead of the deployed lambdas. Example below (you don't have to override them all. Just the ones you need).

Edit `config/dev.local.exs` to get the lambdas to use the local copy through the port:`

```elixir
config :meadow, :lambda,
digester: {:local, {Path.expand("../lambdas/digester/index.js"), "handler"}},
exif: {:local, {Path.expand("../lambdas/exif/index.js"), "handler"}},
frame_extractor: {:local, {Path.expand("../lambdas/frame-extractor/index.js"), "handler"}},
mediainfo: {:local, {Path.expand("../lambdas/mediainfo/index.js"), "handler"}},
mime_type: {:local, {Path.expand("../lambdas/mime-type/index.js"), "handler"}},
tiff: {:local, {Path.expand("../lambdas/pyramid-tiff/index.js"), "handler"}}
```

### TypeScript/GraphQL Types

Meadow now supports TypeScript and GraphQL types in the React app. To generate types, run the following commands:
Expand Down
4 changes: 2 additions & 2 deletions app/assets/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ async function buildMode(opts) {
const promise = watch
? watchMode(opts)
: deploy
? deployMode(opts)
: buildMode(opts);
? deployMode(opts)
: buildMode(opts);

let callback = (_result) => true;
if (watch) {
Expand Down
13 changes: 7 additions & 6 deletions app/assets/js/__generated__/fragment-masking.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function WorkTabsPreservationFileSetDropzone({
const { isValid, code, message } = isFileValid(
fileSetRole,
workTypeId,
file.type
file.type,
);

// Dropzone validator: null means valid
Expand Down
31 changes: 16 additions & 15 deletions app/assets/js/components/Work/Tabs/Preservation/FileSetModal.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import React, { useState } from "react";
import PropTypes from "prop-types";
import { Button, Notification } from "@nulib/design-system";
import { GET_PRESIGNED_URL } from "@js/components/IngestSheet/ingestSheet.gql.js";
import { FormProvider, useForm } from "react-hook-form";
import { GET_WORK, INGEST_FILE_SET } from "@js/components/Work/work.gql.js";
import { useLazyQuery, useMutation } from "@apollo/client";
import React, { useState } from "react";
/** @jsx jsx */
import { css, jsx } from "@emotion/react";
import { s3Location, toastWrapper } from "@js/services/helpers";
import { useForm, FormProvider } from "react-hook-form";
import WorkTabsPreservationFileSetDropzone from "@js/components/Work/Tabs/Preservation/FileSetDropzone";
import WorkTabsPreservationFileSetForm from "@js/components/Work/Tabs/Preservation/FileSetForm";
import { useLazyQuery, useMutation } from "@apollo/client";

import Error from "@js/components/UI/Error";
import classNames from "classnames";
import { GET_PRESIGNED_URL } from "@js/components/IngestSheet/ingestSheet.gql.js";
import PropTypes from "prop-types";
import UIFormField from "@js/components/UI/Form/Field.jsx";
import UIFormSelect from "@js/components/UI/Form/Select.jsx";
import { useCodeLists } from "@js/context/code-list-context";
import WorkTabsPreservationFileSetDropzone from "@js/components/Work/Tabs/Preservation/FileSetDropzone";
import WorkTabsPreservationFileSetForm from "@js/components/Work/Tabs/Preservation/FileSetForm";
import classNames from "classnames";
import useAcceptedMimeTypes from "@js/hooks/useAcceptedMimeTypes";
import { useCodeLists } from "@js/context/code-list-context";

/** @jsx jsx */
import { css, jsx } from "@emotion/react";
const modalCss = css`
z-index: 100;
`;
Expand Down Expand Up @@ -79,7 +80,7 @@ function WorkTabsPreservationFileSetModal({
onCompleted({ ingestFileSet }) {
toastWrapper(
"is-success",
`FileSet record id: ${ingestFileSet.id} created successfully and ${ingestFileSet.coreMetadata.original_filename} was submitted to the ingest pipeline.`
`FileSet record id: ${ingestFileSet.id} created successfully and ${ingestFileSet.coreMetadata.original_filename} was submitted to the ingest pipeline.`,
);
resetForm();
closeModal();
Expand All @@ -97,7 +98,7 @@ function WorkTabsPreservationFileSetModal({
},
],
awaitRefetchQueries: true,
}
},
);

const handleSubmit = (data) => {
Expand Down Expand Up @@ -161,7 +162,7 @@ function WorkTabsPreservationFileSetModal({
setS3UploadLocation(s3Location(presignedUrl));
} else {
setUploadError(
`Error uploading file to S3. Response status: ${request.status}`
`Error uploading file to S3. Response status: ${request.status}`,
);
setCurrentFile(null);
}
Expand Down Expand Up @@ -220,7 +221,7 @@ function WorkTabsPreservationFileSetModal({
name="fileSetRole"
label="Fileset Role"
options={codeLists?.fileSetRoleData?.codeList}
required
required={!Boolean(watchRole)}
showHelper
disabled={Boolean(s3UploadLocation)}
/>
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"],
}
Loading

0 comments on commit bf45db9

Please sign in to comment.