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

fix: bump up jq version to support arm64 architecture #242

Merged
merged 16 commits into from
Nov 14, 2023

Conversation

mablanco
Copy link
Contributor

@mablanco mablanco commented Nov 8, 2023

What does this PR do?

This PR bumps up jq version to 1.7 as that's the first that includes support for ARM64 architectures, including Apple M1 platforms. It also sorts the tools list so it's easier to manage and troubleshoot.

This fix will allow us to be ready when the upstream patch is merged: AZMCode/asdf-jq#18

Related issues

#241

Checklist before merging

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have checked the contributing document.
  • I have checked the existing Pull Requests to see whether someone else has raised a similar idea or question.
  • I have added tests that prove my fix is effective or that my feature works.

@mablanco mablanco self-assigned this Nov 8, 2023
@mablanco mablanco linked an issue Nov 8, 2023 that may be closed by this pull request
@mablanco mablanco changed the title Bump up jq version to support arm64 architecture fix: bump up jq version to support arm64 architecture Nov 10, 2023
@mablanco mablanco requested review from pablos4nt0s and dublx and removed request for Pehesi97 November 13, 2023 08:39
@mablanco
Copy link
Contributor Author

mablanco commented Nov 13, 2023

I've checked that even if we get the Sadly, there are no official releases for your architecture message, jq is indeed installed (even version 1.6, which also supports arm64 arch). This looks like a deeper issue in upstream (in fact, there should only be one message and the tool installation should fail), but the repository hasn't seen any maintenance in months and issues and PRs linger there unattended.

We may need to look for an alternative to jq in the near future.

@mablanco
Copy link
Contributor Author

I'm going to go back to v1.6 as the jq plugin fails when trying to install v1.7 in Linux based machines (it works in MacOS ARM64, though), getting the following error message curl: (3) URL using bad/illegal format or missing URL.

After further investigation, it seems that the plugin isn't able to correctly parse the information on the new supported architectures in jq 1.7 that it gets from the Github repository. These are the URLs passed to curl for downloading versions 1.6 and 1.7:

1.6
curl -A curl/1.0.0 -H 'Accept: application/json' -fsS -L -o /home/mablanco/.asdf/downloads/jq/1.6/bin/jq https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64

1.7
curl -A curl/1.0.0 -H 'Accept: application/json' -fsS -L -o /home/mablanco/.asdf/downloads/jq/1.7/bin/jq 'https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-amd64 https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-arm64 https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-mips64 https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-mips64el https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-mips64r6 https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-mips64r6el https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-ppc64el https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-riscv64 https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux64'

This issue makes it even more important to discuss the future of the jq plugin in Initium. For now, this PR has served its purpose with several deliverables:

  • Updating the asdf version in static checks
  • Sorting the tools versions file
  • Troubleshooting the jq plugin

@mablanco
Copy link
Contributor Author

mablanco commented Nov 14, 2023

There's an issue opened in upstream describing this problem along with a PR to fix it, but the developer doesn't seem to take care.

@mablanco mablanco merged commit bf3571f into main Nov 14, 2023
8 of 10 checks passed
@mablanco mablanco deleted the fix/update-jq-version branch November 14, 2023 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Apple M1 support when installing the required tooling
2 participants