Skip to content
Merged
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
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"oderwat.indent-rainbow",
"redhat.vscode-yaml",
"spmeesseman.vscode-taskexplorer",
"visualstudioexptteam.vscodeintellicode",
"ms-python.pylint",
"charliermarsh.ruff"
],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ jobs:
repo: ietf-tools/infra-k8s
ref: main
token: ${{ secrets.GH_INFRA_K8S_TOKEN }}
inputs: '{ "environment":"${{ secrets.GHA_K8S_CLUSTER }}", "app":"datatracker", "manifest":"postgres", "forceRecreate":true, "waitClusterReady":true }'
inputs: '{ "environment":"${{ secrets.GHA_K8S_CLUSTER }}", "app":"datatracker", "manifest":"postgres", "forceRecreate":true, "restoreToLastFullSnapshot":true, "waitClusterReady":true }'
wait-for-completion: true
wait-for-completion-timeout: 30m
wait-for-completion-timeout: 60m
wait-for-completion-interval: 20s
display-workflow-run-url: false

Expand Down
14 changes: 14 additions & 0 deletions client/components/ChatLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,18 @@ onMounted(() => {
}
}
}

[data-bs-theme="dark"] .chatlog {
.n-timeline-item-content__title {
color: #d63384 !important;
}

.n-timeline-item-content__content {
color: #fff !important;
}

.n-timeline-item-content__meta {
color: #0569ffd9 !important;
}
}
</style>
18 changes: 18 additions & 0 deletions client/components/Polls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,21 @@ onMounted(() => {
})
</script>

<style lang="scss">
@import '../shared/colors.scss';

[data-bs-theme="dark"] .polls {
tr,
th,
td {
background-color: $gray-900 !important;
color: $gray-300 !important;
border-color: $gray-500 !important;
border-width: 0.05 !important;
}

td:hover {
background-color: $cyan-600 !important;
}
}
</style>
2 changes: 1 addition & 1 deletion dev/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ietf-tools/datatracker-app-base:20250903T2216
FROM ghcr.io/ietf-tools/datatracker-app-base:20251201T1548
LABEL maintainer="IETF Tools Team <tools-discuss@ietf.org>"

ENV DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion dev/build/TARGET_BASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20250903T2216
20251201T1548
45 changes: 27 additions & 18 deletions dev/build/gunicorn.conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,30 @@ def post_request(worker, req, environ, resp):
def post_fork(server, worker):
server.log.info("Worker spawned (pid: %s)", worker.pid)

resource = Resource.create(attributes={
"service.name": "datatracker",
"service.version": ietf.__version__,
"service.instance.id": worker.pid,
"service.namespace": "datatracker",
"deployment.environment.name": os.environ.get("DATATRACKER_SERVICE_ENV", "dev")
})

trace.set_tracer_provider(TracerProvider(resource=resource))
otlp_exporter = OTLPSpanExporter(endpoint="https://heimdall-otlp.ietf.org/v1/traces")

trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(otlp_exporter))

# Instrumentations
DjangoInstrumentor().instrument()
Psycopg2Instrumentor().instrument()
PymemcacheInstrumentor().instrument()
RequestsInstrumentor().instrument()
# Setting DATATRACKER_OPENTELEMETRY_ENABLE=all in the environment will enable all
# opentelemetry instrumentations. Individual instrumentations can be selected by
# using a space-separated list. See the code below for available instrumentations.
telemetry_env = os.environ.get("DATATRACKER_OPENTELEMETRY_ENABLE", "").strip()
if telemetry_env != "":
enabled_telemetry = [tok.strip().lower() for tok in telemetry_env.split()]
resource = Resource.create(attributes={
"service.name": "datatracker",
"service.version": ietf.__version__,
"service.instance.id": worker.pid,
"service.namespace": "datatracker",
"deployment.environment.name": os.environ.get("DATATRACKER_SERVICE_ENV", "dev")
})
trace.set_tracer_provider(TracerProvider(resource=resource))
otlp_exporter = OTLPSpanExporter(endpoint="https://heimdall-otlp.ietf.org/v1/traces")

trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(otlp_exporter))

# Instrumentations
if "all" in enabled_telemetry or "django" in enabled_telemetry:
DjangoInstrumentor().instrument()
if "all" in enabled_telemetry or "psycopg2" in enabled_telemetry:
Psycopg2Instrumentor().instrument()
if "all" in enabled_telemetry or "pymemcache" in enabled_telemetry:
PymemcacheInstrumentor().instrument()
if "all" in enabled_telemetry or "requests" in enabled_telemetry:
RequestsInstrumentor().instrument()
5 changes: 0 additions & 5 deletions docker/app.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ ARG USER_GID=$USER_UID
COPY docker/scripts/app-setup-debian.sh /tmp/library-scripts/docker-setup-debian.sh
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 $(. /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 \
&& apt-get install -y --no-install-recommends postgresql-client-14 pgloader \
# Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131
&& apt-get purge -y imagemagick imagemagick-6-common \
# Install common packages, non-root user
Expand Down
27 changes: 14 additions & 13 deletions docker/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ RUN apt-get update \

# Add Node.js Source
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
RUN echo "Package: nodejs" >> /etc/apt/preferences.d/preferences && \
echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/preferences && \
echo "Pin-Priority: 1001" >> /etc/apt/preferences.d/preferences
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& 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
RUN echo "Package: nodejs" >> /etc/apt/preferences.d/preferences \
&& echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/preferences \
&& echo "Pin-Priority: 1001" >> /etc/apt/preferences.d/preferences

# 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 \
$(. /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 $(. /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 mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list

# Add PostgreSQL Source
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/keyrings/apt.postgresql.org.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/apt.postgresql.org.gpg] https://apt.postgresql.org/pub/repos/apt $(. /etc/os-release && echo "$VERSION_CODENAME")-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list

# Install the packages we need
RUN apt-get update --fix-missing && apt-get install -qy --no-install-recommends \
Expand Down
5 changes: 0 additions & 5 deletions docker/celery.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ ARG USER_GID=$USER_UID
COPY docker/scripts/app-setup-debian.sh /tmp/library-scripts/docker-setup-debian.sh
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 $(. /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 \
&& apt-get install -y --no-install-recommends postgresql-client-14 pgloader \
# Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131
&& apt-get purge -y imagemagick imagemagick-6-common \
# Install common packages, non-root user
Expand Down
9 changes: 5 additions & 4 deletions ietf/doc/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
ReviewAssignmentDocEvent, IanaExpertDocEvent, IRSGBallotDocEvent, DocExtResource, DocumentActionHolder,
BofreqEditorDocEvent, BofreqResponsibleDocEvent, StoredObject )

from ietf.utils.admin import SaferTabularInline
from ietf.utils.validators import validate_external_resource_value

class StateTypeAdmin(admin.ModelAdmin):
Expand All @@ -28,17 +29,17 @@ class StateAdmin(admin.ModelAdmin):
filter_horizontal = ["next_states"]
admin.site.register(State, StateAdmin)

class DocAuthorInline(admin.TabularInline):
class DocAuthorInline(SaferTabularInline):
model = DocumentAuthor
raw_id_fields = ['person', 'email']
extra = 1

class DocActionHolderInline(admin.TabularInline):
class DocActionHolderInline(SaferTabularInline):
model = DocumentActionHolder
raw_id_fields = ['person']
extra = 1

class RelatedDocumentInline(admin.TabularInline):
class RelatedDocumentInline(SaferTabularInline):
model = RelatedDocument
fk_name= 'source'
def this(self, instance):
Expand All @@ -48,7 +49,7 @@ def this(self, instance):
raw_id_fields = ['target']
extra = 1

class AdditionalUrlInLine(admin.TabularInline):
class AdditionalUrlInLine(SaferTabularInline):
model = DocumentURL
fields = ['tag','desc','url',]
extra = 1
Expand Down
55 changes: 0 additions & 55 deletions ietf/doc/mails.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,61 +103,6 @@ def email_stream_changed(request, doc, old_stream, new_stream, text=""):
dict(text=text,
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()),
cc=cc)

def email_wg_call_for_adoption_issued(request, doc, cfa_duration_weeks=None):
if cfa_duration_weeks is None:
cfa_duration_weeks=2
(to, cc) = gather_address_lists("doc_wg_call_for_adoption_issued", doc=doc)
frm = request.user.person.formatted_email()

end_date = date_today(DEADLINE_TZINFO) + datetime.timedelta(days=7 * cfa_duration_weeks)

subject = f"Call for adoption: {doc.name}-{doc.rev} (Ends {end_date})"

send_mail(
request,
to,
frm,
subject,
"doc/mail/wg_call_for_adoption_issued.txt",
dict(
doc=doc,
subject=subject,
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url(),
end_date=end_date,
cfa_duration_weeks=cfa_duration_weeks,
wg_list=doc.group.list_email,
),
cc=cc,
)


def email_wg_last_call_issued(request, doc, wglc_duration_weeks=None):
if wglc_duration_weeks is None:
wglc_duration_weeks = 2
(to, cc) = gather_address_lists("doc_wg_last_call_issued", doc=doc)
frm = request.user.person.formatted_email()


end_date = date_today(DEADLINE_TZINFO) + datetime.timedelta(days=7 * wglc_duration_weeks)
subject = f"WG Last Call: {doc.name}-{doc.rev} (Ends {end_date})"

send_mail(
request,
to,
frm,
subject,
"doc/mail/wg_last_call_issued.txt",
dict(
doc=doc,
subject=subject,
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url(),
end_date=end_date,
wglc_duration_weeks=wglc_duration_weeks,
wg_list=doc.group.list_email,
),
cc=cc,
)

def email_pulled_from_rfc_queue(request, doc, comment, prev_state, next_state):
extra=extra_automation_headers(doc)
Expand Down
58 changes: 58 additions & 0 deletions ietf/doc/templatetags/ietf_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,3 +1017,61 @@ def is_in_stream(doc):
elif stream == "editorial":
return True
return False


@register.filter
def is_doc_ietf_adoptable(doc):
return doc.stream_id is None or all(
[
doc.stream_id == "ietf",
doc.get_state_slug("draft-stream-ietf")
not in [
"c-adopt",
"adopt-wg",
"info",
"wg-doc",
"parked",
"dead",
"wg-lc",
"waiting-for-implementation",
"chair-w",
"writeupw",
"sub-pub",
],
doc.get_state_slug("draft") != "rfc",
doc.became_rfc() is None,
]
)


@register.filter
def can_issue_ietf_wg_lc(doc):
return all(
[
doc.stream_id == "ietf",
doc.get_state_slug("draft-stream-ietf")
not in ["wg-cand", "c-adopt", "wg-lc"],
doc.get_state_slug("draft") != "rfc",
doc.became_rfc() is None,
]
)


@register.filter
def can_submit_to_iesg(doc):
return all(
[
doc.stream_id == "ietf",
doc.get_state_slug("draft-iesg") == "idexists",
doc.get_state_slug("draft-stream-ietf") not in ["wg-cand", "c-adopt"],
]
)


@register.filter
def has_had_ietf_wg_lc(doc):
return (
doc.stream_id == "ietf"
and doc.docevent_set.filter(statedocevent__state__slug="wg-lc").exists()
)

Loading