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

Val -> Prod #139765

Merged
merged 29 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0e8e6af
update architecture diagram
braxex Aug 30, 2024
3dbba17
Ensure Section 2 tables populate for admins (#139757)
gmrabian Sep 6, 2024
a7d6486
Update datagrid patterns (#139760)
gmrabian Sep 9, 2024
e70e079
Pull previous year value for 3c fields (#139761)
gmrabian Sep 9, 2024
5ceb795
Adding destroy action notification for slack (#139759)
dwhitestratiform Sep 10, 2024
26eed16
[CMDCT-3976] <11 Print View Fix (#139751)
ntsummers1 Sep 12, 2024
302182a
Main -> Val (#139764)
ntsummers1 Sep 17, 2024
0805577
BUGFIG: Remove parseInt() for previous year value to allow non-number…
gmrabian Sep 18, 2024
80c6ccd
Bugfix: Section 3c Part 5 Question 2 (#139768)
ntsummers1 Sep 19, 2024
ff74b23
fix admin print section bug (#139766)
britt-mo Sep 19, 2024
36af6a0
Main -> Val (#139769)
ntsummers1 Sep 20, 2024
eadb715
update macfc security hub github action (#139770)
gmrabian Sep 20, 2024
679cc36
Upgrade vite version for snyk (#139772)
gmrabian Sep 20, 2024
9d2ff75
e2e bug: add wait after submitting (#139773)
gmrabian Sep 23, 2024
56ef3e3
Wrap synthesize value calls in useEffect (#139774)
gmrabian Sep 24, 2024
f4cbb13
Revert "Wrap synthesize value calls in useEffect" (#139776)
ntsummers1 Sep 24, 2024
598cf7b
Rollback to Arch Diagram (#139777)
ntsummers1 Sep 24, 2024
0dd1f6b
Revert "Rollback to Arch Diagram (#139777)" (#139779)
ntsummers1 Sep 24, 2024
03ba3d7
Rollback to before rework (#139781)
ntsummers1 Sep 25, 2024
ed88eb2
Revert "Rollback to before rework" (#139782)
ntsummers1 Sep 25, 2024
cbcafe6
Create base for new 2024 template (#139754)
ntsummers1 Sep 27, 2024
8501f12
Main -> Val (#139783)
ntsummers1 Sep 27, 2024
78fc5c4
Redux: put functions formerly in mapState back in useSelector (#139784)
gmrabian Oct 2, 2024
84b04d5
Revert "Redux: put functions formerly in mapState back in useSelector…
gmrabian Oct 2, 2024
77b91b2
Remove section 1's question 9 accidental carryover (#139787)
ntsummers1 Oct 2, 2024
9e14b58
Main -> Val (#139789)
ntsummers1 Oct 2, 2024
5eaaa1d
update aws-sdk dependencies (#139790)
gmrabian Oct 3, 2024
9ad04ff
Fix typo and upload 2024 template (#139794)
bangbay-bluetiger Oct 9, 2024
18c4a91
Main -> Val (#139795)
ntsummers1 Oct 9, 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
16 changes: 15 additions & 1 deletion .github/workflows/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,18 @@ jobs:
inputs: '{ "topics": "mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.config,mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.offsets,mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.status"}'
ref: refs/heads/master # Otherwise workflow-dispatch tries to operate off of our default name
- name: Destroy
run: ./run destroy --stage $STAGE_PREFIX$branch_name --verify false
run: ./run destroy --stage $STAGE_PREFIX$branch_name --verify false

# Notify the integrations channel when a destroy action fails
notify_on_destroy_failure:
runs-on: ubuntu-latest
needs:
- destroy
if: ${{ failure() }}
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: ":boom: A destroy action has failed on ${{ github.repository }}."
MSG_MINIMAL: true
SLACK_WEBHOOK: ${{ secrets.INTEGRATIONS_SLACK_WEBHOOK }}
5 changes: 2 additions & 3 deletions .github/workflows/scan_security-hub-jira-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ jobs:
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
role-to-assume: ${{ secrets.PRODUCTION_SYNC_OIDC_ROLE }}
- name: Sync Security Hub and Jira
uses: Enterprise-CMCS/mac-fc-security-hub-visibility@v1.0.5
uses: Enterprise-CMCS/mac-fc-security-hub-visibility@v2.0.9
with:
jira-username: "mdct_github_service_account"
jira-token: ${{ secrets.JIRA_ENT_USER_TOKEN }}
jira-host: jiraent.cms.gov
jira-project-key: CMDCT
jira-ignore-statuses: Done, Closed, Canceled
jira-custom-fields: '{ "customfield_10100": "CMDCT-2280", "customfield_26700" : [{"id": "40101", "value": "CARTS"}] }'
aws-severities: CRITICAL, HIGH, MEDIUM
assign-jira-ticket-to: "MWTW"
jira-assignee: "MWTW"
2 changes: 1 addition & 1 deletion .images/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exclude: 'seed-section-base-*'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
Expand Down
2 changes: 1 addition & 1 deletion services/app-api/handlers/apiNames.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
POST /formTemplates - create the sections for a given year for all known states

-- fiscalYearTemplate
GET /fiscalYearTemplate - get the download link for the Fiscal Year Report Template
GET /fiscalYearTemplate/{year} - get the download link for the Fiscal Year Report Template

-- state
GET /state - return info on all states and territories
Expand Down
10 changes: 8 additions & 2 deletions services/app-api/handlers/fiscalYearTemplate/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import handler from "../../libs/handler-lib";
import s3 from "../../libs/s3-lib";
import { ReportPdfs } from "../../types";

export const getFiscalYearTemplateLink = handler(async (_context) => {
const filename = ReportPdfs[2023];
export const getFiscalYearTemplateLink = handler(async (event, _context) => {
if (!event.pathParameters?.year) {
throw new Error("Be sure to include year in the path");
}

const { year } = event.pathParameters;

const filename = ReportPdfs[year];
const url = await s3.getSignedDownloadUrl(
{
Bucket:
Expand Down
22 changes: 22 additions & 0 deletions services/app-api/handlers/fiscalYearTemplate/tests/get.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,32 @@ describe("Test Get Fiscal Year Template Handlers", () => {
...testEvent,
};

event.pathParameters = { year: "2024" };

const res = await getFiscalYearTemplateLink(event, null);
expect(res.statusCode).toBe(200);
expect(JSON.parse(res.body)).toEqual({
psurl: "mock url",
});
});

test("fetching fiscal year template without params should return server error", async () => {
const event: APIGatewayProxyEvent = {
...testEvent,
};

event.pathParameters = null;

const res = await getFiscalYearTemplateLink(event, null);
expect(res.statusCode).toBe(500);
});

test("fetching fiscal year template without year should return server error", async () => {
const event: APIGatewayProxyEvent = {
...testEvent,
};

const res = await getFiscalYearTemplateLink(event, null);
expect(res.statusCode).toBe(500);
});
});
3 changes: 3 additions & 0 deletions services/app-api/libs/validation/backend-section.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ export const sectionSchema = {
hint: {
type: "string",
},
mask: {
type: "string",
},
questions: {
type: "array",
items: {
Expand Down
10 changes: 5 additions & 5 deletions services/app-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"typescript": "^4.5.4"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.621.0",
"@aws-sdk/client-s3": "^3.621.0",
"@aws-sdk/client-ssm": "^3.621.0",
"@aws-sdk/lib-dynamodb": "^3.621.0",
"@aws-sdk/s3-request-presigner": "^3.621.0",
"@aws-sdk/client-dynamodb": "^3.662.0",
"@aws-sdk/client-s3": "^3.662.0",
"@aws-sdk/client-ssm": "^3.662.0",
"@aws-sdk/lib-dynamodb": "^3.662.0",
"@aws-sdk/s3-request-presigner": "^3.662.0",
"aws-jwt-verify": "^3.1.0",
"dompurify": "^3.1.4",
"jsdom": "^24.1.0",
Expand Down
2 changes: 1 addition & 1 deletion services/app-api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ functions:
handler: handlers/fiscalYearTemplate/get.getFiscalYearTemplateLink
events:
- http:
path: fiscalYearTemplate
path: fiscalYearTemplate/{year}
method: get
cors: true
authorizer: aws_iam
Expand Down
7 changes: 6 additions & 1 deletion services/app-api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,15 @@ export const enum RequestMethods {
/**
* Preseving historic filenames in case we need to make them available on demand or switch between available forms.
*/
export const ReportPdfs = {
interface ReportPdfsInterface {
[key: string]: string;
}

export const ReportPdfs: ReportPdfsInterface = {
2021: "FFY_2021_CARTS_Template.pdf",
2022: "FFY_2022_CARTS_Template.pdf",
2023: "FFY_2023_CARTS_Template.pdf",
2024: "FFY_2024_CARTS_Template.pdf",
};
/* eslint-enable no-unused-vars */

Expand Down
Loading