- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.1k
 
Closed
Labels
ClientThis issue is related to a non-management packageThis issue is related to a non-management packageCodeGenIssues that relate to code generationIssues that relate to code generationneeds-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK team
Description
Github 301 redirects to a 404. It looks like it could be caused by a Github redirect bug.
The code generates, but you end up with this in the mgmtmetadata:
f5831c8#diff-8d6de8e1f29e666181b989e7f10c8e76787d865dd28b0af263b7c0e59329fb5aL3-L18
The workaround is to specify the main branch.
f5831c8#diff-bde725d150ac97bd98d0855ac5a6dbe7d4f27d39c7d02180187066783c8981fdR1
I turned on HTTPS_PROXY to diagnose:
Github is redirecting to repositories instead of repos like it probably should:
PS C:\Users\cataggar\io\avs\src\fct> curl https://api.github.com/repos/Azure/azure-rest-api-specs/branches/master -I -L
HTTP/1.1 301 Moved Permanently
Server: GitHub.com
Date: Fri, 12 Nov 2021 01:21:46 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 195
Location: https://api.github.com/repositories/Azure/azure-rest-api-specs/branches/main
X-GitHub-Media-Type: github.v3; format=json
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Content-Security-Policy: default-src 'none'
Vary: Accept-Encoding, Accept, X-Requested-With
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 54
X-RateLimit-Reset: 1636682989
X-RateLimit-Resource: core
X-RateLimit-Used: 6
X-GitHub-Request-Id: EFE1:76BD:28D0BE:B05E1A:618DC1AA
HTTP/1.1 404 Not Found
Server: GitHub.com
Date: Fri, 12 Nov 2021 01:21:46 GMT
Content-Type: application/json; charset=utf-8
X-GitHub-Media-Type: github.v3; format=json
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Content-Security-Policy: default-src 'none'
Vary: Accept-Encoding, Accept, X-Requested-With
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 53
X-RateLimit-Reset: 1636682988
X-RateLimit-Resource: core
X-RateLimit-Used: 7
Content-Length: 84
X-GitHub-Request-Id: EFE1:76BD:28D0C0:B05E26:618DC1AA
PS C:\Users\cataggar\io\avs\src\fct> curl https://api.github.com/repos/Azure/azure-rest-api-specs/branches/main -I
HTTP/1.1 200 OK
Server: GitHub.com
Date: Fri, 12 Nov 2021 01:23:19 GMT
Content-Type: application/json; charset=utf-8
Cache-Control: public, max-age=60, s-maxage=60
Vary: Accept, Accept-Encoding, Accept, X-Requested-With
ETag: W/"5b02fd565d39dfb561aa03a2a954c9a039ef4e34b35af16bf9e8751f70df1388"
X-GitHub-Media-Type: github.v3; format=json
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Content-Security-Policy: default-src 'none'
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 52
X-RateLimit-Reset: 1636682988
X-RateLimit-Resource: core
X-RateLimit-Used: 8
Accept-Ranges: bytes
Content-Length: 5938
X-GitHub-Request-Id: ECF6:7D13:12CBE04:29BF121:618DC207Metadata
Metadata
Assignees
Labels
ClientThis issue is related to a non-management packageThis issue is related to a non-management packageCodeGenIssues that relate to code generationIssues that relate to code generationneeds-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK team
