Skip to content

Commit

Permalink
Merge pull request #56111 from code-dot-org/staging
Browse files Browse the repository at this point in the history
DTT (Staging > Test) [robo-dtt]
  • Loading branch information
deploy-code-org committed Jan 30, 2024
2 parents 84973d3 + 333d812 commit 93024f0
Show file tree
Hide file tree
Showing 77 changed files with 17,681 additions and 700 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: CI Pipeline

on:
workflow_dispatch:
# Add additional trigger events as needed (e.g., push, pull_request, etc.)
inputs:
pr_id:
description: 'Pull Request ID (default: 55766)'
required: false
default: '55766'

env:
AWS_DEFAULT_REGION: us-east-1
Expand All @@ -16,35 +20,17 @@ jobs:
if: github.actor == 'pablo-code-org'

steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
path: code-dot-org

- name: Find and Cache Stale Files
id: stalefiles
run: |
find code-dot-org -type f -not -path './.git/*' -mtime +730 > stale_files.txt
echo "::set-output name=stale_hash::$(sha256sum stale_files.txt | cut -d ' ' -f1)"
- name: Cache stale files
uses: actions/cache@v2
with:
path: |
$(cat stale_files.txt)
key: ${{ runner.os }}-stale-${{ steps.stalefiles.outputs.stale_hash }}

- name: Get Branch Name from Hardcoded Pull Request ID
- name: Get Branch Name from Pull Request ID
id: get_branch
run: |
PR_ID=55766
PR_ID=${{ github.event.inputs.pr_id }}
PR_DATA=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/code-dot-org/code-dot-org/pulls/$PR_ID)
BRANCH_NAME=$(echo $PR_DATA | jq -r .head.ref)
echo "Branch Name: $BRANCH_NAME"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Checkout Branch
- name: Checkout Repository at Branch
uses: actions/checkout@v2
with:
ref: ${{ steps.get_branch.outputs.branch_name }}
Expand All @@ -59,11 +45,25 @@ jobs:
- name: Set up Docker Environment
run: docker build -t code-dot-org-testing-docker-image -f ./code-dot-org/docker/dockerfiles/Dockerfile ./code-dot-org

- name: Run ls Unit Tests without working dir
- name: Aggressive Debugging of Docker Container
run: |
docker run \
code-dot-org-testing-docker-image \
/bin/bash -c "ls -la ."
echo "Debugging / Directory"
docker run code-dot-org-testing-docker-image /bin/bash -c "ls -la /"
echo "Debugging /home Directory"
docker run code-dot-org-testing-docker-image /bin/bash -c "ls -la /home"
echo "Debugging /circleci Directory"
docker run code-dot-org-testing-docker-image /bin/bash -c "ls -la /circleci"
echo "Debugging deeper into /circleci"
docker run code-dot-org-testing-docker-image /bin/bash -c "ls -laR /circleci"
echo "Searching for ui_tests.sh in /circleci"
docker run code-dot-org-testing-docker-image /bin/bash -c "find /circleci -type f -name 'ui_tests.sh' 2>/dev/null"
echo "Displaying Environment Variables"
docker run code-dot-org-testing-docker-image /bin/bash -c "printenv"
- name: Update Cache
uses: actions/cache@v2
Expand Down
74 changes: 13 additions & 61 deletions apps/src/lib/levelbuilder/CourseVersionPublishingEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import HelpTip from '@cdo/apps/lib/ui/HelpTip';
import color from '@cdo/apps/util/color';
import {PublishedState} from '@cdo/apps/generated/curriculum/sharedCourseConstants';
import Button from '../../templates/Button';
import Link from '@cdo/apps/componentLibrary/link/Link';

