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

github-bot: add $LOGS_DIR env variable #602

Merged
merged 1 commit into from
Jan 30, 2017

Conversation

phillipj
Copy link
Member

@phillipj phillipj commented Jan 29, 2017

We've had an issue with all logs written by the github-bot being deleted whenever the bot is re-deployed. That's especially bad when we want to debug issues happening a few days ago, which would be impossible if we've done a re-deploy in between.

The root cause of that issue is that we clone the github-bot repo onto the server and write logs to ./logs of that cloned repo. Whenever we re-deploy we run git clean -fdx before updating the repo, resulting in any untracked files to be deleted.

By adding a $LOGS_DIR pointing to a directory outside the git repo,
will prevent logs being deleted cause of re-deploys.

P.S. we haven't added support for $LOGS_DIR in the bot yet, will do that as soon as this lands.

We've had an issue with all logs written by the github-bot being
deleted whenever the bot is re-deployed. That's especially bad when
we want to debug issues happening a few days ago, which would be
impossible if we've done a re-deploy in between.

The root cause of that issue is that we clone the github-bot repo
onto the server and write logs to `./logs` of that cloned repo.
Whenever we re-deploy we run `git clean -fdx` before updating the repo,
resulting in any untracked files to be deleted.

By adding a `$LOGS_DIR` pointing to a directory *outside* the git repo,
will prevent logs being deleted cause of re-deploys.
phillipj added a commit to phillipj/github-bot that referenced this pull request Jan 29, 2017
The main objective behind these changes are to not write logs into the
project's `./logs` directory, cause that ends up being deleted whenever
the bot is re-deployed.

Requires deployment changes: nodejs/build#602
phillipj added a commit to phillipj/github-bot that referenced this pull request Jan 29, 2017
The main objective behind these changes are to not write logs into the
project's `./logs` directory, cause that ends up being deleted whenever
the bot is re-deployed.

Requires deployment changes: nodejs/build#602
jbergstroem

This comment was marked as off-topic.

@phillipj
Copy link
Member Author

Yupp, and it's already there. The auto deployment hook we've got puts a log file there.

github-bot/ansible-playbook.yaml#L45 & github-bot/ansible-vars.yaml#L10

jbergstroem

This comment was marked as off-topic.

@phillipj phillipj merged commit a724f4e into nodejs:master Jan 30, 2017
@phillipj phillipj deleted the gh-bot-logs-dir branch January 30, 2017 19:26
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