-
Notifications
You must be signed in to change notification settings - Fork 3
Clean out the static frontend #1731
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
Conversation
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 9430286 | Triggered | Generic Password | 2b15331 | docker-compose-e2e-tests.yml | View secret |
| 9430286 | Triggered | Generic Password | 2b15331 | docker-compose-e2e-tests.yml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
| "BACKEND": "django.template.backends.django.DjangoTemplates", | ||
| "DIRS": [ | ||
| BASE_DIR + "/templates/", | ||
| BASE_DIR + "/frontends/mit-learn/build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed for anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was necessary when django served the JS
|
|
||
| # Placeholder build for use in django tests. | ||
| mkdir ./frontends/mit-learn/build | ||
| touch ./frontends/mit-learn/build/index.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed for anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only back when django served the JS
| "main", | ||
| "public", | ||
| "images", | ||
| "blank.png", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a blank.png at this path, but do we actually need it for this test? It's not used in the frontend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's "supposed" to be the fallback for embedly. See frontends/ol-utilities/src/learning-resources/learning-resources.ts
That said:
- we don't need the /static version
- The version we do have set isn't working right now (https://rc.learn.mit.edu/static/images/blank.png) ... unsure why
- EDIT: I forgot I was on your branch. The link I posted does not work, but should after this release, I think.
ChristopherChudzicki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but could you change the url in
const BLANK_IMAGE = "https://rc.learn.mit.edu/static/images/blank.png"
to use NEXT_PUBLIC_ORIGIN
What are the relevant tickets?
https://github.com/mitodl/hq/issues/5846
Description (What does it do?)
Removes the ./frontends/mit-learn workspace and any references. This was the entrypoint for the previous static frontend, now replaced by the Next.js entrypoint at ./frontends/main.
Also removes the E2E/browser tests as these have been inactive and have not been migrated to work with Next.js.
How can this be tested?
Generally, all tests should pass on frontend and backend and services should build and run with Docker without error.