Closed joschi closed 4 years ago
The scheduled workflow fails here because the java-metadata
branch only exists in my fork of this repository.
See also: https://github.com/joschi/asdf-java/runs/622011631
That's really good job!
@halcyon Should we/How should we move on with this?
@joschi this is an interesting and promising idea. I really like the reduction of complexity, reduction of required dependencies, and concentration of java metadata requests to a single source. I do have some hesitation around increasing our dependence on github (not git, as one can host a git repository anywhere!). I'll be in touch soon to continue the discussion. Thank you for being patient with me as I learn more and consider. As always, I appreciate all your ideas and contributions!
@halcyon actually not need to rely on Github, it can be done by any CI (GitLab is good also, or Travis CI is a good alternative too).
@halcyon actually not need to rely on Github, it can be done by any CI (GitLab is good also, or Travis CI is a good alternative too).
@donbeave how much work would be required to rewrite Github Actions to work on one of these other platforms? Let's include moving java-metadata
in that estimate too, as anything that would cause asdf-java
to need to be hosted elsewhere could impact it too.
The java-metadata
project is very impressive. It pulls down metadata for all architectures across an expanded number of implementations. The number of requests it makes are higher than an individual asdf-java
client, as we currently pull down metadata for the architecture the client is on. While I understand that compared to many clients making independent requests, java-metadata
would result in an overall reduction of requests, it could still be considerably high for the java-metadata
instance.
java-metadata
might hit within Github Actions? java-metadata
have? asdf-java
were to depend upon java-metadata
, would it be a logical next step to consider consolidation?I think these questions better address to @joschi. I didn't check much java-metadata
project, but this PR commits looks quite simple, nothing special I can see here what can not run on GitLab or Travis CI. Only one special feature is required from CI is the ability to run cron jobs, both have this option:
1) https://docs.gitlab.com/ee/ci/pipelines/schedules.html
2) https://docs.travis-ci.com/user/cron-jobs/
Thanks for getting the discussion going!
how much work would be required to rewrite Github Actions to work on one of these other platforms? Let's include moving
java-metadata
in that estimate too, as anything that would causeasdf-java
to need to be hosted elsewhere could impact it too.
Both, java-metadata and the update_data.bash
script in this PR, are bash scripts which could run on pretty much every operating system with bash and some GNU tools. I ran both of them on macOS during development and they are running on Ubuntu 18.04 in the GitHub Actions workflow.
Are there limits, request-rate or otherwise that java-metadata might hit within Github Actions?
It's currently running in a GitHub Free account with 2,000 minutes of execution time per month (https://github.com/pricing).
If there are limits, how much headroom does java-metadata have?
The update is triggered every 6 hours and I haven't seen any problems since starting the project in the beginning of March 2020.
The requests to the collected data are served through GitHub Pages with its respective limits (https://help.github.com/en/github/working-with-github-pages/about-github-pages#guidelines-for-using-github-pages), e. g. a soft bandwidth limit of 100GB per month.
In the unlikely case that this would be exceeded, it would still be possible to put a CDN in front of these files.
With regards to asdf-java
, it might be useful to put the generated TSV files into a separate branch and serve them through GitHub Pages.
If
asdf-java
were to depend uponjava-metadata
, would it be a logical next step to consider consolidation?
I don't think it's necessary or a logical next step since the goals of asdf-java
and java-metadata are quite different.
Of course you're free to fork java-metadata and run it yourself.
@halcyon Do you have other questions about or around this PR?
It would also resolve the following issues and PRs:
how much work would be required to rewrite Github Actions to work on one of these other platforms? Let's include moving
java-metadata
in that estimate too, as anything that would causeasdf-java
to need to be hosted elsewhere could impact it too.Both, java-metadata and the
update_data.bash
script in this PR, are bash scripts which could run on pretty much every operating system with bash and some GNU tools. I ran both of them on macOS during development and they are running on Ubuntu 18.04 in the GitHub Actions workflow.
My question has nothing to do with changing operating systems. I asked about the impact this would have on our ability to change hosting. I'm concerned about the tighter coupling and increased vendor lock-in with GitHub.
Are there limits, request-rate or otherwise that java-metadata might hit within Github Actions?
It's currently running in a GitHub Free account with 2,000 minutes of execution time per month (https://github.com/pricing).
It's good to know that GitHub Actions currently has generous head-room for the number of minutes of execution. I'm unconcerned with the nominal traffic used by asdf-java
clients querying GitHub Pages. However, I am concerned about the far larger, and ever increasing ingress traffic used within GitHub Actions by java-metadata.
My question has nothing to do with changing operating systems.
I understood your question being about runtime environments.
And my response was: Both scripts (update_data.bash
in this project and java-metadata
as a whole) will run in any *nix-like environment which provides Bash 5.x and some additional programs (sed, perl, curl, jq, jo).
The GitHub Actions workflows are executing those scripts, not more.
@halcyon Do you have other questions about or around this PR?
It would also resolve the following issues and PRs:
45/#47 (as well as other machine architectures: list)
57
61/#67
90
93
Current output on macOS
Despite my reservations around vendor lock-in, I think this is an innovative approach and has a lot of promise. I appreciate this work, and apologize for not getting back with you sooner. I've done a lot of thinking, and for the next steps I'd like to see asdf-java
do the data collection directly that java-metadata
is doing. This would enable asdf-java
to continue to be a stand-alone project, which I think is important to facilitating future support requests and keeping complexity to a minimum.
hey guys @joschi @halcyon sorry for interrupting, any updates on that? looks really promising! i will switch to that feature branch for now
@alex-popov-tech I've been tracking the PR in the master
branch of https://github.com/joschi/asdf-java/ in which the release data is being updated regularly, if you want to give it a test drive.
@joschi it's better with your master
I can see and install the version adoptopenjdk-11.0.7+10.1
The name changed from adopt-openjdk-11.0.7+10
which is a bit disturbing because asdf is failing to install adopt-openjdk-11.0.7+10
with the error
curl: Remote file name has no length!
curl: try 'curl --help' or 'curl --manual' for more information
(It might be great to handle it more gracefully if possible).
Otherwise it's good
@aheritier Good suggestion, thanks!
I've updated the branch to print an error message and exit the installation script if the release wasn't found:
# asdf install java zulu-14.99
Unknown release: zulu-14.99
perfect @joschi Thanks a lot
@joschi is this ready to be merged?
i just verified that my case works on that branch
@joschi is this ready to be merged?
@halcyon With the latest commit (which makes this PR fail because the upstream TSV files aren't there yet) it's good to merge, in my opinion.
Instead of fetching the release data of each OpenJDK distribution separately and parsing the individual formats or maintaining a list of releases manually (Amazon Corretto, Zulu Community), this PR introduces the use of a central release "database".
The release data in the
./data
directory is updated automatically by a scheduled GitHub Actions workflow and the clients only have to fetch the respective text file from GitHub (in TSV format).This has the following advantages:
jq
on the clientDisclaimer: The source of the Java release metadata is a project of mine. https://joschi.github.io/java-metadata/index.html