Skip to content

Commit

Permalink
Update from app.vagrantup.com to vagrantcloud.com
Browse files Browse the repository at this point in the history
As <hashicorp#13571 (comment)>
mentioned:

> After further debug, this looks like a change introduced in HCP
> Vagrant Registry after 2025-01-09, that broke Vagrant versions before
> 2.4.0. I could confirm that everything works fine with Vagrant 2.4.0
> (and later), but fails to work with Vagrant 2.3.7 (and earlier). The
> root cause is that Vagrant 2.3.7 uses the equivalent of curl
> --location --verbose -H "Accept: application/json"
> <https://vagrantcloud.com/debian/bookworm64> to fetch the box
> metadata, but this no longer returns a JSON document. Vagrant 2.4.0
> uses <https://vagrantcloud.com/api/v2/vagrant/debian/bookworm64>
> instead.

This PR replace most
<https://developer.hashicorp.com/vagrant/vagrant-cloud/api/v2> URL from
existing <https://app.vagrantup.com> to <https://vagrantcloud.com>.

Fixes <hashicorp#13571>
Fixes <hashicorp#13574>
Fixes <hashicorp#13575>

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
  • Loading branch information
hswong3i committed Jan 18, 2025
1 parent a1ceec1 commit cfe1707
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 122 deletions.
2 changes: 1 addition & 1 deletion internal/core/box_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func hashicorpBionicBoxData() *vagrant_server.Box {
Version: "0.0.282",
Directory: "/tmp/boxes",
Metadata: testMetadata,
MetadataUrl: "https://app.vagrantup.com/hashicorp/boxes/bionic64.json",
MetadataUrl: "https://vagrantcloud.com/hashicorp/boxes/bionic64.json",
Name: "hashicorp/bionic64",
LastUpdate: timestamppb.Now(),
}
Expand Down
2 changes: 1 addition & 1 deletion test/vagrant-spec/Vagrantfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enabled_providers.each do |provider_name|
box_path = File.join(File.dirname(__FILE__), "./boxes/#{guest_box.sub('/', '_')}.#{provider_name}.#{box_version}.box")
if !File.exist?(box_path)
$stderr.puts "Downloading guest box #{guest_box}"
cmd = "curl -Lf -o #{box_path} https://app.vagrantup.com/#{box_owner}/boxes/#{box_name}/versions/#{box_version}/providers/#{provider_name}.box"
cmd = "curl -Lf -o #{box_path} https://vagrantcloud.com/#{box_owner}/boxes/#{box_name}/versions/#{box_version}/providers/#{provider_name}.box"
if vagrantcloud_token
cmd += "?access_token=#{vagrantcloud_token}"
end
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/boxes/format.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ There are four different components that make up a box:
So, if you extract a box and look at it's contents it will look like:
```
# contents of the hashicorp/bionic64 box
# ref: https://app.vagrantup.com/hashicorp/boxes/bionic64
# ref: https://vagrantcloud.com/hashicorp/boxes/bionic64
$ ls hashicorp_bionic_box
Vagrantfile metadata.json
box.ovf ubuntu-18.04-amd64-disk001.vmdk
Expand Down
Loading

0 comments on commit cfe1707

Please sign in to comment.