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

Support template branch input app-build-verify workflow #64

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

rmartin16
Copy link
Member

Changes

  • The app-build-verify workflow currently supports an input for --template for briefcase new
  • This adds the ability to specify --template-branch as well

Notes

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@rmartin16
Copy link
Member Author

rg-adguard is returning 403....but it's working for me locally. I wonder if their API is rate-limiting GitHub or something....

This'll replicate what CI does to install winstore python:

$WebResponse = Invoke-WebRequest -UseBasicParsing -Method 'POST' -Uri 'https://store.rg-adguard.net/api/GetFiles' -Body "type=url&url=https://apps.microsoft.com/store/detail/python-310/9PJPW5LDXLZ5&ring=Retail" -ContentType 'application/x-www-form-urlencoded'
$DownloadURL = ($WebResponse.Links | where {$_ -like '*.msix*'} | where {$_ -like '*_neutral_*' -or $_ -like "*_"+$env:PROCESSOR_ARCHITECTURE.Replace("AMD","X").Replace("IA","X")+"_*"} | Select-String -Pattern '(?<=a href=").+(?=" r)').matches.value
Invoke-WebRequest -Uri $DownloadURL -UseBasicParsing -OutFile .\python-3.10.appx

@rmartin16
Copy link
Member Author

rmartin16 commented Nov 10, 2023

Debugging this...looks like the request to store.rg-adguard.net/api is failing a Cloudflare challenge...

I tried accessing only the sub-domain without the API path in the URL and got the same result...so, Cloudflare is blocking the entire domain for GitHub runners.

As for impact, this will cause any workflow to fail that hasn't cached the Python Appx (repos with a cached Appx bypass this API call, altogether). Although, the Appx cache will expire at the end of the month and will cause all workflows to fail if this error isn't mitigated by then.

Response details
IsMutuallyAuthenticated : False
Cookies                 : {}
Headers                 : {Transfer-Encoding, Connection, Cross-Origin-Embedder-Policy, Cross-Origin-Opener-Policy...}
SupportsHeaders         : True
ContentLength           : -1
ContentEncoding         : 
ContentType             : text/html; charset=UTF-8
CharacterSet            : UTF-8
Server                  : cloudflare
LastModified            : 11/10/2023 4:02:44 PM
StatusCode              : Forbidden
StatusDescription       : Forbidden
ProtocolVersion         : 1.1
ResponseUri             : https://store.rg-adguard.net/api/GetFiles
Method                  : POST
IsFromCache             : False
Response body
<!DOCTYPE html>
<html lang="en-US">
<head><title>Just a moment...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="robots" content="noindex,nofollow">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">
    <meta http-equiv="refresh" content="375">
</head>
<body class="no-js">
<div class="main-wrapper" role="main">
    <div class="main-content">
        <noscript>
            <div id="challenge-error-title">
                <div class="h2"><span class="icon-wrapper"><div class="heading-icon warning-icon"></div></span><span
                        id="challenge-error-text">Enable JavaScript and cookies to continue</span></div>
            </div>
        </noscript>
    </div>
</div>
<script>(function () {
    window._cf_chl_opt = {
        cvId: '2',
        cZone: "store.rg-adguard.net",
        cType: 'managed',
        cNounce: '94028',
        cRay: '823f83289d3028c4',
        cHash: '0bc09965a792945',
        cUPMDTk: "\/api\/GetFiles?__cf_chl_tk=M6_lR8FUW6MTNvQXrD8vjXsEr1jy_p4h7Ycc501kMTA-1699632067-0-gaNycGzNCxA",
        cFPWv: 'g',
        cTTimeMs: '1000',
        cMTimeMs: '375000',
        cTplV: 5,
        cTplB: 'cf',
        cK: "visitor-time",
        fa: "\/api\/GetFiles?__cf_chl_f_tk=M6_lR8FUW6MTNvQXrD8vjXsEr1jy_p4h7Ycc501kMTA-1699632067-0-gaNycGzNCxA",
        md: "97UxJmg11jDq68zJDk.xgyAMkmZ6mbn0PwnRpatTKgU-1699632067-0-ATfS-PhNOpwRCcwXPR_4tQR2BCxOcB45OOVV9y6RzJPBnn38hiKsEIhXl2DRWDrgEkNdU0hqifw25E3g8Osr-q_o2psu35UGY92H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v4RUtJa7f3vO9TNpp5RFBhuRrJF2JB8WZGwui9K35wlEOqxFolN4XglPx7kRPOpAH3JWHAQNW7gZjC+sqmjTz9+sYawWqTO/uURMKYps09mIz3sAhfAk7WbucnObLEzYvAJ80Ma37Lo2po8nAkz36fgBjWVWgBPeJrdff3RoZEO8WAXM0gxiY5eLxBF99wk+Vm9+HA=',
            t: 'MTY5OTYzMjA2Ny45MzgwMDA=',
            cT: Math.floor(Date.now() / 1000),
            m: 'c6ov3bnVzJ/7qvqaNinUqD9aMPqcSWuymnDRCxv6xL4=',
            i1: 'p2WXRJEfakW1Tnsajuxo1A==',
            i2: '+ggkdWZfMa9BhzuOmmD4Ng==',
            zh: 'HLxGWAUlwuhyrmyS5vOcmTOYXuhv+MynXRgx2Stwurw=',
            uh: '1hSkgbLNKHpVLUW7r+U1A8IiZzTlXxNAinf6EXXAfRQ=',
            hh: 'tGysNA2DmC2gPh0yPCBYfyXsXPve4HXQJ18dNnlM08U=',
        }
    };
    var cpo = document.createElement('script');
    cpo.src = '/cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1?ray=823f83289d3028c4';
    window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
    window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;
    if (window.history && window.history.replaceState) {
        var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
        history.replaceState(null, null, "\/api\/GetFiles?__cf_chl_rt_tk=M6_lR8FUW6MTNvQXrD8vjXsEr1jy_p4h7Ycc501kMTA-1699632067-0-gaNycGzNCxA" + window._cf_chl_opt.cOgUHash);
        cpo.onload = function () {
            history.replaceState(null, null, ogU);
        }
    }
    document.getElementsByTagName('head')[0].appendChild(cpo);
}());</script>
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317"
        integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA=="
        data-cf-beacon='{"rayId":"823f83289d3028c4","version":"2023.10.0","r":1,"token":"ed2924b011204d5191434536ed866322","b":1}'
        crossorigin="anonymous"></script>
</body>
</html>

@rmartin16
Copy link
Member Author

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

👍

@freakboy3742 freakboy3742 merged commit d908d34 into beeware:main Nov 14, 2023
53 checks passed
@rmartin16 rmartin16 deleted the gui-plugin-support branch November 14, 2023 02:00
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.

2 participants