Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
a451b7f
Track latest topic for each schedule
Deimos Jul 5, 2020
c4af5c7
Prevent top-level comments in old scheduled topics
Deimos Jul 5, 2020
080aadb
Add backfill for topic_schedule.latest_topic_id
Deimos Jul 6, 2020
5b1adda
Hide old-scheduled-topic message if not logged in
Deimos Jul 6, 2020
f8aa1f0
Fix link to boards view
ryjones Jul 9, 2020
c330811
Vagrantfile: relax Salt pinned version to 2019.2
talklittle Jul 10, 2020
e85dfa2
Salt: ensure that the site-icons.css file exists
Deimos Jul 12, 2020
ac8e438
Show (OP) in Topic Log changes
talklittle Jul 12, 2020
cf3e777
Add bottom padding to topic full text
talklittle Jul 12, 2020
a9d312d
Remove welcome message sent on registration
Deimos Jul 14, 2020
bac168b
Clear previous error message on markdown preview
talklittle Jul 14, 2020
eaa7a0a
Include "inner" subpath tags when tag filtering
talklittle Jul 15, 2020
6092a37
Add yacybot to list of bot user agents
Deimos Jul 17, 2020
9531221
Salt: don't attempt to set mode on site-icons.css
Deimos Jul 20, 2020
33f551f
Remove period chars from search query for multilevel tags
talklittle Jul 15, 2020
ca38cd6
Push dropdown up if it's off bottom of screen/site
talklittle Jul 15, 2020
e84c905
Use "outer" sizes for checking dropdown overflow
Deimos Jul 21, 2020
6fa7718
Apply topic tag filters when viewing a single tag
talklittle Jul 11, 2020
a93c466
Add specific error for invalid char in tag/group
Deimos Jul 24, 2020
a1e3052
Add tildee.py to bot user agents
Deimos Jul 24, 2020
3ada432
Stop fixing old Solarized theme cookies
Deimos Jul 24, 2020
9a82f2c
Fix error with filtered topic tag including space
Deimos Jul 24, 2020
6f1377f
Fix error from trying to log into no-password user
Deimos Jul 25, 2020
c31c47d
Restrict link topic repost check to last 6 months
Deimos Jul 25, 2020
2565615
Vagrantfile: un-pin Salt version
Deimos Jul 27, 2020
5c70d8c
Update pypi package versions (requirements.txt)
Deimos Jul 29, 2020
44a8699
Upgrade prospector to 1.3.0
Deimos Jul 29, 2020
f41bd1e
Upgrade webargs to 6.1.0
Deimos Jul 31, 2020
cb7be83
Build HTML Tidy, validate homepage HTML in tests
talklittle Jul 29, 2020
6f272fc
Revert "Build HTML Tidy, validate homepage HTML in tests"
Deimos Aug 2, 2020
3026d06
Set function scope for logged-out webtest fixture
Deimos Aug 2, 2020
9ff86be
Fix HTML- and URL-encoding bugs on homepage
talklittle Jul 29, 2020
87dce83
Install html5validator, validate HTML in tests
talklittle Aug 1, 2020
036d46d
Add marks to slower tests and don't run by default
Deimos Aug 3, 2020
a462834
Rename "post_topic" permission to "topic.post"
Deimos Aug 5, 2020
2e5a2d9
Switch user permissions to use an enum
Deimos Aug 5, 2020
d61b848
Fix bug with trying to unnest non-webargs errors
Deimos Aug 10, 2020
a70cc61
Add metric to breached-password check
Deimos Aug 10, 2020
26b1d4d
Use pts_lbsearch to check for breached passwords
Deimos Aug 12, 2020
6241239
Exclude removed comments from "last comment" link
Deimos Sep 3, 2020
6887011
Remove remnants of Redis breached-passwords check
Deimos Sep 7, 2020
2d023cd
Use CSS custom properties for theming
Bauke Aug 8, 2020
d3a84fe
Fix issue if "most recent comment" not found
Deimos Sep 9, 2020
3a18be6
Fix border on hovered comment collapse button
Deimos Sep 9, 2020
f8f7a96
Show Exemplary badge on labeled comments
Deimos Sep 11, 2020
8ec4a86
Remove donation goal from Financials page
Deimos Sep 12, 2020
a131790
Fix border colors on some more elements
Deimos Sep 12, 2020
df64807
Temp: test @supports query for CSS custom props
Deimos Sep 13, 2020
7afbcb8
Revert "Temp: test @supports query for CSS custom props"
Deimos Sep 14, 2020
cbf77c1
Fix transparent sidebar for very old browsers
Deimos Sep 15, 2020
925278e
Add minimal theme support for old browsers
Deimos Sep 15, 2020
0cbe17f
Fix sidebar background color in fallback themes
Deimos Sep 15, 2020
0f4890d
CSS: add "-color" suffix to all custom properties
Deimos Sep 24, 2020
f311e29
Move syntax-highlighting CSS into a module
Deimos Sep 24, 2020
135a010
CSS: Move all theme color rules into normal places
Deimos Sep 28, 2020
082e3b5
CSS: replace some custom props with native values
Deimos Sep 28, 2020
de1a64b
CSS: fix some border color regressions
Deimos Sep 28, 2020
be34036
Fix border color for <fieldset> (new topic page)
Deimos Sep 29, 2020
3d6fcb5
Add the Love themes.
Bauke Sep 29, 2020
746568c
Fix .btn-primary hover colors reverting to Spectre
Deimos Oct 1, 2020
4efff58
Add Amazonbot to list of bot user agents
Deimos Oct 2, 2020
85bbe7f
Install invoke python package
Deimos Oct 5, 2020
6a216ab
Add invoke task to update pip package versions
Deimos Oct 6, 2020
c2bfe2e
Add invoke task to run tests
Deimos Oct 6, 2020
0371765
Add invoke task to check type annotations
Deimos Oct 6, 2020
ff07815
Add invoke task to run code-style checks
Deimos Oct 7, 2020
ffde9f2
Use invoke tasks in git pre-push/pre-commit hooks
Deimos Oct 7, 2020
dd00e2e
Add invoke tab-completion script to dev .bashrc
Deimos Oct 7, 2020
21e016d
Fix "-r" check in invoke update-pip-requirements
Deimos Oct 7, 2020
6231a5e
Update pypi package versions (requirements.txt)
Deimos Oct 7, 2020
ee78cd7
Update Black to version 20.8b1
Deimos Oct 7, 2020
e4a187e
Stop stripping periods from multi-sentence titles
Deimos Oct 7, 2020
f4933be
Nginx: remove /development redirects on Docs site
Deimos Oct 9, 2020
4e6d565
CONTRIBUTING.md: Update links to development pages
Deimos Oct 9, 2020
9e7906c
Add invoke task to start an IPython shell
Deimos Oct 9, 2020
9652dfb
Add --full flag to invoke test
Deimos Oct 10, 2020
f310526
Remove "via" annotations from requirements files
Deimos Oct 10, 2020
70949ff
Add invoke task to renew TLS certificate
Deimos Oct 21, 2020
2d70ef8
Update pypi package versions (requirements.txt)
Deimos Nov 2, 2020
9d5e2bf
Add gemini:// to allowed link protocols
Deimos Nov 2, 2020
79072f7
Rename invoke tasks to standardize format
Deimos Nov 4, 2020
8c913d5
Alphabetize invoke task functions
Deimos Nov 4, 2020
dac8ec3
Add ability to edit topic title from listing pages
Deimos Nov 15, 2020
b6d2034
Add action-settings to topic-with-excerpt grid
Deimos Nov 16, 2020
8144a8b
Use postponed evaluation of type annotations
Deimos Nov 18, 2020
5fbc72c
Add ability to process posts with Lua scripts
Deimos Nov 29, 2020
88944be
Run app-related services under the app user
Deimos Dec 1, 2020
91c408c
Drop ic-current-url param in Intercooler requests
deingithub Dec 6, 2020
06764e9
Add support for globally rate-limiting actions
Deimos Dec 12, 2020
e685639
Apply global rate-limit to Stripe donate endpoint
Deimos Dec 12, 2020
071f1e0
Add some margin above a group's sidebar text
Deimos Dec 16, 2020
d00a59f
Fix link re-directing to development page
cgar Jan 24, 2021
0404d0d
Process tags to left of comma only
talklittle Jul 15, 2020
a021b96
Add RSS and Atom feeds for topic listings
talklittle Feb 4, 2021
5093fca
Update feeds to have absolute permalinks
Deimos Feb 27, 2021
348c930
Fix blank lines at start of Atom/RSS feeds
Deimos Feb 28, 2021
70e570b
Handle zero width joiner unicode chars for emoji
cewkrupa Mar 1, 2021
6f7618d
Adjust zero-width joiner check to fix IndexError
Deimos Mar 15, 2021
0370dcb
Merge branch 'master' of https://gitlab.com/tildes/tildes into merge-…
Zenchreal Mar 19, 2021
40126f5
Fix the Motte theme
Zenchreal Mar 21, 2021
795a8b3
Modify HTML validation tests because our fork redirects the homepage …
Zenchreal Mar 21, 2021
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
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ All code contributions must be made under the same license as the project's main

