Code Monkey home page Code Monkey logo

Comments (10)

ramereth avatar ramereth commented on June 8, 2024 1

Thanks for the feedback. I'll need to take a look at this closer and see what the best fix might be.

from java.

ramereth avatar ramereth commented on June 8, 2024 1

Can everyone please see if #632 resolves your problem?

from java.

ramereth avatar ramereth commented on June 8, 2024

@miba072 I can't seem to replicate this on my end. Can you please provide an example recipe which replicates this?

from java.

miba072 avatar miba072 commented on June 8, 2024

I just found out that it seems to be somehow related to custom URLs. If I use it like this then it works as intended:

adoptopenjdk_install 8 do
  variant 'hotspot'
  default true
  alternatives_priority 1
end

However if I specify a custom URL then it starts exhibiting the issue I mentioned:
(URL changed)

adoptopenjdk_install 8 do
  variant 'hotspot'
  url 'https://internal.asset.path/to/java/OpenJDK8U-jdk_x64_linux_hotspot_8u232b09.tar.gz'
  checksum 'b830c55431faeefd955d7baf4b25571faccfcc79f600848e9fd937dc9fe6ae2a'
  default true
  alternatives_priority 1
end

from java.

bkonick avatar bkonick commented on June 8, 2024

I am seeing this as well. I believe the problem is here.

The URL we use is similar to the example @miba072 posted and when I parse the URI in irb the same way the line above does, I get java as the output. Enforcing a folder structure on people using custom URLs is probably not a great idea.

Here's output for reference:

Working (default URL)

irb(main):006:0> uri.path
=> "/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz"
irb(main):007:0> uri.path.split('/')[-2]
=> "jdk8u242-b08"

Not working (custom URL)

irb(main):003:0> uri.path
=> "/artifactory/java/OpenJDK8U-jdk_x64_linux_hotspot_8u265b01.tar.gz"
irb(main):004:0> uri.path.split('/')[-2]
=> "java"

from java.

bkonick avatar bkonick commented on June 8, 2024

Thanks @ramereth! I was trying to think about solutions a bit this afternoon. Seems like we might need to revive the functionality of this method.

from java.

ramereth avatar ramereth commented on June 8, 2024

I was able to reproduce this by doing the following:

adoptopenjdk_install '8' do
  variant 'hotspot'
  url 'http://ftp.osuosl.org/pub/osl/sous-chefs/OpenJDK8U-jdk_x64_linux_hotspot_8u232b09.tar.gz'
  checksum '7b7884f2eb2ba2d47f4c0bf3bb1a2a95b73a3a7734bd47ebf9798483a7bcc423'
  default true
  alternatives_priority 1
end

from java.

bkonick avatar bkonick commented on June 8, 2024

Can everyone please see if #632 resolves your problem?

Just tried it out. Works perfectly!

from java.

bkonick avatar bkonick commented on June 8, 2024

Can everyone please see if #632 resolves your problem?

Just tried it out. Works perfectly!

Ah nuts. I mistakenly ran the test for 8 only. Didn't seem to work for 11 on my end 🤔

from java.

detjensrobert avatar detjensrobert commented on June 8, 2024

@bkonick What does the filename for 11 look like? OpenJDK11U-jdk_x64_linux_hotspot_11u###b##.tar.gz? I think I know what the problem is with how I handled it.

from java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.