Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions .ebextensions/01_setup.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
packages:
dnf:
ImageMagick: []
postgresql17-devel: []
ImageMagick: []
commands:
01_remove_pg15_install_pg17:
command: "dnf remove -y postgresql15 postgresql15-private-libs; dnf install -y postgresql17 libpq-devel --allowerasing"
ignoreErrors: false
113 changes: 113 additions & 0 deletions .ebextensions/04_cloudwatch_agent.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
files:
"/tmp/amazon-cloudwatch-agent.json":
mode: "000644"
owner: root
group: root
content: |
{
"agent": {
"metrics_collection_interval": 60,
"run_as_user": "root"
},
"metrics": {
"namespace": "CWAgent",
"append_dimensions": {
"AutoScalingGroupName": "${aws:AutoScalingGroupName}",
"ImageId": "${aws:ImageId}",
"InstanceId": "${aws:InstanceId}",
"InstanceType": "${aws:InstanceType}"
},
"aggregation_dimensions": [
["InstanceId"],
[]
],
"metrics_collected": {
"cpu": {
"measurement": [
"cpu_usage_idle",
"cpu_usage_system",
"cpu_usage_user",
"cpu_usage_iowait"
],
"totalcpu": true,
"resources": [
"*"
],
"metrics_collection_interval": 60
},
"mem": {
"measurement": [
"mem_used_percent",
"mem_available"
],
"metrics_collection_interval": 120
},
"disk": {
"measurement": [
"disk_used_percent",
"disk_used",
"disk_free",
"disk_total",
"inodes_free",
"inodes_used"
],
"resources": [
"/",
"/data"
],
"drop_device": true,
"metrics_collection_interval": 120
},
"diskio": {
"measurement": [
"write_bytes",
"read_bytes",
"writes",
"reads"
],
"resources": [
"nvme[0-9]n1",
"xvd*",
"sd*"
],
"metrics_collection_interval": 180
},
"net": {
"measurement": [
"bytes_sent",
"bytes_recv",
"packets_sent",
"packets_recv",
"err_in",
"err_out"
],
"resources": [
"eth0",
"ens*"
],
"metrics_collection_interval": 180
},
"netstat": {
"measurement": [
"tcp_established",
"tcp_syn_sent",
"tcp_time_wait"
],
"metrics_collection_interval": 300
},
"processes": {
"measurement": [
"running",
"blocked",
"sleeping",
"zombies"
],
"metrics_collection_interval": 300
}
}
}
}

container_commands:
01_apply_cwa_config:
command: "/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/tmp/amazon-cloudwatch-agent.json -s"
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ CANVAS_URL='https://ucberkeleysandbox.instructure.com'
# We use a single username/password for Gradescope
# This should be a "service account" that can be used to set course settings
# This email must be invited to each Gradescope course as a TA or Instructor
GRADESCOPE_EMAIL='gradescope-bot@berkeley.edu'
GRADESCOPE_PASSWORD=
GRADESCOPE_EMAIL='michael@gradescope.com'
GRADESCOPE_PASSWORD=KoH-z92-oVJ-yqr
# This is required to be set.
DEFAULT_FROM_EMAIL='flextensions@berkeley.edu'
# Generally recommended / best practices
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
interval: weekly
open-pull-requests-limit: 5
66 changes: 66 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Docs Build

on:
push:
paths:
- 'docs/**'
pull_request:
paths:
- 'docs/**'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: docs

- name: Build Jekyll site
run: bundle exec jekyll build --baseurl /flextensions
env:
JEKYLL_ENV: production
PAGES_REPO_NWO: berkeley-cds/flextensions

- name: Check for broken internal links
run: |
# Verify all internal .html files were generated
echo "Generated site files:"
find _site -name '*.html' | sort
echo ""
echo "Checking for broken internal links..."
# Extract internal href links and verify they resolve
broken=0
for file in $(find _site -name '*.html'); do
# Extract href values pointing to /flextensions/ paths
grep -oP 'href="(/flextensions/[^"]*)"' "$file" 2>/dev/null | while read -r match; do
path=$(echo "$match" | grep -oP '"/flextensions/[^"]*"' | tr -d '"')
# Convert URL path to file path
local_path="_site${path#/flextensions}"
# Check if it's a directory (index.html) or file
if [ -d "$local_path" ] && [ -f "$local_path/index.html" ]; then
continue
elif [ -f "$local_path" ]; then
continue
elif [ -f "${local_path}.html" ]; then
continue
elif [ -f "${local_path%/}/index.html" ]; then
continue
else
echo "::warning file=$file::Broken link: $path (resolved to $local_path)"
broken=1
fi
done
done
if [ "$broken" -eq 1 ]; then
echo "::warning::Some internal links may be broken. Check warnings above."
fi
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ capybara-*.html
*.orig
rerun.txt
pickle-email-*.html
# All Heroku dumps.
*.dump
# GenAI stuff
.claude

# Ignore all logfiles and tempfiles.
/log/*
Expand Down Expand Up @@ -77,3 +81,9 @@ yarn-debug.log*
/config/credentials/production.key

.DS_Store

# Jekyll docs
docs/_site/
docs/.jekyll-cache/
docs/.jekyll-metadata
docs/Gemfile.lock
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ RSpec:
RSpec/ExampleLength:
Max: 40

# Default 3
# I'm not sure this is good?
RSpec/NestedGroups:
Max: 5

RSpec/MultipleMemoizedHelpers:
Max: 20

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ gem 'importmap-rails'
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem 'turbo-rails'

gem 'bootstrap', '~> 5.3.3'
gem 'bootstrap', '~> 5.3.8'
# dependency for bootstrap # 03-10-2025 this is deprecated but still works
gem 'sassc-rails', '~> 2.1'
# alternative to sassc-rails, this is recommended but bootstrap 5.3.3 is still using "deprecated" @import statements which this gem doesn't like
Expand Down
Loading