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

Repository maintenance not recognized #271

Closed
reststop opened this issue May 17, 2016 · 1 comment
Closed

Repository maintenance not recognized #271

reststop opened this issue May 17, 2016 · 1 comment

Comments

@reststop
Copy link

reststop commented May 17, 2016

Buildasaur works fine when a given response returns a maintenance window message, however the log is then littered with all manner of HTTP and CSS text. I'm sure we don't want to parse the possible maintenance window messages, but it does happen and BUildasaur ought to recognize the problem and act accordingly instead of failing so verbosely before eventually recovering and resuming
(maybe not in GitHub, but I have seen it on Bitbucket, and more than likely on any in-house servers: Bitbuket Server, GitHub Enterprise, GitLab, Stash.

If there is an API to check for availability, this would be a good thing to add. (I don't know if any of the services have an API, or if the current HTTPS: request returns any kind of redirect, but I have seen in our "Builda.log" messages similar to the one below. I've truncated it, but it can be lengthy.

Builda.log.zip

[INFO]: Sync starting at 2016-05-13 17:50:57 +0000
[ERROR]: Syncing encountered a problem. Error: Wrong body Optional(




You have reached Stash during a maintenance window. We apologize for the inconvienence. Please try again later.

...

or

[INFO]: Sync starting at 2016-05-13 18:04:57 +0000
[ERROR]: Syncing encountered a problem. Error: Wrong body Optional(







    
    
    <title>Atlassian Stash - Starting</title>
    <style>
        * {
            box-sizing: border-box;
        }

        body {
            background-color: #F0F0F0;
            color: #666666;
            text-align: center;
            margin-top: 90px;
            font-family: sans-serif;
            font-size: 18px;
            line-height: 1.3;
        }

...
                        
                            

...
            background: url(data:image/svg
**Many Lines of base 64 data**
);

@czechboy0
Copy link
Member

Interesting, Buildasaur is stateless, so it'll try to ask the server for the data every 30 seconds (or however frequent your sync interval is). It does seem verbose, but it's an error, unexpected state, so I think logging it is the best thing to do.

I'd be fine if you file a PR that detects this case specifically for BitBucket servers and prints less, but I won't have time to do this myself.

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

No branches or pull requests

2 participants