## Setting up a development version

Please see this page on the Tildes Docs for instructions to set up a development version: https://docs.tildes.net/instructions/development-setup
Please see this page on the Tildes Docs for instructions to set up a development version: https://docs.tildes.net/development/initial-setup

## General development information

This page on the Tildes docs contains information about many aspects of Tildes development: https://docs.tildes.net/instructions/development
This page on the Tildes docs contains information about many aspects of Tildes development: https://docs.tildes.net/development/general-development

## Contributing code

Expand Down Expand Up @@ -48,7 +48,7 @@ Once you've selected an issue to work on, please leave a comment saying so. This

After you've finished making your changes, there are a few things to check before proposing your changes as a merge request.

First, ensure that all the checks (tests, mypy and code-style) pass successfully. Merge requests that fail any of the checks will not be accepted. For more information, see this section of the development docs: https://docs.tildes.net/instructions/development#running-checks-on-your-code
First, ensure that all the checks (tests, mypy and code-style) pass successfully. Merge requests that fail any of the checks will not be accepted. For more information, see this section of the development docs: https://docs.tildes.net/development/general-development#running-checks-on-your-code

Squash your changes into logical commits. For many changes there should only be a single commit, but some can be broken into multiple logical sections. The commit messages should follow [the formatting described in this article](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), with the summary line written in the imperative form. The summary line should make sense if you were to use it in a sentence like "If applied, this commit will \_\_\_\_\_\_\_\_". For example, "Add a new X", "Fix a bug with Y", and so on.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For general information about Tildes and its goals, please see [the announcement

Known issues and plans for upcoming changes are tracked on GitLab: https://gitlab.com/tildes/tildes/issues

The "board" view is useful as an overview: https://gitlab.com/tildes/tildes/boards
The "board" view is useful as an overview: https://gitlab.com/tildes/tildes/-/boards

## Contributing to Tildes development

Expand Down
3 changes: 0 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ Vagrant.configure(VAGRANT_CONFIG_VERSION) do |config|
salt.run_highstate = true
salt.verbose = true
salt.log_level = "info"

salt.install_type = "stable"
salt.version = "3000"
end

config.vm.provider "virtualbox" do |vb|
Expand Down
8 changes: 2 additions & 6 deletions git_hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/sh
#
# Pre-commit hook script that ensures mypy checks and tests pass
# Pre-commit hook script that ensures type-checking, tests, and fast style checks pass

vagrant ssh -c ". activate \
&& echo 'Checking mypy type annotations...' && mypy --no-error-summary . \
&& echo 'Checking if Black would reformat any code...' && black --check . \
&& echo -n 'Running tests: ' && pytest -q \
&& echo 'Checking SCSS style...' && npm run --silent lint:scss \
&& echo 'Checking JS style...' && npm run --silent lint:js"
&& invoke type-check test --quiet code-style-check"
9 changes: 2 additions & 7 deletions git_hooks/pre-push
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/bin/sh
#
# Pre-push hook script that ensures mypy checks, style checks, and tests pass
# Pre-push hook script that ensures all tests and code checks pass

vagrant ssh -c ". activate \
&& echo 'Checking mypy type annotations...' && mypy --no-error-summary . \
&& echo 'Checking if Black would reformat any code...' && black --check . \
&& echo -n 'Running tests: ' && pytest -q \
&& echo 'Checking SCSS style...' && npm run --silent lint:scss \
&& echo 'Checking JS style...' && npm run --silent lint:js \
&& echo 'Checking Python style fully (takes a while)...' && prospector -M"
&& invoke type-check test --quiet --full code-style-check --full"
4 changes: 3 additions & 1 deletion salt/salt/boussole.service.jinja2
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{% from 'common.jinja2' import app_dir -%}
{% from 'common.jinja2' import app_dir, app_username -%}
[Unit]
Description=Boussole - auto-compile SCSS files on change

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}
Environment="LC_ALL=C.UTF-8" "LANG=C.UTF-8"
ExecStart=/opt/venvs/boussole/bin/boussole watch --backend=yaml --config=boussole.yaml --poll
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% from 'common.jinja2' import app_dir, bin_dir -%}
{% from 'common.jinja2' import app_dir, app_username, bin_dir -%}
[Unit]
Description=Comment User Mention Generator (Queue Consumer)
Requires=redis.service
After=redis.service
PartOf=redis.service

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}/consumers
Environment="INI_FILE={{ app_dir }}/{{ pillar['ini_file'] }}"
ExecStart={{ bin_dir }}/python comment_user_mentions_generator.py
Expand Down
12 changes: 12 additions & 0 deletions salt/salt/consumers/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
- group: root
- mode: 644

