Skip to content
Open
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
15 changes: 11 additions & 4 deletions format_checker/pr_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
)


# URL pattern used in Notes validation
_url_pattern = r"https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,}"

# Contains information and regexes unique to pr-data.csv and gr-data.csv files
data = {
"columns": [
Expand Down Expand Up @@ -65,9 +68,9 @@
"PR Link": re.compile(
r"((https:\/\/github.com\/((\w|\.|-)+\/)+)(pull\/\d+))"
),
"Notes": re.compile(
r"(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})"
),
"URL Base": re.compile(_url_pattern),
"Notes": re.compile(rf"({_url_pattern})(;.*)?"),
"Notes URL with Text": re.compile(rf"({_url_pattern})\s+.+"),
}


Expand Down Expand Up @@ -152,7 +155,11 @@ def check_notes(filename, row, i, log):
"""Checks validity of Notes."""

if not data["Notes"].fullmatch(row["Notes"]):
log_std_error(filename, log, i, row, "Notes")
# Check if it's a URL followed by text without semicolon
if data["Notes URL with Text"].fullmatch(row["Notes"]):
log_std_error(filename, log, i, row, "Notes", "URL must be separated from additional text with a semicolon (ex: 'URL;description')")
else:
log_std_error(filename, log, i, row, "Notes")


def check_forked_project(filename, row, i, log):
Expand Down
3 changes: 2 additions & 1 deletion pr-data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3495,7 +3495,8 @@ https://github.com/apache/pinot,ecf41be2ecd007853c2db19e1c6a038cf356cb9e,pinot-c
https://github.com/apache/pinot,ecf41be2ecd007853c2db19e1c6a038cf356cb9e,pinot-core,org.apache.pinot.queries.NullEnabledQueriesTest.testQueriesWithNoDictDoubleColumn,ID,,,
https://github.com/apache/pinot,ecf41be2ecd007853c2db19e1c6a038cf356cb9e,pinot-core,org.apache.pinot.queries.NullEnabledQueriesTest.testQueriesWithNoDictFloatColumn,ID,DeveloperFixed,,https://github.com/apache/pinot/commit/db0f3dcb73bd338d4b754329679e5f3e4d6bf7e0
https://github.com/apache/pinot,f79b618141e07c140663791959d96956ad91d811,pinot-query-planner,org.apache.pinot.query.queries.ResourceBasedQueryPlansTest.testQueryExplainPlansAndQueryPlanConversion,ID,,,fails 21/375 cases
https://github.com/apache/pinot,f79b618141e07c140663791959d96956ad91d811,pinot-query-planner,org.apache.pinot.query.queries.ResourceBasedQueryPlansTest.testQueryExplainPlansWithExceptions,ID,,,fails 1/38 cases
https://github.com/apache/pinot,f79b618141e07c140663791959d96956ad91d811,pinot-query-planner,org.apache.pinot.query.queries.ResourceBasedQueryPlansTest.testQueryExplainPlansWithExceptions,ID,DeveloperFixed,,https://github.com/apache/pinot/commit/782b6979360b6ec28c869bbf8b7ea59e1548a3ef; fails 1/38 testCases which are provided by the DataProvider testResourceQueryPlannerTestCaseProviderExceptions
https://github.com/apache/pinot,f79b618141e07c140663791959d96956ad91d811,pinot-query-planner,org.apache.pinot.query.queries.ResourceBasedQueryPlansTest.testQueryExplainPlansWithExceptionsTest,ID,,,https://github.com/apache/pinot/commit/782b6979360b6ec28c869bbf8b7ea59e1548a3ef fails 1/38 testCases which are provided by the DataProvider testResourceQueryPlannerTestCaseProviderExceptions
https://github.com/apache/pinot,85e413ebe8c80513a8a676fc090b1af0f50861f0,pinot-spi,org.apache.pinot.spi.plugin.PluginManagerTest.testGetPluginsToLoad,ID,Accepted,https://github.com/apache/pinot/pull/9925,
https://github.com/apache/pinot,f79b618141e07c140663791959d96956ad91d811,pinot-common,org.apache.pinot.sql.parsers.rewriter.ExprMinMaxRewriterTest.testQueryRewrite,ID,Accepted,https://github.com/apache/pinot/pull/12047,
https://github.com/apache/pulsar,ca0fb443ca940c2fa15ecaa9f908d81bed4ebbb1,pulsar-broker,org.apache.pulsar.broker.loadbalance.extensions.ExtensibleLoadManagerImplTest.testNamespaceOwnershipListener,ID,DeveloperFixed,,https://github.com/apache/pulsar/commit/c2a0090144a48f01568c23c71f660d35674f2c75
Expand Down