Merge remote-tracking branch 'upstream/main' into feat/postgres

This commit is contained in:
Robert Sparks 2023-02-07 12:20:36 -06:00
commit 84d766232b
No known key found for this signature in database
GPG key ID: 6E2A6A5775F91318
11 changed files with 80 additions and 16 deletions

View file

@ -23,12 +23,23 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
skipMariaDBBuild:
description: 'Skip MariaDB Build'
default: false
required: true
type: boolean
exportDumpAsSQL:
description: 'Save PostgreSQL Debug Dump'
default: false
required: true
type: boolean
jobs:
build-mariadb:
name: Build MariaDB Docker Images
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' && github.event.inputs.skipMariaDBBuild == 'false' }}
permissions:
contents: read
packages: write
@ -96,6 +107,7 @@ jobs:
name: Migrate MySQL to PostgreSQL DB
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
if: ${{ always() && !failure() }}
needs: [combine-mariadb]
permissions:
contents: read
@ -141,10 +153,22 @@ jobs:
with:
name: dump
path: ietf.dump
- name: Export as SQL (Debug)
if: ${{ github.event.inputs.exportDumpAsSQL == 'true' }}
run: pg_dump -h pgdb -U django ietf > ietf.sql
- name: Upload SQL DB Dump (Debug)
if: ${{ github.event.inputs.exportDumpAsSQL == 'true' }}
uses: actions/upload-artifact@v3
with:
name: dumpsql
path: ietf.sql
build:
name: Build PostgreSQL Docker Images
runs-on: ubuntu-latest
if: ${{ always() && !failure() }}
needs: [migrate]
permissions:
contents: read

View file

@ -10,6 +10,8 @@ from django.utils import timezone
from ietf.group.models import Group, Role, GroupEvent, GroupMilestone, \
GroupHistory, RoleHistory
from ietf.review.factories import ReviewTeamSettingsFactory
from ietf.utils.timezone import date_today
class GroupFactory(factory.django.DjangoModelFactory):
class Meta:
@ -68,7 +70,7 @@ class BaseGroupMilestoneFactory(factory.django.DjangoModelFactory):
class DatedGroupMilestoneFactory(BaseGroupMilestoneFactory):
group = factory.SubFactory(GroupFactory, uses_milestone_dates=True)
due = timezone.now()+datetime.timedelta(days=180)
due = date_today() + datetime.timedelta(days=180)
class DatelessGroupMilestoneFactory(BaseGroupMilestoneFactory):
group = factory.SubFactory(GroupFactory, uses_milestone_dates=False)

View file

@ -3621,7 +3621,8 @@ def organize_proceedings_sessions(sessions):
"""
material_times = {} # key is material, value is first timestamp it appeared
for s, mats in items:
timestamp = s.official_timeslotassignment().timeslot.time
tsa = s.official_timeslotassignment()
timestamp = tsa.timeslot.time if tsa else None
if not isinstance(mats, list):
mats = [mats]
for mat in mats:
@ -3640,7 +3641,7 @@ def organize_proceedings_sessions(sessions):
'group': group,
'name': sess_name,
'canceled': all_canceled,
# pass sessions instead of the materials here so session data (like time) is easily available
'has_materials': s.sessionpresentation_set.exists(),
'agendas': _format_materials((s, s.agenda()) for s in ss),
'minutes': _format_materials((s, s.minutes()) for s in ss),
'bluesheets': _format_materials((s, s.bluesheets()) for s in ss),
@ -3687,9 +3688,13 @@ def proceedings(request, num=None):
sessions.filter(name__icontains='plenary')
.exclude(current_status='notmeet')
)
irtf, _ = organize_proceedings_sessions(
irtf_meeting, irtf_not_meeting = organize_proceedings_sessions(
sessions.filter(group__parent__acronym = 'irtf').order_by('group__acronym')
)
# per Colin (datatracker #5010) - don't report not meeting rags
irtf_not_meeting = [item for item in irtf_not_meeting if item["group"].type_id != "rag"]
irtf = {"meeting_groups":irtf_meeting, "not_meeting_groups":irtf_not_meeting}
training, _ = organize_proceedings_sessions(
sessions.filter(group__acronym__in=['edu','iaoc'], type_id__in=['regular', 'other',])
.exclude(current_status='notmeet')

View file

@ -43,11 +43,13 @@
margin-bottom: var(--line);
margin-left: 3ch;
section > p, section > dl.references > dd {
/* Really long lines can wrap when all else fails.
* This won't affect <pre> or <table>, or cases where soft-wrapping occurs.
* Mostly this exists so that long URLs wrap properly in Safari, which
* doesn't break words at '/' like other browsers. */
overflow-wrap: break-word;
}
h1, h2, h3, h4, h5 {
font-weight: bold;
@ -368,7 +370,7 @@ td, th {
}
/* Links */
a.selfRef, a.pilcrow {
a.selfRef, a.pilcrow, .iref + a.internal {
color: black;
text-decoration: none;
}

View file

@ -154,7 +154,7 @@
<div class="card-header">
{{ doc.name }}-{{ doc.rev }}
</div>
<div class="card-body">
<div class="card-body text-break">
{{ content }}
</div>
</div>

View file

@ -47,7 +47,6 @@
direction: rtl;
text-align: left;
}
}
</style>
</head>
<body>
@ -103,6 +102,8 @@
{% include "doc/document_info.html" with sidebar=False %}
<tr>
<th scope="row"></th>
<th scope="row"></th>
<td class="edit"></td>
<td>
<a class="btn btn-sm btn-warning mb-3"
target="_blank"

View file

@ -123,7 +123,7 @@
</p>
<div id="materials-content" class="card mt-5">
<div class="card-header">{{ doc.name }}-{{ doc.rev }}</div>
<div class="card-body">
<div class="card-body{% if content_is_html %} text-break{% endif %}">
{% if doc.rev and content != None %}
{% if content_is_html %}
{{ content|sanitize|safe }}

View file

@ -30,7 +30,7 @@
{% if s.current_status == "sched" %}{{ s.time|date:"D" }}{% endif %}
</td>
<td>
{% if show_ical %}
{% if show_ical and s.current_status == "sched" %}
{% if s.meeting.type_id == 'ietf' %}
{{ s.time|date:"H:i" }}
<a class="btn btn-primary btn-sm"

View file

@ -4,10 +4,12 @@
{% load textfilters tz %}
{% origin %}
{% with item=session.official_timeslotassignment acronym=session.group_at_the_time.acronym %}
{% if session.agenda and show_agenda %}
{# Note: if called with show_agenda=True, calling template must load agenda_materials.js, needed by session_agenda_include.html #}
{% include "meeting/session_agenda_include.html" with slug=item.slug session=session timeslot=item.timeslot only %}
{% endif %}
<div role="group" class="btn-group btn-group-sm">
{% if session.agenda and show_agenda %}
{% include "meeting/session_agenda_include.html" with slug=item.slug session=session timeslot=item.timeslot only %}
{# Note: if called with show_agenda=True, calling template must load agenda_materials.js, needed by session_agenda_include.html #}
{# agenda pop-up button #}
<a class="btn btn-outline-primary"
data-bs-toggle="modal"

View file

@ -88,7 +88,7 @@
</tr>
</thead>
<tbody>
{% for entry in not_meeting_groups %}{% if entry.sessions_with_materials %}
{% for entry in not_meeting_groups %}{% if entry.has_materials %}
{% include "meeting/group_proceedings.html" with entry=entry meeting=meeting show_agenda=True only %}
{% endif %}{% endfor %}
</tbody>
@ -148,7 +148,7 @@
</table>
{% endif %}
<!-- IRTF Sessions -->
{% if irtf %}
{% if irtf.meeting_groups %}
<h2 class="mt-5" id="irtf">
IRTF <small class="text-muted">Internet Research Task Force</small>
</h2>
@ -173,11 +173,39 @@
</tr>
</thead>
<tbody>
{% for entry in irtf %}
{% for entry in irtf.meeting_groups %}
{% include "meeting/group_proceedings.html" with entry=entry meeting=meeting show_agenda=True only %}
{% endfor %}
</tbody>
</table>
{% if irtf.not_meeting_groups %}
<p>
IRTF groups not meeting:
{% for entry in irtf.not_meeting_groups %}
{% if entry.name == "" %}{# do not show named sessions in this list #}
<a href="{% url 'ietf.group.views.group_home' acronym=entry.group.acronym %}">
{{ entry.group.acronym }}
</a>{% if not forloop.last %},{% endif %}
{% endif %}
{% endfor %}
</p>
<table class="table table-sm table-striped">
<thead>
<tr>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for entry in irtf.not_meeting %}{% if entry.has_materials %}
{% include "meeting/group_proceedings.html" with entry=entry meeting=meeting show_agenda=True only %}
{% endif %}{% endfor %}
</tbody>
</table>
{% endif %}
{% endif %}
{% endcache %}
{% endblock %}

View file

@ -48,7 +48,7 @@
{% if not forloop.first %}</tbody>{% endif %}
<tbody>
<tr>
<th scope="col" class="table-warning" colspan="7">{{ session.current_status_name|capfirst }}</th>
<th scope="col" class="table-warning" colspan="8">{{ session.current_status_name|capfirst }}</th>
</tr>
</tbody>
<tbody>