Skip to content

Commit c092076

Browse files
committed
sync master.
2 parents d23f33f + 0c9e499 commit c092076

File tree

101 files changed

+34246
-1004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+34246
-1004
lines changed

.github/pull_request_template.md

Lines changed: 17 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,15 @@ This PR template is here to help ensure you're setup for success:
77
**JIRA Ticket:**
88
[BB2-XXXX](https://jira.cms.gov/browse/BB2-XXXX)
99

10-
**User Story or Bug Summary:**
11-
<!-- Please copy-paste the brief user story or bug description that this PR is intended to address. -->
12-
13-
1410
### What Does This PR Do?
1511

1612
<!--
1713
Add detailed description & discussion of changes here.
18-
The contents of this section should be used as your commit message (unless you merge the PR via a merge commit, of course).
19-
20-
Please follow standard Git commit message guidelines:
21-
* First line should be a capitalized, short (50 chars or less) summary.
22-
* The rest of the message should be in standard Markdown format, wrapped to 72 characters.
23-
* Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behavior.
24-
* List all relevant Jira issue keys, one per line at the end of the message, per: <https://confluence.atlassian.com/jirasoftwarecloud/processing-issues-with-smart-commits-788960027.html>.
25-
26-
Reference: <https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project>.
2714
-->
2815

29-
3016
### What Should Reviewers Watch For?
3117

3218
<!--
33-
Add some items to the following list, or remove the entire section if it doesn't apply for some reason.
34-
3519
Common items include:
3620
* Is this likely to address the goals expressed in the user story?
3721
* Are any additional documentation updates needed?
@@ -41,73 +25,36 @@ Common items include:
4125
* Can you find any bugs if you run the code locally and test it manually?
4226
-->
4327

44-
If you're reviewing this PR, please check these things, in particular:
28+
If you're reviewing this PR, please check for these things in particular:
29+
<!-- Add some items here -->
4530

46-
* TODO
31+
### Validation
4732

33+
<!--
34+
Have you fully verified and tested these changes? Is the acceptance criteria met? Please provide reproducible testing instructions, code snippets, or screenshots as applicable.
35+
-->
4836

4937
### What Security Implications Does This PR Have?
5038

51-
Submitters should complete the following questionnaire:
52-
53-
* If the answer to any of the questions below is **Yes**, then here's a link to the associated Security Impact Assessment (SIA), security checklist, or other similar document in Confluence: N/A.
54-
* Does this PR add any new software dependencies? **Yes** or **No**.
55-
* Does this PR modify or invalidate any of our security controls? **Yes** or **No**.
56-
* Does this PR store or transmit data that was not stored or transmitted before? **Yes** or **No**.
57-
* If the answer to any of the questions below is **Yes**, then please add a Security Engineer and ISSO as a reviewer, and note that this PR should not be merged unless/until he also approves it.
58-
* Do you think this PR requires additional review of its security implications for other reasons? **Yes** or **No**.
39+
Please indicate if this PR does any of the following:
5940

41+
* Adds any new software dependencies
42+
* Modifies any security controls
43+
* Adds new transmission or storage of data
44+
* Any other changes that could possibly affect security?
6045

61-
### What Needs to Be Merged and Deployed Before this PR?
46+
- [ ] Yes, one or more of the above security implications apply. This PR must not be merged without the ISSO or team
47+
security engineer's approval.
6248

63-
<!--
64-
Add some items to the following list, or remove the entire section if it doesn't apply.
65-
66-
Common items include:
67-
* Database migrations (which should always be deployed by themselves, to reduce risk).
68-
* New features in external dependencies (e.g. BFD).
69-
-->
70-
71-
This PR cannot be either merged or deployed until the following pre-requisite changes have been fully deployed:
72-
73-
* CMSgov/some_repo#42
74-
7549
### Any Migrations?
7650

7751
<!--
7852
Make sure to work with whoever is doing the deploy so they are aware of any migrations that may need to be run
7953
-->
8054

8155
* [ ] Yes, there are migrations
82-
* [ ] The migrations should be run PRIOR to the code being deployed
83-
* [ ] The migrations should be run AFTER the code is deployed
84-
* [ ] There is a more complicated migration plan (downtime, etc) <!-- Make sure to include the details of the plan below -->
56+
* [ ] The migrations should be run PRIOR to the code being deployed
57+
* [ ] The migrations should be run AFTER the code is deployed
58+
* [ ] There is a more complicated migration plan (downtime,
59+
etc) <!-- Make sure to include the details of the plan below -->
8560
* [ ] No migrations
86-
87-
88-
### Submitter Checklist
89-
90-
<!--
91-
Helpful hint: if needed, Git allows you to edit your PR's commits and history, prior to merge.
92-
See these resources for more information:
93-
94-
* <https://dev.to/maxwell_dev/the-git-rebase-introduction-i-wish-id-had>
95-
* <https://raphaelfabeni.com/git-editing-commits-part-1/>
96-
-->
97-
98-
I have gone through and verified that...:
99-
100-
* [ ] This PR is reasonably limited in scope, to help ensure that:
101-
1. It doesn't unnecessarily tie a bunch of disparate features, fixes, refactorings, etc. together.
102-
2. There isn't too much of a burden on reviewers.
103-
3. Any problems it causes have a small "blast radius".
104-
4. It'll be easier to rollback if that becomes necessary.
105-
* [ ] I have named this PR and its branch such that they'll be automatically be linked to the (most) relevant Jira issue, per: <https://confluence.atlassian.com/adminjiracloud/integrating-with-development-tools-776636216.html>.
106-
* [ ] This PR includes any required documentation changes, including `README` updates and changelog / release notes entries.
107-
* [ ] All new and modified code is appropriately commented, such that the what and why of its design would be reasonably clear to engineers, preferably ones unfamiliar with the project.
108-
* [ ] All tech debt and/or shortcomings introduced by this PR are detailed in `TODO` and/or `FIXME` comments, which include a JIRA ticket ID for any items that require urgent attention.
109-
* [ ] Reviews are requested from both:
110-
* At least two other engineers on this project, at least one of whom is a senior engineer or owns the relevant component(s) here.
111-
* Any relevant engineers on other projects (e.g. BFD, SLS, etc.).
112-
* [ ] Any deviations from the other policies in the [DASG Engineering Standards](https://github.com/CMSgov/cms-oeda-dasg/blob/master/policies/engineering_standards.md) are specifically called out in this PR, above.
113-
* Please review the standards every few months to ensure you're familiar with them.

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
FROM --platform=linux/amd64 python:3.8
1+
FROM --platform=linux/amd64 python:3.11
22
ENV PYTHONUNBUFFERED 1
3+
ENV PYDEVD_DISABLE_FILE_VALIDATION 1
34
RUN useradd -m -s /bin/bash DEV
45
USER DEV
56
ADD . /code

Dockerfile.selenium

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM seleniarm/standalone-chromium
22

33
ENV PYTHONUNBUFFERED 1
44
USER root
5-
RUN apt-get update ; apt-get install -yq git curl libpq-dev libffi-dev
5+
#RUN apt-get update ; apt-get install -yq git curl libpq-dev libffi-dev
66
RUN apt-get update ; apt-get install -yq python3 python3-venv
77
RUN ln -s /usr/bin/python3 /usr/local/bin/python
88
RUN useradd -m -s /bin/bash DEV
@@ -13,4 +13,4 @@ RUN python -m venv /tmp/venv
1313
RUN . /tmp/venv/bin/activate
1414
ENV PATH="/tmp/venv/bin:${PATH}"
1515
RUN pip3 install --upgrade pip
16-
RUN pip3 install selenium pytest jsonschema
16+
RUN pip3 install selenium pytest debugpy jsonschema python-dateutil
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM --platform=linux/amd64 python:3.11
2+
# For build CBC Jenkins job ECR image
3+
ENV PYTHONUNBUFFERED 1
4+
5+
RUN mkdir /code
6+
ADD . /code/
7+
WORKDIR /code
8+
9+
RUN pip install --upgrade pip
10+
RUN apt-get update && apt-get install -yq git unzip curl
11+
# Install Chrome for Selenium
12+
RUN curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb \
13+
&& dpkg -i /chrome.deb || apt-get install -yf \
14+
&& rm /chrome.deb
15+
# Install chromedriver for Selenium
16+
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip \
17+
&& unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ \
18+
&& chmod +x /usr/local/bin/chromedriver

Jenkinsfiles/Jenkinsfile.cbc-run-multi-pr-checks-w-selenium

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
pipeline {
22
agent {
33
kubernetes {
4-
defaultContainer "bb2-cbc-build-selenium-python38"
5-
yamlFile "Jenkinsfiles/cbc-pod-deployment-config-w-selenium-p38.yaml"
4+
defaultContainer "bb2-cbc-build-selenium-python311"
5+
yamlFile "Jenkinsfiles/cbc-pod-deployment-config-w-selenium-p311.yaml"
66
}
77
}
88

99
environment {
10-
USE_MSLSX = false
10+
USE_MSLSX = true
1111
DJANGO_LOG_JSON_FORMAT_PRETTY = true
1212
DJANGO_SETTINGS_MODULE = "hhs_oauth_server.settings.logging_it"
1313
OAUTHLIB_INSECURE_TRANSPORT = true
@@ -55,6 +55,7 @@ pipeline {
5555
sh """
5656
python -m venv venv
5757
. venv/bin/activate
58+
python -m pip install --upgrade pip setuptools wheel cryptography
5859
make reqs-download
5960
make reqs-install-dev
6061
pip install --upgrade coverage
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: Pod
3+
spec:
4+
containers:
5+
- name: bb2-cbc-build-selenium-python311
6+
image: "public.ecr.aws/f5g8o1y9/bb2-cbc-build-selenium-python311:latest"
7+
tty: true
8+
command: ["tail", "-f"]
9+
imagePullPolicy: Always
10+
nodeSelector:
11+
Agents: true

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ reqs-compile:
44

55
# Note: requirements.dev.txt includes packages from requirements.txt also.
66
reqs-download:
7-
pip download -r requirements/requirements.dev.txt --dest vendor --platform manylinux2014_x86_64 --abi cp38 --no-deps
7+
pip download -r requirements/requirements.dev.txt --dest vendor --platform manylinux2014_x86_64 --abi cp311 --no-deps
88

99
#Note: Only installs prod requirements NOT RECOMMENDED FOR DEVELOPMENT.
1010
reqs-download-prod:
11-
pip download -r requirements/requirements.txt --dest vendor --platform manylinux2014_x86_64 --abi cp38 --no-deps
11+
pip download -r requirements/requirements.txt --dest vendor --platform manylinux2014_x86_64 --abi cp311 --no-deps
1212

1313
reqs-install:
1414
pip install -r requirements/requirements.txt --no-index --find-links ./vendor/

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,4 @@ by their respective authors.
167167
License
168168
-------
169169

170-
This project is free and open source software under the Apache 2 license. See LICENSE for more information.
171-
170+
This project is free and open source software under the Apache 2 license. See LICENSE for more information.

apps/accounts/forms.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ class SignupForm(UserCreationForm):
2020
max_length=100, label=_("Organization Name"), required=True
2121
)
2222
password1 = forms.CharField(
23-
widget=forms.PasswordInput, max_length=120, label=_("Password")
23+
widget=forms.PasswordInput,
24+
max_length=120,
25+
label=_("Password"),
26+
help_text="<span style='color:#323a45'>Password must contain at least:</br>"
27+
"<span>&#8226;</span> One upper case letter</br>"
28+
"<span>&#8226;</span> One lower case letter</br>"
29+
"<span>&#8226;</span> One special character</br>"
30+
"<span>&#8226;</span> 8 characters</style>"
2431
)
2532
password2 = forms.CharField(
2633
widget=forms.PasswordInput, max_length=120, label=_("Password (again)")

apps/accounts/management/commands/create_super_user_from_envars.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import logging
2-
2+
import os
33
import apps.logging.request_logger as bb2logging
44

5-
from getenv import env
65
from django.contrib.auth.models import User
76
from django.core.management.base import BaseCommand
87

@@ -30,9 +29,9 @@ class Command(BaseCommand):
3029
def handle(self, *args, **options):
3130

3231
# get variables
33-
super_username = env("DJANGO_SUPERUSER_USERNAME", "")
34-
super_password = env("DJANGO_SUPERUSER_PASSWORD", "")
35-
super_email = env("DJANGO_SUPERUSER_EMAIL", "")
32+
super_username = os.environ.get("DJANGO_SUPERUSER_USERNAME", "")
33+
super_password = os.environ.get("DJANGO_SUPERUSER_PASSWORD", "")
34+
super_email = os.environ.get("DJANGO_SUPERUSER_EMAIL", "")
3635
if super_username and super_password and super_email:
3736
# create a super user
3837
r = create_superuser(super_username, super_password, super_email)

0 commit comments

Comments
 (0)