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

Add lts tag #32

Merged
merged 4 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ permissions:
env:
aws_region: us-east-1
s3_bucket: julialang2

JULIA_LTS: 1.10
Copy link
Member

@IanButterworth IanButterworth Jan 28, 2025

Choose a reason for hiding this comment

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

I think this should be JULIA_LTS: '1.10'

It's being parsed as 1.1

  "lts": {
    "files": [
      {
        "url": "https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.1-linux-x86_64.tar.gz",
        "triplet": "x86_64-linux-gnu",
        "kind": "archive",
        "arch": "x86_64",
        "asc": "-----BEGIN PGP SIGNATURE-----\n\niQJLBAABCAA1FiEENnPfUp2QSUd/drN1ZuPH3APW5JUFAlzd++YXHGJ1aWxkYm90\nQGp1bGlhbGFuZy5vcmcACgkQZuPH3APW5JWMdBAAqAkxwCdj90gUsDqfsWhpdzXx\nqx2JEu+Rr+8p5hKeYVaRBNvTt+Z9+YVpLlmGBiJrWqjj7H0Crdko3cWkqewA5O0v\nYdlB1Kvz5Fqmb5pVFBeSf6vu6zQQg3VPdhUlFc2/oS7Bz6XcPpJFLt5t5N+0kzUH\nkB/2INtAIS/KrpkrQcTahzGOr/OIfl9UaBlqoTX8icPCNmVfKRDbPY4gCKa5GX6n\nu9VNixXw04bApvD2BQDVg5ZBWUxpW6plVAPcSXSy86YBW+BPoqCcDY/o2KynBnBy\nz0jDLEz6mpVSwFizQiG17830bbgDeP557pJXeIW0g6LB2k+aISU/4WrpdVk2Z45W\nQnUJgt876dlmyKVmQnuuQCkyNEporDcHqhYVr53hGX3RqzFA6UF1DO89a1T9T73T\nYKrtRAkxl8TADKNij7UjtgtfKKWGRSnhQIttWOZO8V/uzFYEqkWpwSUUVyEt0ZST\nR/F8MnjVc63KzLOeyfKDPQHIE2xdXBkGIKJkDDBsYTd79QqaQOFm/1KchBUVyNur\n5AOrSaHlV/2Y0CQSa6PBdROAxazLpiEdUfSjEz+Yi9aDo6T+S5o+rvY3gmUhVMuo\n2nnLJjR+JE+xCcY8Y2BKaWX30luzOLFTn5/ZhzHGsnyFBuxnYV9hbrAQ/zjfjlFL\nt8ktBsewpRZhaC8SJJ8=\n=yNmM\n-----END PGP SIGNATURE-----\n",
        "sha256": "f0a83a139a89a2ccf2316814e5ee1c0c809fca02cbaf4baf3c1fd8eb71594f06",
        "size": 89727957,
        "version": "1.1.1",
        "os": "linux",
        "extension": "tar.gz"
      },

From https://julialang-s3.julialang.org/bin/versions.json
versions.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix in a follow-up pr once the Buildkite issue is resolved (#36 for now)!

Copy link
Member

Choose a reason for hiding this comment

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

@DilumAluthge and I are also discussing that maybe it'd be less breaking to downstream consumers to just make this a field, like "stable" and we enforce that there's only one LTS when generating the file

Copy link
Member

Choose a reason for hiding this comment

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

Then consumers can just parse and find the first "lts": true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That should be relatively trivial to implement, I can reuse some of the logic from the previous pr! I can make such a pr soon if that's okay with you.


jobs:
package-tests:
name: Package tests
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ More info: https://github.com/JuliaLang/julia/issues/33817
To trigger a rebuild of the `versions.json` file and to upload it to S3, you need to manually trigger the `CI` workflow in this repo.
You can either trigger it through the GitHub UI or via an authenticated HTTP request.

The current Julia LTS release is set via the `JULIA_LTS` variable in the [CI workflow](.github/workflows/CI.yml).

### GitHub's UI

![grafik](https://user-images.githubusercontent.com/20866761/127783220-fd8167db-5051-4a18-b70a-ea42085a7cb5.png)
Expand Down
11 changes: 11 additions & 0 deletions src/VersionsJSONUtil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ function is_stable(v::VersionNumber)
return v.prerelease == () && v.build == ()
end

function is_lts(v::VersionNumber)
lts = VersionNumber(ENV["JULIA_LTS"])
return lts.major === v.major && lts.minor === v.minor && isempty(v.prerelease)
end

# Get list of tags from the Julia repo
function get_tags()
@info("Probing for tag list...")
Expand Down Expand Up @@ -240,6 +245,12 @@ function main(out_path)
rm(filepath)
end
end
@info("Adding lts entry...")
lts_version = maximum(filter(is_lts, keys(meta)))
push!(meta, "lts" => meta[lts_version])
open(out_path, "w") do io
JSON.print(io, meta, 2)
end
@info "Tried $(number_urls_tried) versions, successfully downloaded $(number_urls_success)"
end

Expand Down
Loading