/etc/systemd/system/consumer-post_processing_script_runner.service:
file.managed:
- source: salt://consumers/post_processing_script_runner.service.jinja2
- template: jinja
- user: root
- group: root
- mode: 644

consumer-topic_interesting_activity_updater.service:
service.running:
- enable: True
Expand All @@ -34,6 +42,10 @@ consumer-comment_user_mentions_generator.service:
service.running:
- enable: True

consumer-post_processing_script_runner.service:
service.running:
- enable: True

{% if grains['id'] == 'prod' %}
/etc/systemd/system/consumer-topic_embedly_extractor.service:
file.managed:
Expand Down
18 changes: 18 additions & 0 deletions salt/salt/consumers/post_processing_script_runner.service.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% from 'common.jinja2' import app_dir, app_username, bin_dir -%}
[Unit]
Description=Post Processing Script Runner (Queue Consumer)
Requires=redis.service
After=redis.service
PartOf=redis.service

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}/consumers
Environment="INI_FILE={{ app_dir }}/{{ pillar['ini_file'] }}"
ExecStart={{ bin_dir }}/python post_processing_script_runner.py
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
4 changes: 3 additions & 1 deletion salt/salt/consumers/topic_embedly_extractor.service.jinja2
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% from 'common.jinja2' import app_dir, bin_dir -%}
{% from 'common.jinja2' import app_dir, app_username, bin_dir -%}
[Unit]
Description=Topic Embedly Extractor (Queue Consumer)
Requires=redis.service
After=redis.service
PartOf=redis.service

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}/consumers
Environment="INI_FILE={{ app_dir }}/{{ pillar['ini_file'] }}"
ExecStart={{ bin_dir }}/python topic_embedly_extractor.py
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% from 'common.jinja2' import app_dir, bin_dir -%}
{% from 'common.jinja2' import app_dir, app_username, bin_dir -%}
[Unit]
Description=Topic Interesting Activity Updater (Queue Consumer)
Requires=redis.service
After=redis.service
PartOf=redis.service

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}/consumers
Environment="INI_FILE={{ app_dir }}/{{ pillar['ini_file'] }}"
ExecStart={{ bin_dir }}/python topic_interesting_activity_updater.py
Expand Down
4 changes: 3 additions & 1 deletion salt/salt/consumers/topic_metadata_generator.service.jinja2
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% from 'common.jinja2' import app_dir, bin_dir -%}
{% from 'common.jinja2' import app_dir, app_username, bin_dir -%}
[Unit]
Description=Topic Metadata Generator (Queue Consumer)
Requires=redis.service
After=redis.service
PartOf=redis.service

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}/consumers
Environment="INI_FILE={{ app_dir }}/{{ pillar['ini_file'] }}"
ExecStart={{ bin_dir }}/python topic_metadata_generator.py
Expand Down
4 changes: 3 additions & 1 deletion salt/salt/consumers/topic_youtube_scraper.service.jinja2
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% from 'common.jinja2' import app_dir, bin_dir -%}
{% from 'common.jinja2' import app_dir, app_username, bin_dir -%}
[Unit]
Description=Topic Youtube Scraper (Queue Consumer)
Requires=redis.service
After=redis.service
PartOf=redis.service

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}/consumers
Environment="INI_FILE={{ app_dir }}/{{ pillar['ini_file'] }}"
ExecStart={{ bin_dir }}/python topic_youtube_scraper.py
Expand Down
6 changes: 6 additions & 0 deletions salt/salt/development.sls
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ automatic-activate:
file.append:
- name: '/home/{{ app_username }}/.bashrc'
- text: 'source activate'

