Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZEPPELIN-6101][FOLLOWUP] Fix build with profile include-hadoop #4859

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Oct 3, 2024

What is this PR for?

when building with -Pinclude-hadoop, com.google.code.findbugs:jsr305's scope becomes runtime thus failing the build.

What type of PR is it?

Bug Fix

Todos

What is the Jira issue?

ZEPPELIN-6101

How should this be tested?

tested with the command ./mvnw clean package -Pbuild-distr -DskipTests -Pinclude-hadoop

Screenshots (if appropriate)

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

Copy link
Contributor

@Reamer Reamer left a comment

Choose a reason for hiding this comment

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

LGTM,
At some point, we should look forward to the successor Spotbugs. At the moment, however, this is sufficient.

@Reamer
Copy link
Contributor

Reamer commented Oct 7, 2024

@pan3793
I wanted to merge this pull request, but unfortunately I encountered an error. Can you do anything with it?

10:24 $ ./dev/merge_zeppelin_pr.py 
git rev-parse --abbrev-ref HEAD
Which pull request would you like to merge? (e.g. 34): 4859
=== JIRA ZEPPELIN-6101 ===
Summary		Remove cluster interpreter
Assignee	Juyeon Kim
Status		Erledigt
Url		https://issues.apache.org/jira/browse/ZEPPELIN-6101
Affected	[]
Fixed		['0.12.0']


=== Pull Request #4859 ===
title	[ZEPPELIN-6101][FOLLOWUP] Fix build with profile include-hadoop
source	pan3793/ZEPPELIN-6101-followup
target	master
url	https://api.github.com/repos/apache/zeppelin/pulls/4859
Proceed with merging pull request #4859? (y/N): y
git config --get user.name
git config --get user.email
Restoring head pointer to master
git checkout master
Bereits auf 'master'
git branch
Traceback (most recent call last):
  File "/home/pdallig/git/zeppelin/./dev/merge_zeppelin_pr.py", line 635, in <module>
    main()
  File "/home/pdallig/git/zeppelin/./dev/merge_zeppelin_pr.py", line 613, in main
    merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
  File "/home/pdallig/git/zeppelin/./dev/merge_zeppelin_pr.py", line 174, in merge_pr
    merge_hash = merge_pr_resp["sha"][:8]
TypeError: 'NoneType' object is not subscriptable

@Reamer
Copy link
Contributor

Reamer commented Oct 7, 2024

I think that the scope public_repo is not sufficient.

EDIT 1: I get a HTTP Error 403: Forbidden. But I don't see any possibility of setting better rights.

EDIT 2: I have tried to execute the command via curl and get the following error message.

$ curl -L \
  -X PUT \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer Secret" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/apache/zeppelin/pulls/4859/merge > \
  -d '{"commit_title": "[ZEPPELIN-6101][FOLLOWUP] Fix build with profile include-hadoop", "commit_message": "Test> ing merge script", "merge_method": "squash"}'
> > > > {
  "message": "refusing to allow a Personal Access Token to create or update workflow `.github/workflows/core.yml` without `workflow` scope",
  "documentation_url": "https://docs.github.com/rest/pulls/pulls#merge-a-pull-request",
  "status": "403"
}

@pan3793
Copy link
Member Author

pan3793 commented Oct 7, 2024

@Reamer Have you setup env var GITHUB_OAUTH_KEY properly?

@pan3793
Copy link
Member Author

pan3793 commented Oct 7, 2024

According to https://docs.github.com/en/rest/branches/branches?apiVersion=2022-11-28#merge-a-branch

The fine-grained token must have the following permission set:

  • "Contents" repository permissions (write)

The error message might be outdated since GitHub updated the permission model.

@Reamer
Copy link
Contributor

Reamer commented Oct 7, 2024

I am currently using the classic token. I'll try the beta token.

@Reamer Reamer merged commit a2301f3 into apache:master Oct 7, 2024
28 checks passed
Reamer pushed a commit that referenced this pull request Oct 7, 2024
### What is this PR for?

when building with `-Pinclude-hadoop`, `com.google.code.findbugs:jsr305`'s scope becomes runtime thus failing the build.

### What type of PR is it?

Bug Fix

### Todos

### What is the Jira issue?

ZEPPELIN-6101

### How should this be tested?

tested with the command `./mvnw clean package -Pbuild-distr -DskipTests -Pinclude-hadoop`

### Screenshots (if appropriate)

### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No


Closes #4859 from pan3793/ZEPPELIN-6101-followup.

Signed-off-by: Philipp Dallig <[email protected]>
@Reamer
Copy link
Contributor

Reamer commented Oct 7, 2024

Also merge into branch-0.12

@Reamer
Copy link
Contributor

Reamer commented Oct 7, 2024

@pan3793
I have now given the token the following permissions. Doesn't feel right. What does your permission look like?
image

I also don't understand why GitHub thinks that the workflow file will be adjusted.

@pan3793
Copy link
Member Author

pan3793 commented Oct 7, 2024

Hmm, I just created a token with all permissions ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants