Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/breaking_changes_detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ name: "Detect breaking changes"

on:
pull_request:
branches:
- main
# branches:
# - main

permissions:
contents: read
Expand Down
97 changes: 5 additions & 92 deletions .github/workflows/breaking_changes_detector_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,96 +65,9 @@ jobs:
# Scoped to the minimum needed to upsert/delete the sticky comment.
permissions:
actions: read
pull-requests: write
steps:
- name: Download semver-check artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: semver-check-result
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
path: ./semver-artifact

- name: Read and validate artifact
id: read
run: |
set -euo pipefail
# Validate every field: the artifact comes from a workflow run
# that compiled fork-controlled code, so its contents are untrusted.
PR_NUMBER=$(cat ./semver-artifact/pr_number)
if ! [[ "$PR_NUMBER" =~ ^[0-9]+$ ]]; then
echo "Invalid PR number: $PR_NUMBER" >&2
exit 1
fi
CHECK_RESULT=$(cat ./semver-artifact/result)
if [[ "$CHECK_RESULT" != "success" && "$CHECK_RESULT" != "failure" ]]; then
echo "Invalid check result: $CHECK_RESULT" >&2
exit 1
fi
echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "result=$CHECK_RESULT" >> "$GITHUB_OUTPUT"

# Multi-line output: random delimiter so a malicious log line can't
# close the heredoc and inject extra output keys. See:
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#multiline-strings
DELIM="EOF_$(openssl rand -hex 16)"
{
echo "logs<<${DELIM}"
cat ./semver-artifact/logs
echo "${DELIM}"
} >> "$GITHUB_OUTPUT"

# The marker `<!-- semver-check-comment -->` is what makes the comment
# "sticky": maintain-one-comment uses it to find and replace (or
# delete) the existing comment instead of stacking new ones.
- name: Upsert sticky comment
if: steps.read.outputs.result != 'success'
uses: actions-cool/maintain-one-comment@909842216bc8e8658364c572ec52100f4c2cc50a # v3.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.read.outputs.pr_number }}
body-include: '<!-- semver-check-comment -->'
body: |
<!-- semver-check-comment -->
Thank you for opening this pull request!

Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).

<details>
<summary>Details</summary>
pull-requests: read

```
${{ steps.read.outputs.logs }}
```

</details>

- name: Delete sticky comment
if: steps.read.outputs.result == 'success'
uses: actions-cool/maintain-one-comment@909842216bc8e8658364c572ec52100f4c2cc50a # v3.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.read.outputs.pr_number }}
body-include: '<!-- semver-check-comment -->'
delete: true

- name: Add "auto detected api change" label
if: steps.read.outputs.result != 'success'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
PR_NUMBER: ${{ steps.read.outputs.pr_number }}
run: |
gh pr edit "$PR_NUMBER" --repo "$REPO" \
--add-label "$BREAKING_CHANGE_LABEL"

- name: Remove "auto detected api change" label
if: steps.read.outputs.result == 'success'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
PR_NUMBER: ${{ steps.read.outputs.pr_number }}
run: |
# No-op when the label isn't currently applied.
gh pr edit "$PR_NUMBER" --repo "$REPO" \
--remove-label "$BREAKING_CHANGE_LABEL" || true
# Check if working at all
steps:
- name: echo
run: echo "HELLLO"
2 changes: 1 addition & 1 deletion datafusion/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub use spans::{Location, Span, Spans};
pub use stats::{ColumnStatistics, Statistics};
pub use table_reference::{ResolvedTableReference, TableReference};
pub use unnest::{RecursionUnnestOption, UnnestOptions};
pub use utils::project_schema;
// pub use utils::project_schema;

// These are hidden from docs purely to avoid polluting the public view of what this crate exports.
// These are just re-exports of macros by the same name, which gets around the 'cannot refer to
Expand Down
Loading