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
8 changes: 8 additions & 0 deletions .github/config/labeler-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Pull Request Labeler Github Action Configuration: https://github.com/marketplace/actions/labeler
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that labels get added "after" the PR gets created and hence the CI run won't see the labels most probably - can we test this? (subsequent pushes would see the labels though).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is what i expect. This automation doesn't free us from thinking.

However, oftentimes PRs do involve multiple pushes, so this may free us from doing the thing manually.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still one issue I see - a reviewer won't know whether the hive tests actually ran just by looking at presence of label.
I'm fine with merging this provided people know of the behaviour to expect from the label.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it is already discussed, what if we use workflow_run so that we could run this workflow could add labels and ci could use them ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still one issue I see - a reviewer won't know whether the hive tests actually ran just by looking at presence of label.

If you see a label added after the PR is created, you must not assume it was observed by the workflow run.

But, if there was a push since label was added, then you can assume it's observed

"tests:hive":
- lib/trino-orc/**
- lib/trino-parquet/**
Comment thread
findepi marked this conversation as resolved.
Outdated
- lib/trino-rcfile/**
- plugin/trino-hive-hadoop2/**
- plugin/trino-hive/**
- testing/trino-product-tests/**
19 changes: 19 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Pull Request Labeler"

on:
pull_request_target:

permissions:
contents: read
pull-requests: write

# NOTE: Do not check out/execute code from the PR since a read-write token is present due to pull_request_target
jobs:
Comment thread
findepi marked this conversation as resolved.
Outdated
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
configuration-path: .github/config/labeler-config.yml