# adds invoke's tab-completion script so that invoke tasks can be completed
invoke-tab-completion:
file.append:
- name: '/home/{{ app_username }}/.bashrc'
- text: 'source <(invoke --print-completion-script bash)'
3 changes: 3 additions & 0 deletions salt/salt/java.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
java-openjdk:
pkg.installed:
- name: openjdk-8-jre
8 changes: 0 additions & 8 deletions salt/salt/nginx/tildes-static-sites.conf.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ server {
return 302 https://docs.tildes.net/policies/code-of-conduct;
}

location /development {
return 302 https://docs.tildes.net/instructions/development;
}

location /development-setup {
return 302 https://docs.tildes.net/instructions/development-setup;
}

location /mechanics {
return 302 https://docs.tildes.net/instructions;
}
Expand Down
4 changes: 3 additions & 1 deletion salt/salt/postgresql_redis_bridge.service.jinja2
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% from 'common.jinja2' import app_dir, bin_dir -%}
{% from 'common.jinja2' import app_dir, app_username, bin_dir -%}
[Unit]
Description=postgresql_redis_bridge - convert NOTIFY to Redis streams
Requires=redis.service
After=redis.service
PartOf=redis.service

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}/scripts
Environment="INI_FILE={{ app_dir }}/{{ pillar['ini_file'] }}"
ExecStart={{ bin_dir }}/python postgresql_redis_bridge.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RemainAfterExit=no
WorkingDirectory=/opt/prometheus_redis_exporter
User=prometheus
Group=prometheus
Environment="REDIS_ADDR=unix:///run/redis/socket,unix:///run/redis_breached_passwords/socket"
Environment="REDIS_ADDR=unix:///run/redis/socket"
ExecStart=/opt/prometheus_redis_exporter/redis_exporter

