On Sat, 27 Apr 2024 01:15:45 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>>> Thank you for those details @sendaoYan.
>>> 
>>> Adding `-L` (follow redirects) to unconditionally follow redirects doesn't 
>>> look right to me. I think, one would want to know, during the build 
>>> process, if any URLs that are in use (like this one) have changed their 
>>> location and then decide if the build script should be updated to point to 
>>> the new URL. I'll let the build team decide if this is OK to change. I 
>>> don't know anything about the server (Maven mirror?) you are using that's 
>>> generating this redirect, to suggest a workaround.
>> 
>> @jaikiran Hello
>>   The `maven.aliyun.com` always redirects to a new OSS URL everytime, and 
>> the OSS URL will expired in 3600 secnods, as show below:
>> 
>> yansendao@j66e07344:[tmp]> date +%s
>> 1714148237
>> yansendao@j66e07344:[tmp]> curl -OL -v --fail 
>> https://maven.aliyun.com/repository/public/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar
>>  2>&1 | grep '> GET'
>>> GET /repository/public/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar 
>>> HTTP/2
>>> GET 
>>> /repository/central/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar?Expires=1714151841&OSSAccessKeyId=LTAIfU51SusnnfCC&Signature=%2BU29N2ems10WCjO%2FhhLJm6tT6tU%3D
>>>  HTTP/1.1
>> yansendao@j66e07344:[tmp]> curl -OL -v --fail 
>> https://maven.aliyun.com/repository/public/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar
>>  2>&1 | grep '> GET'
>>> GET /repository/public/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar 
>>> HTTP/2
>>> GET 
>>> /repository/central/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar?Expires=1714151845&OSSAccessKeyId=LTAIfU51SusnnfCC&Signature=iu2IfGjRq2p2PZJ6zMg8DtqWg%2Fg%3D
>>>  HTTP/1.1
>> 
>>   So we can't use the final URL in script, because it will expired in short 
>> time.
>>   By the way, the 
>> [make/devkit/createGraphvizBundle.sh](https://github.com/openjdk/jdk/blob/master/make/devkit/createGraphvizBundle.sh#L93)
>>  file already use `curl -L`
>> 
>>> grep curl make/devkit/createGraphvizBundle.sh
>>         curl -L -o "${file}" "${url}"
>
> Hello @sendaoYan, I hadn't checked whether we already have such usage in our 
> build scripts. Thank you for pointing me to it. 
> 
> Erik's review is what matters here and he's explained that this change is OK 
> and has approved the PR. So you can go ahead with this proposed change.

@jaikiran @erikj79 Thanks for the review.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18965#issuecomment-2080638052

Reply via email to