Skip to content

Commit

Permalink
Merge branch 'main' into feat/flight-sql-client
Browse files Browse the repository at this point in the history
# Conflicts:
#	csharp/src/Apache.Arrow.Flight.Sql/Apache.Arrow.Flight.Sql.csproj
  • Loading branch information
HackPoint committed Dec 23, 2024
2 parents d4afd4e + 164e18a commit 589fb12
Show file tree
Hide file tree
Showing 1,569 changed files with 6,436 additions and 260,374 deletions.
23 changes: 0 additions & 23 deletions .dir-locals.el

This file was deleted.

88 changes: 88 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# This is an EditorConfig file: https://editorconfig.org/

# This is the top-most config for this project
root = true

# General settings

[*]
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
spelling_language = en

# Language-specific settings, in approximate alphabetical order

[*.{c,cc,cpp,h,hh,hpp}]
indent_size = 2
indent_style = space

[*.cmake]
indent_size = 2
indent_style = space

[CMakeLists.txt]
indent_size = 2
indent_style = space

[*.cs]
indent_size = 4
indent_style = space

[*.{fbs,proto,thrift}]
indent_size = 2
indent_style = space

[*.go]
indent_size = 8
indent_style = tab
tab_width = 8

[*.{js,ts}]
indent_size = 4
indent_style = space

[*.{py,pyx,pxd,pxi}]
indent_size = 4
indent_style = space

[*.r]
indent_size = 2
indent_style = space

[*.rb]
indent_size = 2
indent_style = space

[*.rst]
indent_size = 3
indent_style = space

[*.sh]
indent_size = 2
indent_style = space

[*.vala]
indent_size = 4
indent_style = space

[*.{yml,yaml}]
indent_size = 2
indent_style = space
19 changes: 0 additions & 19 deletions .github/.dir-locals.el

This file was deleted.

8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ issues][3] for the Apache Arrow project. Comment on the issue and/or contact
[[email protected]](https://lists.apache.org/[email protected])
with your questions and ideas.

If you’d like to report a bug but don’t have time to fix it, you can still post
it on JIRA, or email the mailing list
If you’d like to report a bug but don’t have time to fix it, you can still create
a GitHub issue, or email the mailing list
[[email protected]](https://lists.apache.org/[email protected])

To contribute a patch:
Expand All @@ -57,8 +57,8 @@ harder to merge in a large change with a lot of disjoint features.
GitHub](https://github.com/apache/arrow/issues).
3. Submit the patch as a GitHub pull request against the main branch. For a
tutorial, see the GitHub guides on [forking a repo](https://help.github.com/en/articles/fork-a-repo)
and [sending a pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). So that your pull request syncs with the JIRA issue, prefix your pull request
name with the JIRA issue id (ex: [ARROW-767: [C++] Filesystem abstraction](https://github.com/apache/arrow/pull/4225))
and [sending a pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). Prefix your pull request
name with the GitHub issue id (ex: [GH-767: [C++] Filesystem abstraction](https://github.com/apache/arrow/pull/4225))
4. Make sure that your code passes the unit tests. You can find instructions
how to run the unit tests for each Arrow component in its respective README
file.
Expand Down
4 changes: 0 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ or
MINOR: [${COMPONENT}] ${SUMMARY}
In the case of PARQUET issues on JIRA the title also supports:
PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
-->

### Rationale for this change
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
shell: bash
run: |
gem install test-unit
pip install "cython>=0.29.31" setuptools pytest jira setuptools-scm
pip install "cython>=0.29.31" setuptools pytest requests setuptools-scm
- name: Run Release Test
env:
ARROW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
ref: main
persist-credentials: false

- name: Comment JIRA link
- name: Add Issue link
if: |
(github.event.action == 'opened' ||
github.event.action == 'edited')
Expand Down
34 changes: 3 additions & 31 deletions .github/workflows/dev_pr/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ const https = require('https');
/**
* Given the title of a PullRequest return the Issue
*
* @param {String} title
* @param {String} title
* @returns {Issue} or null if no issue detected.
*
* @typedef {Object} Issue
* @property {string} kind - The kind of issue: minor, jira or github
* @property {string} id - The id of the issue:
* PARQUET-XXXX for jira
* The numeric issue id for github
* @property {string} kind - The kind of issue: minor or github
* @property {string} id - The numeric issue id of the issue
*/
function detectIssue(title) {
if (!title) {
Expand All @@ -36,38 +34,13 @@ function detectIssue(title) {
if (title.startsWith("MINOR: ")) {
return {"kind": "minor"};
}
const matched_jira = /^(WIP:?\s*)?((PARQUET)-\d+)/.exec(title);
if (matched_jira) {
return {"kind": "jira", "id": matched_jira[2]};
}
const matched_gh = /^(WIP:?\s*)?GH-(\d+)/.exec(title);
if (matched_gh) {
return {"kind": "github", "id": matched_gh[2]};
}
return null;
}

/**
* Retrieves information about a JIRA issue.
* @param {String} jiraID
* @returns {Object} the information about a JIRA issue.
*/
async function getJiraInfo(jiraID) {
const jiraURL = `https://issues.apache.org/jira/rest/api/2/issue/${jiraID}`;

return new Promise((resolve) => {
https.get(jiraURL, res => {
let data = '';

res.on('data', chunk => { data += chunk })

res.on('end', () => {
resolve(JSON.parse(data));
})
})
});
}

/**
* Retrieves information about a GitHub issue.
* @param {String} issueID
Expand All @@ -89,6 +62,5 @@ async function getJiraInfo(jiraID) {

module.exports = {
detectIssue,
getJiraInfo,
getGitHubInfo
};
93 changes: 2 additions & 91 deletions .github/workflows/dev_pr/issue_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,91 +17,6 @@

const helpers = require("./helpers.js");

/**
* Performs checks on the JIRA Issue:
* - The issue is started in JIRA.
* - The issue contains components.
*
* @param {Object} github
* @param {Object} context
* @param {String} pullRequestNumber
* @param {String} jiraID
*/
async function verifyJIRAIssue(github, context, pullRequestNumber, jiraID) {
const ticketInfo = await helpers.getJiraInfo(jiraID);
if(!ticketInfo["fields"]["components"].length) {
await commentMissingComponents(github, context, pullRequestNumber);
}

if(ticketInfo["fields"]["status"]["id"] == 1) {
// "status": {"name":"Open","id":"1"
// "description":"The issue is open and ready for the assignee to start work on it.",
await commentNotStartedTicket(github, context, pullRequestNumber);
}
}

/**
* Adds a comment to add components on the JIRA ticket.
*
* @param {Object} github
* @param {Object} context
* @param {String} pullRequestNumber
*/
async function commentMissingComponents(github, context, pullRequestNumber) {
const {data: comments} = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequestNumber,
per_page: 100
});

var found = false;
for(var i=0; i<comments.length; i++) {
if (comments[i].body.includes("has no components in JIRA")) {
found = true;
}
}
if (!found) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequestNumber,
body: ":warning: Ticket **has no components in JIRA**, make sure you assign one."
});
}
}

/**
* Adds a comment to start the ticket in JIRA.
*
* @param {Object} github
* @param {Object} context
* @param {String} pullRequestNumber
*/
async function commentNotStartedTicket(github, context, pullRequestNumber) {
const {data: comments} = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequestNumber,
per_page: 100
});

var found = false;
for(var i=0; i<comments.length; i++) {
if (comments[i].body.includes("has not been started in JIRA")) {
found = true;
}
}
if (!found) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequestNumber,
body: ":warning: Ticket **has not been started in JIRA**, please click 'Start Progress'."
});
}
}

/**
* Assigns the GitHub Issue to the PR creator.
*
Expand Down Expand Up @@ -163,11 +78,7 @@ module.exports = async ({github, context}) => {
const pullRequestNumber = context.payload.number;
const title = context.payload.pull_request.title;
const issue = helpers.detectIssue(title)
if (issue){
if (issue.kind == "jira") {
await verifyJIRAIssue(github, context, pullRequestNumber, issue.id);
} else if(issue.kind == "github") {
await verifyGitHubIssue(github, context, pullRequestNumber, issue.id);
}
if (issue && issue.kind === "github") {
await verifyGitHubIssue(github, context, pullRequestNumber, issue.id);
}
};
6 changes: 0 additions & 6 deletions .github/workflows/dev_pr/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
- any-glob-to-any-file:
- go/**/*

"Component: Java":
- changed-files:
- any-glob-to-any-file:
- java/**/*

"Component: JavaScript":
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -82,7 +77,6 @@
- any-glob-to-any-file:
- c_glib/gandiva-glib/**/*
- cpp/src/gandiva/**/*
- java/gandiva/**/*
- python/pyarrow/gandiva.*
- ruby/red-gandiva/**/*

Expand Down
Loading

0 comments on commit 589fb12

Please sign in to comment.