Skip to content

Commit

Permalink
feat: use new ERB settings model
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Apr 2, 2024
1 parent e17ae39 commit 3c4ddb2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
runs-on: ubuntu-latest
if: "!startsWith(github.head_ref, 'dependabot/')"
steps:
- name: Checkout
run:
echo ${{github.head_ref}}
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Log in to Docker Hub
continue-on-error: true
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Update ASPECTS_VERSION
if: github.event.action == 'opened' || github.event.action == 'synchronize'
run: |
ASPECTS_VERSION=pr-${{ github.event.pull_request.number }}
ASPECTS_VERSION=pr-${{ github.event.pull_request.number }}-${{ steps.vars.outputs.sha_short }}
sed -i "s/ASPECTS_VERSION: .*/ASPECTS_VERSION: $ASPECTS_VERSION/" .ci/config.yml
- name: setup python
uses: actions/setup-python@v5
Expand Down
15 changes: 10 additions & 5 deletions tutoraspects/patches/k8s-deployments
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,18 @@ spec:
name: settings-cms
- mountPath: /openedx/config
name: config
- mountPath: /openedx/edx-platform/uwsgi.ini
name: uwsgi-config
subPath: uwsgi.ini
securityContext:
allowPrivilegeEscalation: false
command: |
./manage.py lms consume_events -t analytics -g event_routing_backends --extra '{"consumer_name": "aspects"}'
command:
- "./manage.py"
- "lms"
- "consume_events"
- "-t"
- "analytics"
- "-g"
- "event_routing_backends"
- "--extra"
- "'{\"consumer_name\": \"aspects\"}'"
volumes:
- name: settings-lms
configMap:
Expand Down
7 changes: 3 additions & 4 deletions tutoraspects/patches/openedx-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ OPEN_EDX_FILTERS_CONFIG["org.openedx.learning.instructor.dashboard.render.starte

{% if ASPECTS_ENABLE_EVENT_BUS_PRODUCER %}
# Update the backends to use the event bus
EVENT_TRACKING_BACKENDS["xapi"]["ENGINE"] = "eventtracking.backends.event_bus.EventBusRoutingBackend"
EVENT_TRACKING_BACKENDS["caliper"]["ENGINE"] = "eventtracking.backends.event_bus.EventBusRoutingBackend"
EVENT_TRACKING_BACKENDS["event_transformer"]["ENGINE"] = "eventtracking.backends.event_bus.EventBusRoutingBackend"
# Update backend to send events in sync mode
EVENT_TRACKING_BACKENDS["xapi"]["OPTIONS"]["backends"]["xapi"]["ENGINE"] = "event_routing_backends.backends.sync_events_router.SyncEventsRouter"
EVENT_TRACKING_BACKENDS["caliper"]["OPTIONS"]["backends"]["caliper"]["ENGINE"] = "event_routing_backends.backends.sync_events_router.SyncEventsRouter"
EVENT_TRACKING_BACKENDS["event_transformer"]["OPTIONS"]["backends"]["xapi"]["ENGINE"] = "event_routing_backends.backends.sync_events_router.SyncEventsRouter"
EVENT_TRACKING_BACKENDS["event_transformer"]["OPTIONS"]["backends"]["caliper"]["ENGINE"] = "event_routing_backends.backends.sync_events_router.SyncEventsRouter"
# Enable the event bus producer
SEND_TRACKING_EVENT_EMITTED_SIGNAL = True
# Update the event bus producer config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "platform-plugin-aspects==v0.5.0"
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "edx-event-routing-backends==v8.3.1"
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "event-tracking>=2.3.1"
pip install "git+https://github.com/openedx/event-routing-backends@cag/erb-settings"

0 comments on commit 3c4ddb2

Please sign in to comment.