[
https://issues.apache.org/jira/browse/BEAM-9301?focusedWorklogId=387464&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-387464
]
ASF GitHub Bot logged work on BEAM-9301:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Feb/20 16:34
Start Date: 14/Feb/20 16:34
Worklog Time Spent: 10m
Work Description: suztomo commented on pull request #10865: [BEAM-9301]
Checkout the hash of master instead of the branch in beam linkage checker script
URL: https://github.com/apache/beam/pull/10865#discussion_r379528002
##########
File path: sdks/java/build-tools/beam-linkage-check.sh
##########
@@ -84,9 +84,9 @@ function runLinkageCheck () {
BRANCH_COMMIT=`git rev-parse --short=8 HEAD`
runLinkageCheck $BRANCH_COMMIT
-git checkout master
-git pull
-MASTER_COMMIT=`git rev-parse --short=8 HEAD`
+git fetch
+MASTER_COMMIT=`git rev-parse --short=8 master`
Review comment:
Line 71 would fail:
```
suztomo@suxtomo24:~/cloud-opensource-java$ MASTER_COMMIT=`git rev-parse
--short=8 origin/master`
suztomo@suxtomo24:~/cloud-opensource-java$ git -c advice.detachedHead=false
checkout $MASTER_COMMIT
HEAD is now at eebf0ce4 update http client (#1220)
suztomo@suxtomo24:~/cloud-opensource-java$ git symbolic-ref --short HEAD
fatal: ref HEAD is not a symbolic ref
suztomo@suxtomo24:~/cloud-opensource-java$ echo $?
128
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 387464)
Time Spent: 2h (was: 1h 50m)
> Add a script to check Java linkage issues (beam-linkage-check.sh)
> -----------------------------------------------------------------
>
> Key: BEAM-9301
> URL: https://issues.apache.org/jira/browse/BEAM-9301
> Project: Beam
> Issue Type: Task
> Components: build-system
> Reporter: Tomo Suzuki
> Assignee: Tomo Suzuki
> Priority: Major
> Fix For: 2.20.0
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> https://github.com/apache/beam/pull/10769#issuecomment-584571787
> bq. @suztomo can you contribute this script maybe into Beam's build-tools
> directory so we can improve it a bit for further use?
> This is a temporary solution before exclusion rules in Linkage Checker
> (BEAM-9206) are implemented.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)