This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new 07c05c28 Remove the option to apply strict checking
07c05c28 is described below
commit 07c05c282c4574d6fbfff378e46dc3b0a8b557bc
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Mar 25 20:54:38 2026 +0000
Remove the option to apply strict checking
---
atr/api/__init__.py | 1 -
atr/db/interaction.py | 15 +-------------
atr/docs/checks.md | 4 ----
atr/get/projects.py | 1 -
atr/models/api.py | 2 --
atr/models/sql.py | 10 ---------
atr/shared/projects.py | 4 ----
atr/shared/web.py | 4 ----
atr/storage/writers/policy.py | 1 -
atr/templates/check-selected-release-info.html | 4 ++--
migrations/versions/0063_2026.03.25_9ae748a6.py | 27 +++++++++++++++++++++++++
11 files changed, 30 insertions(+), 43 deletions(-)
diff --git a/atr/api/__init__.py b/atr/api/__init__.py
index 7c704ca1..7f034eae 100644
--- a/atr/api/__init__.py
+++ b/atr/api/__init__.py
@@ -724,7 +724,6 @@ async def policy_get(
policy_source_artifact_paths=project.policy_source_artifact_paths,
policy_start_vote_subject=project.policy_start_vote_subject,
policy_start_vote_template=project.policy_start_vote_template,
- policy_strict_checking=project.policy_strict_checking,
policy_vote_comment_template=project.policy_vote_comment_template,
).model_dump(mode="json"), 200
diff --git a/atr/db/interaction.py b/atr/db/interaction.py
index 2520b136..3d9b6ac9 100644
--- a/atr/db/interaction.py
+++ b/atr/db/interaction.py
@@ -240,15 +240,6 @@ async def has_blocker_checks(
return count > 0
-async def has_failing_checks(
- release: sql.Release, revision_number: safe.RevisionNumber, caller_data:
db.Session | None = None
-) -> bool:
- count = await count_checks_for_revision_by_status(
- sql.CheckResultStatus.FAILURE, release, revision_number, caller_data
- )
- return count > 0
-
-
async def latest_info(
project_key: safe.ProjectKey, version_key: safe.VersionKey
) -> tuple[safe.RevisionNumber, str, datetime.datetime] | None:
@@ -296,7 +287,7 @@ async def release_latest_vote_task(release: sql.Release,
caller_data: db.Session
return task
-async def release_ready_for_vote( # noqa: C901
+async def release_ready_for_vote(
session: web.Committer,
project_key: safe.ProjectKey,
version_key: safe.VersionKey,
@@ -332,10 +323,6 @@ async def release_ready_for_vote( # noqa: C901
if await has_blocker_checks(release, revision, caller_data=data):
return "This release candidate draft has blockers. Please fix the
blockers before starting a vote."
- if release.project.policy_strict_checking:
- if await has_failing_checks(release, revision, caller_data=data):
- return "This release candidate draft has errors. Please fix the
errors before starting a vote."
-
if not (user.is_committee_member(committee, session.uid) or
session.is_admin):
return "You must be on the PMC of this project to start a vote"
diff --git a/atr/docs/checks.md b/atr/docs/checks.md
index e3ec619c..ce9e9510 100644
--- a/atr/docs/checks.md
+++ b/atr/docs/checks.md
@@ -132,10 +132,6 @@ Two separate sets of exclusion patterns let you skip files
during license scanni
You can [read more about license check
exclusions](license-checks#project-policy-exclusions).
-### Strict checking
-
-When _Strict checking_ is enabled, ATR prevents a release from being promoted
to a vote unless all checks pass. This setting does not change what the checks
themselves do or what they report.
-
### Committee signing keys
Signature verification depends on the public signing keys registered for the
project's committee. ATR verifies each `.asc` signature against the set of keys
linked to the committee, and accepts a signature only when the signing key has
a valid ASF UID association or matches the committee's private email address
pattern `private@`_committee_`.apache.org`. If a key has not been imported for
the committee, or if it lacks an ASF UID, signature checks will fail for
artifacts signed with that [...]
diff --git a/atr/get/projects.py b/atr/get/projects.py
index 045998cd..099fc218 100644
--- a/atr/get/projects.py
+++ b/atr/get/projects.py
@@ -358,7 +358,6 @@ def _render_compose_form(project: sql.Project) ->
htm.Element:
"source_excludes_lightweight":
"\n".join(project.policy_source_excludes_lightweight),
"source_excludes_rat":
"\n".join(project.policy_source_excludes_rat),
"file_tag_mappings": atr_tag_yaml,
- "strict_checking": project.policy_strict_checking,
},
form_classes=".atr-canary.py-4.px-5",
border=True,
diff --git a/atr/models/api.py b/atr/models/api.py
index 70bbf62c..841849f3 100644
--- a/atr/models/api.py
+++ b/atr/models/api.py
@@ -307,7 +307,6 @@ class PolicyGetResults(schema.Strict):
policy_source_artifact_paths: list[str]
policy_start_vote_subject: str
policy_start_vote_template: str
- policy_strict_checking: bool
policy_vote_comment_template: str
@@ -333,7 +332,6 @@ class PolicyUpdateArgs(schema.Strict):
source_excludes_rat: list[str] | None = None
start_vote_subject: str | None = None
start_vote_template: str | None = None
- strict_checking: bool | None = None
vote_comment_template: str | None = None
diff --git a/atr/models/sql.py b/atr/models/sql.py
index 64e20091..97f34564 100644
--- a/atr/models/sql.py
+++ b/atr/models/sql.py
@@ -810,14 +810,6 @@ Thanks,
return []
return policy.source_excludes_rat or []
- @property
- def policy_strict_checking(self) -> bool:
- # This is bool, so it should never be None
- # TODO: Should we make it nullable for defaulting?
- if (policy := self.release_policy) is None:
- return False
- return policy.strict_checking
-
@property
def policy_tagging_spec(self) -> dict[str, Any] | None:
if (policy := self.release_policy) is None:
@@ -1311,7 +1303,6 @@ class ReleasePolicy(sqlmodel.SQLModel, table=True):
source_excludes_rat: list[str] = sqlmodel.Field(
default_factory=list, sa_column=sqlalchemy.Column(sqlalchemy.JSON,
nullable=False)
)
- strict_checking: bool = sqlmodel.Field(default=False)
github_repository_name: str = sqlmodel.Field(default="")
github_repository_branch: str = sqlmodel.Field(default="")
github_compose_workflow_path: list[str] = sqlmodel.Field(
@@ -1349,7 +1340,6 @@ class ReleasePolicy(sqlmodel.SQLModel, table=True):
license_check_mode=self.license_check_mode,
source_excludes_lightweight=list(self.source_excludes_lightweight),
source_excludes_rat=list(self.source_excludes_rat),
- strict_checking=self.strict_checking,
github_repository_name=self.github_repository_name,
github_repository_branch=self.github_repository_branch,
github_compose_workflow_path=list(self.github_compose_workflow_path),
diff --git a/atr/shared/projects.py b/atr/shared/projects.py
index b90f7631..41d7f757 100644
--- a/atr/shared/projects.py
+++ b/atr/shared/projects.py
@@ -132,10 +132,6 @@ class ComposePolicyForm(form.Form):
widget=form.Widget.TEXTAREA,
rows=3,
)
- strict_checking: form.Bool = form.label(
- "Strict checking",
- "If enabled, then the release cannot be voted upon unless all checks
pass.",
- )
class VotePolicyForm(form.Form):
diff --git a/atr/shared/web.py b/atr/shared/web.py
index 51b06142..21f852f6 100644
--- a/atr/shared/web.py
+++ b/atr/shared/web.py
@@ -162,9 +162,6 @@ async def check(
vote_task_warnings = _warnings_from_vote_result(vote_task)
has_files = await util.has_files(release)
- has_any_errors = any(info.errors.get(path, []) for path in all_paths) if
info else False
- strict_checking = release.project.policy_strict_checking
- strict_checking_errors = strict_checking and has_any_errors
blocker_errors = False
if revision_number is not None:
blocker_errors = await interaction.has_blocker_checks(release,
revision_number)
@@ -203,7 +200,6 @@ async def check(
csrf_input=str(form.csrf_input()),
resolve_form=resolve_form,
has_files=has_files,
- strict_checking_errors=strict_checking_errors,
blocker_errors=blocker_errors,
can_vote=can_vote,
can_resolve=can_resolve,
diff --git a/atr/storage/writers/policy.py b/atr/storage/writers/policy.py
index 75af20b1..3f5e3b05 100644
--- a/atr/storage/writers/policy.py
+++ b/atr/storage/writers/policy.py
@@ -132,7 +132,6 @@ class CommitteeMember(CommitteeParticipant):
release_policy.source_excludes_lightweight =
_split_lines_verbatim(form.source_excludes_lightweight)
release_policy.source_excludes_rat =
_split_lines_verbatim(form.source_excludes_rat)
release_policy.file_tag_mappings = atr_tags_dict
- release_policy.strict_checking = form.strict_checking
await self.__commit_and_log(str(project_key))
diff --git a/atr/templates/check-selected-release-info.html
b/atr/templates/check-selected-release-info.html
index b8e45483..85bc1b3e 100644
--- a/atr/templates/check-selected-release-info.html
+++ b/atr/templates/check-selected-release-info.html
@@ -58,8 +58,8 @@
title="View revision history"
class="btn btn-secondary"><i class="bi bi-clock-history me-1"></i>
Revisions</a>
{% if revision_number %}
- {% set vote_blocked = blocker_errors or strict_checking_errors %}
- {% set blocked_title = "Fix blockers before starting a vote" if
blocker_errors else "Fix errors before starting a vote" %}
+ {% set vote_blocked = blocker_errors %}
+ {% set blocked_title = "Fix blockers before starting a vote" %}
{% if has_files and release.project.policy_manual_vote and
(ongoing_tasks_count == 0) and (not vote_blocked) %}
<a id="start-vote-button"
href="{{ as_url(get.manual.start_selected_revision,
project_key=release.project.key, version_key=release.version,
revision=revision_number) }}"
diff --git a/migrations/versions/0063_2026.03.25_9ae748a6.py
b/migrations/versions/0063_2026.03.25_9ae748a6.py
new file mode 100644
index 00000000..904a79c1
--- /dev/null
+++ b/migrations/versions/0063_2026.03.25_9ae748a6.py
@@ -0,0 +1,27 @@
+"""Remove the option to set strict checking
+
+Revision ID: 0063_2026.03.25_9ae748a6
+Revises: 0062_2026.03.25_5bc8d2ef
+Create Date: 2026-03-25 20:52:42.117365+00:00
+"""
+
+from collections.abc import Sequence
+
+import sqlalchemy as sa
+from alembic import op
+
+# Revision identifiers, used by Alembic
+revision: str = "0063_2026.03.25_9ae748a6"
+down_revision: str | None = "0062_2026.03.25_5bc8d2ef"
+branch_labels: str | Sequence[str] | None = None
+depends_on: str | Sequence[str] | None = None
+
+
+def upgrade() -> None:
+ with op.batch_alter_table("releasepolicy", schema=None) as batch_op:
+ batch_op.drop_column("strict_checking")
+
+
+def downgrade() -> None:
+ with op.batch_alter_table("releasepolicy", schema=None) as batch_op:
+ batch_op.add_column(sa.Column("strict_checking", sa.BOOLEAN(),
nullable=False, server_default=sa.false()))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]