Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f5507da
feat: Render markdown agendas with bs5 styles
larseggert Oct 23, 2023
fd03ab1
Small fixes
larseggert Oct 24, 2023
e7639e9
Merge branch 'main' into feat-md-bs
larseggert Oct 24, 2023
5f8bf4b
Merge branch 'main' into feat-md-bs
larseggert Oct 25, 2023
1130f1f
Merge branch 'main' into feat-md-bs
rjsparks Oct 26, 2023
e65277e
Merge branch 'main' into feat-md-bs
larseggert Oct 28, 2023
d246879
Fix code review comments
larseggert Oct 28, 2023
aed328b
Merge pull request #6527 from larseggert/feat-md-bs
rjsparks Oct 30, 2023
d5e4ea8
ci: Update build-base-app.yml workflow
NGPixel Nov 1, 2023
53d0014
feat: add "add comment" feature to the review requests. (#6603)
kivinen Nov 5, 2023
fcf1a9a
chore(deps): bump actions/setup-node from 3 to 4 (#6565)
dependabot[bot] Nov 5, 2023
2f5bbeb
Add link to review request page to review result page. (#6596)
kivinen Nov 5, 2023
275b3b2
fix: Make authors take at least two lines in HTMLized (#6606)
larseggert Nov 5, 2023
1df7319
fix: Remove time from materials cell (#6584)
larseggert Nov 5, 2023
a3b4162
fix: Don't redirect user to the login page when logging in (#6570)
pselkirk Nov 5, 2023
b5ee9ec
fix: Don't allow group chair to change group parent (#6496)
pselkirk Nov 5, 2023
f8a06f6
fix: Add history entry when approving the slides. (#6588)
kivinen Nov 6, 2023
f1425e4
fix: move meeting management from base Docs to Meeting (#6586)
Spectre17 Nov 6, 2023
2bec81d
fix: Don't include csrf_token in GET-only form (#6549)
pselkirk Nov 7, 2023
2974e81
fix: build proceedings attendee list from MeetingRegistration table. …
rpcross Nov 7, 2023
3ae3f3a
ci: Update base.Dockerfile
NGPixel Nov 8, 2023
a49dadd
ci: Update base.Dockerfile
NGPixel Nov 8, 2023
fab078d
ci: Update base.Dockerfile
NGPixel Nov 8, 2023
5edd06f
chore: fix app.Dockerfile
NGPixel Nov 8, 2023
822068c
chore(deps): update all npm dependencies for dev/coverage-action (#6610)
depfu[bot] Nov 9, 2023
1b4cb6b
chore(deps): update all npm dependencies for playwright (#6609)
depfu[bot] Nov 9, 2023
5d2ac56
feat: Now that charters are Markdown, render them as such on charter …
larseggert Nov 10, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/build-base-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- 'main'
paths:
- 'docker/base.Dockerfile'
- 'requirements.txt'

workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'

Expand Down
975 changes: 619 additions & 356 deletions dev/coverage-action/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dev/coverage-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"luxon": "3.4.3"
},
"devDependencies": {
"eslint": "8.51.0",
"eslint": "8.52.0",
"eslint-config-standard": "17.1.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"npm-check-updates": "16.14.6"
Expand Down
2 changes: 1 addition & 1 deletion docker/app.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY docker/scripts/app-setup-debian.sh /tmp/library-scripts/docker-setup-debian
RUN sed -i 's/\r$//' /tmp/library-scripts/docker-setup-debian.sh && chmod +x /tmp/library-scripts/docker-setup-debian.sh

# Add Postgresql Apt Repository to get 14
RUN echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN echo "deb http://apt.postgresql.org/pub/repos/apt $(. /etc/os-release && echo "$VERSION_CODENAME")-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
Expand Down
29 changes: 23 additions & 6 deletions docker/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,30 @@ FROM python:3.9-bullseye
LABEL maintainer="IETF Tools Team <tools-discuss@ietf.org>"

ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_MAJOR=16

# Update system packages
RUN apt-get update \
&& apt-get -qy upgrade \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1

# Add Node.js Source
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y --no-install-recommends ca-certificates curl gnupg \
&& mkdir -p /etc/apt/keyrings\
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

# Add Docker Source
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null

# Add PostgreSQL Source
RUN echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN echo "deb http://apt.postgresql.org/pub/repos/apt $(. /etc/os-release && echo "$VERSION_CODENAME")-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

# Install the packages we need
RUN apt-get update --fix-missing && apt-get install -qy \
RUN apt-get update --fix-missing && apt-get install -qy --no-install-recommends \
apache2-utils \
apt-file \
bash \
Expand All @@ -30,6 +34,7 @@ RUN apt-get update --fix-missing && apt-get install -qy \
default-jdk \
docker-ce-cli \
enscript \
firefox-esr \
gawk \
g++ \
gcc \
Expand Down Expand Up @@ -58,7 +63,7 @@ RUN apt-get update --fix-missing && apt-get install -qy \
nano \
netcat \
nodejs \
pgloader \
pgloader \
pigz \
postgresql-client-14 \
pv \
Expand Down Expand Up @@ -87,11 +92,23 @@ RUN /tmp/app-install-chromedriver.sh
# Fix /dev/shm permissions for chromedriver
RUN chmod 1777 /dev/shm

# GeckoDriver
ARG GECKODRIVER_VERSION=latest
RUN GK_VERSION=$(if [ ${GECKODRIVER_VERSION:-latest} = "latest" ]; then echo "0.33.0"; else echo $GECKODRIVER_VERSION; fi) \
&& echo "Using GeckoDriver version: "$GK_VERSION \
&& wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GK_VERSION/geckodriver-v$GK_VERSION-linux64.tar.gz \
&& rm -rf /opt/geckodriver \
&& tar -C /opt -zxf /tmp/geckodriver.tar.gz \
&& rm /tmp/geckodriver.tar.gz \
&& mv /opt/geckodriver /opt/geckodriver-$GK_VERSION \
&& chmod 755 /opt/geckodriver-$GK_VERSION \
&& ln -fs /opt/geckodriver-$GK_VERSION /usr/bin/geckodriver

# Activate Yarn
RUN corepack enable

# Get rid of installation files we don't need in the image, to reduce size
RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /var/cache/apt/*

# "fake" dbus address to prevent errors
# https://github.com/SeleniumHQ/docker-selenium/issues/87
Expand Down
91 changes: 91 additions & 0 deletions ietf/doc/migrations/0008_alter_docevent_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Generated by Django 4.2.7 on 2023-11-04 13:02

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("doc", "0007_alter_docevent_type"),
]

operations = [
migrations.AlterField(
model_name="docevent",
name="type",
field=models.CharField(
choices=[
("new_revision", "Added new revision"),
("new_submission", "Uploaded new revision"),
("changed_document", "Changed document metadata"),
("added_comment", "Added comment"),
("added_message", "Added message"),
("edited_authors", "Edited the documents author list"),
("deleted", "Deleted document"),
("changed_state", "Changed state"),
("changed_stream", "Changed document stream"),
("expired_document", "Expired document"),
("extended_expiry", "Extended expiry of document"),
("requested_resurrect", "Requested resurrect"),
("completed_resurrect", "Completed resurrect"),
("changed_consensus", "Changed consensus"),
("published_rfc", "Published RFC"),
(
"added_suggested_replaces",
"Added suggested replacement relationships",
),
(
"reviewed_suggested_replaces",
"Reviewed suggested replacement relationships",
),
("changed_action_holders", "Changed action holders for document"),
("changed_group", "Changed group"),
("changed_protocol_writeup", "Changed protocol writeup"),
("changed_charter_milestone", "Changed charter milestone"),
("initial_review", "Set initial review time"),
("changed_review_announcement", "Changed WG Review text"),
("changed_action_announcement", "Changed WG Action text"),
("started_iesg_process", "Started IESG process on document"),
("created_ballot", "Created ballot"),
("closed_ballot", "Closed ballot"),
("sent_ballot_announcement", "Sent ballot announcement"),
("changed_ballot_position", "Changed ballot position"),
("changed_ballot_approval_text", "Changed ballot approval text"),
("changed_ballot_writeup_text", "Changed ballot writeup text"),
("changed_rfc_editor_note_text", "Changed RFC Editor Note text"),
("changed_last_call_text", "Changed last call text"),
("requested_last_call", "Requested last call"),
("sent_last_call", "Sent last call"),
("scheduled_for_telechat", "Scheduled for telechat"),
("iesg_approved", "IESG approved document (no problem)"),
("iesg_disapproved", "IESG disapproved document (do not publish)"),
("approved_in_minute", "Approved in minute"),
("iana_review", "IANA review comment"),
("rfc_in_iana_registry", "RFC is in IANA registry"),
(
"rfc_editor_received_announcement",
"Announcement was received by RFC Editor",
),
("requested_publication", "Publication at RFC Editor requested"),
(
"sync_from_rfc_editor",
"Received updated information from RFC Editor",
),
("requested_review", "Requested review"),
("assigned_review_request", "Assigned review request"),
("closed_review_request", "Closed review request"),
("closed_review_assignment", "Closed review assignment"),
("downref_approved", "Downref approved"),
("posted_related_ipr", "Posted related IPR"),
("removed_related_ipr", "Removed related IPR"),
(
"removed_objfalse_related_ipr",
"Removed Objectively False related IPR",
),
("changed_editors", "Changed BOF Request editors"),
("published_statement", "Published statement"),
("approved_slides", "Slides approved"),
],
max_length=50,
),
),
]
3 changes: 3 additions & 0 deletions ietf/doc/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,9 @@ class DocReminder(models.Model):

# Statement events
("published_statement", "Published statement"),

# Slide events
("approved_slides", "Slides approved"),

]

Expand Down
12 changes: 6 additions & 6 deletions ietf/doc/templatetags/ietf_filters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2007-2020, All Rights Reserved
# Copyright The IETF Trust 2007-2023, All Rights Reserved
# -*- coding: utf-8 -*-


Expand Down Expand Up @@ -409,18 +409,18 @@ def startswith(x, y):
return str(x).startswith(y)


@register.filter(name='removesuffix', is_safe=False)
def removesuffix(value, suffix):
"""Remove an exact-match suffix
@register.filter(name='removeprefix', is_safe=False)
def removeprefix(value, prefix):
"""Remove an exact-match prefix

The is_safe flag is False because indiscriminate use of this could result in non-safe output.
See https://docs.djangoproject.com/en/2.2/howto/custom-template-tags/#filters-and-auto-escaping
which describes the possibility that removing characters from an escaped string may introduce
HTML-unsafe output.
"""
base = str(value)
if base.endswith(suffix):
return base[:-len(suffix)]
if base.startswith(prefix):
return base[len(prefix):]
else:
return base

Expand Down
1 change: 1 addition & 0 deletions ietf/doc/urls_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
url(r'^(?P<request_id>[0-9]+)/$', views_review.review_request),
url(r'^(?P<request_id>[0-9]+)/login/$', views_review.review_request_forced_login),
url(r'^(?P<request_id>[0-9]+)/close/$', views_review.close_request),
url(r'^(?P<request_id>[0-9]+)/addrequestcomment/$', views_review.add_request_comment),
url(r'^(?P<request_id>[0-9]+)/assignreviewer/$', views_review.assign_reviewer),
url(r'^(?P<assignment_id>[0-9]+)/rejectreviewerassignment/$', views_review.reject_reviewer_assignment),
url(r'^(?P<assignment_id>[0-9]+)/complete/$', views_review.complete_review),
Expand Down
2 changes: 1 addition & 1 deletion ietf/doc/views_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def document_main(request, name, rev=None, document_html=False):

if doc.type_id == "charter":
content = doc.text_or_error() # pyflakes:ignore
content = markup_txt.markup(content)
content = markdown.markdown(content)

ballot_summary = None
if doc.get_state_slug() in ("intrev", "iesgrev"):
Expand Down
28 changes: 28 additions & 0 deletions ietf/doc/views_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ def review_request(request, name, request_id):

can_edit_deadline = can_edit_comment

can_add_comment = can_manage_request

assignments = review_req.reviewassignment_set.all()
for assignment in assignments:
assignment.is_reviewer = user_is_person(request.user, assignment.reviewer.person)
Expand Down Expand Up @@ -260,6 +262,7 @@ def review_request(request, name, request_id):
'can_assign_reviewer': can_assign_reviewer,
'can_edit_comment': can_edit_comment,
'can_edit_deadline': can_edit_deadline,
'can_add_comment': can_add_comment,
'assignments': assignments,
'wg_chairs': wg_chairs,
'iesg_state_summary': iesg_state_summary,
Expand Down Expand Up @@ -310,6 +313,31 @@ def close_request(request, name, request_id):
'form': form,
})

class AddCommentForm(forms.Form):
comment = forms.CharField(required=True, widget=forms.Textarea, strip=False)

@login_required
def add_request_comment(request, name, request_id):
doc = get_object_or_404(Document, name=name)
review_req = get_object_or_404(ReviewRequest, pk=request_id)

can_request = is_authorized_in_doc_stream(request.user, doc)
can_manage_request = can_manage_review_requests_for_team(request.user, review_req.team)
if not (can_request or can_manage_request):
permission_denied(request, "You do not have permission to perform this action")

if request.method == "POST":
form = AddCommentForm(request.POST)
if form.is_valid():
c = form.cleaned_data['comment']

review_req.add_history(c)
return redirect(review_request, name=review_req.doc.name, request_id=review_req.pk)
else:
form = AddCommentForm()

return render(request, 'doc/add_comment.html',
dict(doc=doc, form=form, review_req=review_req))

class AssignReviewerForm(forms.Form):
reviewer = PersonEmailChoiceField(label="Assign Additional Reviewer", empty_label="(None)")
Expand Down
31 changes: 18 additions & 13 deletions ietf/group/forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2017-2020, All Rights Reserved
# Copyright The IETF Trust 2017-2023, All Rights Reserved
# -*- coding: utf-8 -*-


Expand Down Expand Up @@ -103,6 +103,8 @@ def __init__(self, *args, **kwargs):
else:
field = None

self.hide_parent = kwargs.pop('hide_parent', False)

super(self.__class__, self).__init__(*args, **kwargs)

if not group_features or group_features.has_chartering_process:
Expand Down Expand Up @@ -138,18 +140,21 @@ def __init__(self, *args, **kwargs):
self.fields['acronym'].widget.attrs['readonly'] = ""

# Sort out parent options
self.fields['parent'].queryset = self.fields['parent'].queryset.filter(type__in=parent_types)
if need_parent:
self.fields['parent'].required = True
self.fields['parent'].empty_label = None
# if this is a new group, fill in the default parent, if any
if self.group is None or (not hasattr(self.group, 'pk')):
self.fields['parent'].initial = self.fields['parent'].queryset.filter(
acronym=default_parent
).first()
# label the parent field as 'IETF Area' if appropriate, for consistency with past behavior
if parent_types.count() == 1 and parent_types.first().pk == 'area':
self.fields['parent'].label = "IETF Area"
if self.hide_parent:
self.fields.pop('parent')
else:
self.fields['parent'].queryset = self.fields['parent'].queryset.filter(type__in=parent_types)
if need_parent:
self.fields['parent'].required = True
self.fields['parent'].empty_label = None
# if this is a new group, fill in the default parent, if any
if self.group is None or (not hasattr(self.group, 'pk')):
self.fields['parent'].initial = self.fields['parent'].queryset.filter(
acronym=default_parent
).first()
# label the parent field as 'IETF Area' if appropriate, for consistency with past behavior
if parent_types.count() == 1 and parent_types.first().pk == 'area':
self.fields['parent'].label = "IETF Area"

if field:
keys = list(self.fields.keys())
Expand Down
Loading