export default class CourseVersionPublishingEditor extends Component {
static propTypes = {
Expand Down Expand Up @@ -218,68 +219,19 @@ export default class CourseVersionPublishingEditor extends Component {
))}
</select>
<HelpTip>
<table>
<thead>
<tr>
<th>Publish State</th>
<th>Overview</th>
</tr>
</thead>
<tbody>
<tr>
<td style={styles.tableBorder}>In-Development</td>
<td style={styles.tableBorder}>
Only levelbuilder can see this course. Used for creating new
content you don't want anyone to access.
</td>
</tr>
<tr>
<td style={styles.tableBorder}>Pilot</td>
<td style={styles.tableBorder}>
A limited set of teachers who are in a pilot experiment can
see and assign the course.
</td>
</tr>
<tr>
<td style={styles.tableBorder}>Beta</td>
<td style={styles.tableBorder}>
Anyone who has the link can view the course and make
progress on it. It is not assignable by teachers yet.
</td>
</tr>
<tr>
<td style={styles.tableBorder}>Preview</td>
<td style={styles.tableBorder}>
The course is now a choice in the dropdown that is
assignable.
</td>
</tr>
<tr>
<td style={styles.tableBorder}>Stable</td>
<td style={styles.tableBorder}>
A course that is not changing. If it is the most recent
course in your language it will be the recommended course.
</td>
</tr>
<tr>
<td style={styles.tableBorder}>Sunsetting</td>
<td style={styles.tableBorder}>
A course that is in the process of being deprecated.
</td>
</tr>
<tr>
<td style={styles.tableBorder}>Deprecated</td>
<td style={styles.tableBorder}>
A course that has been deprecated. <br />
<br />
For Deeper Learning Courses, deprecation prevents Peer
Reviews conducted as part of this unit from being displayed
in the admin-only Peer Review Dashboard.
</td>
</tr>
</tbody>
</table>
Making a change to this setting updates who can see and assign this
curriculum. It also impacts what kinds of edits can be made, some of
which can not be reversed without engineering assistance.
<br />
<br />
Click "More info" for more information.
</HelpTip>
<Link
href="https://github.com/code-dot-org/code-dot-org/wiki/Updating-Publish-State-of-Scripts-or-Courses"
openInNewTab={true}
>
More info
</Link>
</label>
{this.props.publishedState === PublishedState.pilot && (
<label>
Expand Down
14 changes: 11 additions & 3 deletions apps/src/pythonlab/PythonEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ import {darkMode} from '@cdo/apps/lab2/views/components/editor/editorThemes';
import {python} from '@codemirror/lang-python';
import moduleStyles from './python-editor.module.scss';
import {useDispatch, useSelector} from 'react-redux';
import {PythonlabState, resetOutput, setCode} from './pythonlabRedux';
import {
PythonlabState,
appendOutput,
resetOutput,
setCode,
} from './pythonlabRedux';
import Button from '@cdo/apps/templates/Button';
import {runPythonCode} from './pyodideRunner';
// import {runPythonCode} from './pyodideRunner';
import {useFetch} from '@cdo/apps/util/useFetch';
import CodeEditor from '@cdo/apps/lab2/views/components/editor/CodeEditor';

Expand All @@ -30,7 +35,10 @@ const PythonEditor: React.FunctionComponent = () => {
const parsedData = data ? (data as PermissionResponse) : {permissions: []};
// For now, restrict running python code to levelbuilders.
if (parsedData.permissions.includes('levelbuilder')) {
runPythonCode(code);
dispatch(appendOutput('Simulating running code.'));
// TODO: re-enable once we fix iPad issues.
// https://codedotorg.atlassian.net/browse/CT-299
// runPythonCode(code);
} else {
alert('You do not have permission to run python code.');
}
Expand Down
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/aquatic.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/92sMXSm4dIg/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=92sMXSm4dIg&wmode=transparent",
"published_date": "2018-11-12 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/basketball.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/ip051U7Rvds/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=ip051U7Rvds&wmode=transparent",
"published_date": null,
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/counting-csc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": null,
"published_date": null,
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/flappy.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/VQ4lo6Huylc/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=VQ4lo6Huylc&wmode=transparent",
"published_date": "2014-02-26 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/gumball.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/0QQVL8oKEaA/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=0QQVL8oKEaA&wmode=transparent",
"published_date": "2015-11-30 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/hello-world-animals.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/blePeROA7fA/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=blePeROA7fA&wmode=transparent",
"published_date": "2021-12-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/hello-world-emoji.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/blePeROA7fA/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=blePeROA7fA&wmode=transparent",
"published_date": "2021-12-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/hello-world-food.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/blePeROA7fA/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=blePeROA7fA&wmode=transparent",
"published_date": "2021-12-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/hello-world-retro.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/blePeROA7fA/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=blePeROA7fA&wmode=transparent",
"published_date": "2021-12-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/hello-world-soccer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/blePeROA7fA/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=blePeROA7fA&wmode=transparent",
"published_date": "2022-12-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/hello-world-space.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/blePeROA7fA/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=blePeROA7fA&wmode=transparent",
"published_date": "2022-12-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/hero.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/vD0cVvXEKdo/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=vD0cVvXEKdo&wmode=transparent",
"published_date": "2017-11-27 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/hourofcode.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/bQilo5ecSX4/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=bQilo5ecSX4&wmode=transparent",
"published_date": "2013-12-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/iceage.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/ap_5Ft3KocU/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=ap_5Ft3KocU&wmode=transparent",
"published_date": "2015-12-03 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/infinity.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/vQGOfhsb76o/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=vQGOfhsb76o&wmode=transparent",
"published_date": "2015-08-02 04:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/jigsaw.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": null,
"published_date": "2015-01-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/mc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/Fzwa6Pm03Zk/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=Fzwa6Pm03Zk&wmode=transparent",
"published_date": "2016-11-17 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/minecraft.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/55jADN4Y7Pg/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=55jADN4Y7Pg&wmode=transparent",
"published_date": "2015-11-16 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/outbreak.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/ZHA2_dOktVY/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=ZHA2_dOktVY&wmode=transparent",
"published_date": "2021-12-01 05:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/playlab.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/nVsZyQIZyPc/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=nVsZyQIZyPc&wmode=transparent",
"published_date": "2021-05-27 04:00:00 UTC",
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/spelling-bee.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": null,
"published_date": null,
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}
4 changes: 2 additions & 2 deletions dashboard/config/course_offerings/sports.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"professional_learning_program": null,
"video": "https://www.youtube-nocookie.com/embed/ip051U7Rvds/?autoplay=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=1&v=ip051U7Rvds&wmode=transparent",
"published_date": null,
"self_paced_pl_course_offering_id": null,
"self_paced_pl_course_offering_key": null
"self_paced_pl_course_offering_id": 497,
"self_paced_pl_course_offering_key": "self-paced-pl-k5"
}

0 comments on commit 93024f0

Please sign in to comment.