[Install]
Expand Down
12 changes: 12 additions & 0 deletions salt/salt/pts-lbsearch.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
compile-pts-lbsearch:
file.managed:
- name: /tmp/pts_lbsearch.c
- source:
- https://raw.githubusercontent.com/pts/pts-line-bisect/2ecd9f59246cfa28cb1aeac7cd8d98a8eea2914f/pts_lbsearch.c
- source_hash: sha256=ef79efc2f1ecde504b6074f9c89bdc71259a833fa2a2dda4538ed5ea3e04aea1
- creates: /usr/local/bin/pts_lbsearch
cmd.run:
- cwd: /tmp/
# compilation command taken from the top of the source file
- name: gcc -ansi -W -Wall -Wextra -Werror=missing-declarations -s -O2 -DNDEBUG -o /usr/local/bin/pts_lbsearch pts_lbsearch.c
- creates: /usr/local/bin/pts_lbsearch
29 changes: 0 additions & 29 deletions salt/salt/redis/breached-passwords.sls

This file was deleted.

18 changes: 0 additions & 18 deletions salt/salt/redis/modules/rebloom.sls

This file was deleted.

24 changes: 0 additions & 24 deletions salt/salt/redis/redis_breached_passwords.conf

This file was deleted.

14 changes: 0 additions & 14 deletions salt/salt/redis/redis_breached_passwords.service

This file was deleted.

4 changes: 2 additions & 2 deletions salt/salt/top.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ base:
- postgresql.pgbouncer
- python
- redis
- redis.breached-passwords
- redis.modules.rebloom
- redis.modules.redis-cell
- postgresql-redis-bridge
- scripts
Expand All @@ -22,6 +20,7 @@ base:
- tildes-wiki
- boussole
- webassets
- pts-lbsearch
- cronjobs
- final-setup # keep this state file last
'dev':
Expand All @@ -30,6 +29,7 @@ base:
- development
- prometheus
- nodejs
- java
'prod':
- nginx.shortener-config
- nginx.static-sites-config
Expand Down
4 changes: 3 additions & 1 deletion salt/salt/webassets.service.jinja2
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{% from 'common.jinja2' import app_dir, bin_dir -%}
{% from 'common.jinja2' import app_dir, app_username, bin_dir -%}
[Unit]
Description=Webassets - auto-compile JS files on change

[Service]
User={{ app_username }}
Group={{ app_username }}
WorkingDirectory={{ app_dir }}
ExecStart={{ bin_dir }}/webassets -c webassets.yaml watch
Restart=always
Expand Down
Loading