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

List issue tracker website link on package page #211

Open
snoyberg opened this issue Nov 7, 2016 · 13 comments
Open

List issue tracker website link on package page #211

snoyberg opened this issue Nov 7, 2016 · 13 comments

Comments

@snoyberg
Copy link
Contributor

snoyberg commented Nov 7, 2016

Also would be nice: detect if a package has a Github repo, and include an explicit Github link

@pythonissam
Copy link

We are trying to contribute to this. After adding necessary changes, we tried to build a server locally, and being stuck with this error:

SqlError {sqlState = "42P01", sqlExecStatus = FatalError, sqlErrorMsg = "relation \"snapshot\" does not exist", sqlErrorDetail = "", sqlErrorHint = ""}

What we did is:

  • installed PostgreSQL on local
  • Created a user stackage with same password as user's name
  • Created a Stackage DB

Can you help us resolve this error? Thank you.

@snoyberg
Copy link
Contributor Author

snoyberg commented Aug 6, 2018

Sorry about that, the docs are out of date. You'll need to run the cron job to create and populate the database. Can you try stack exec stackage-server-cron? You'll need to export PGSTRING=... first.

@pythonissam
Copy link

We tried stack exec stackage-server-cron, but it requires credential...

@snoyberg
Copy link
Contributor Author

You'd have to give it the credentials for your local server.

@pythonissam
Copy link

@snoyberg Hmm... then, can you think of anything about this error?

$ stack exec stackage-server-cron
stackage-server-cron: MissingFileError "/home/bm12/.aws/credentials"

@lehins
Copy link
Contributor

lehins commented Aug 25, 2018

@pythonissam This is how amazonka normally works: AWS credentials are extracted form the environment in a similar way that aws-cli does it: you can either place them in
$HOME/.aws/credentials in format:

[default]
aws_secret_access_key=...
aws_access_key_id=...

or set them as environment variables
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

@psibi
Copy link
Member

psibi commented Aug 25, 2018

@lehins I think @pythonissam is trying to setup stackage server locally. Is that possible ?

@lehins
Copy link
Contributor

lehins commented Aug 25, 2018

@psibi I am not really sure, as I never dealt with stackage insides before, but by taking a quick look at the script: https://github.com/fpco/stackage-server/blob/master/src/Stackage/Database/Cron.hs#L78, one of the things it's trying to do is upload a snapshot.json file and hoogledb onto an S3 bucket with name "haddock.stackage.org", which kinda needs AWS credentials ;)

I am just familiar with an error @pythonissam is getting, so I decided to comment with a way it can be solved.

@psibi
Copy link
Member

psibi commented Aug 25, 2018

@lehins Thanks for the explanation!

@pythonissam Running stackage-server locally seems slight problematic now: d7a0371

I'm working on this to resolve this so that stackage-server can be built locally without any issues. I will submit a PR in a couple of days. But if you are curious to try, I have updated the README and the code to work in my experimental branch: https://github.com/psibi/stackage-server/tree/local-installation

@psibi
Copy link
Member

psibi commented Aug 25, 2018

I have created a PR which will hopefully make installation of stackage-server locally easy: #257

@develop7
Copy link
Contributor

develop7 commented Dec 4, 2019

@psibi the PR has been merged, but the "missing file .aws/credentials" error is still there; was that intentional?

@lehins
Copy link
Contributor

lehins commented Dec 4, 2019

@develop7 stackage-server-cron has changed quite a bit since that PR has been merged. Unfortunately aws credentials file is required for the cron job due to amazonka, there is no way around it, since it relies heavily on S3.

What you can try is placing an empty file in .aws/credentials and running the cron job with --do-not-upload flag, which will only use AWS S3 for looking at haddock files, but will not try to upload any hoogle related files, which then will not rely on actual credentials being valid. (Another hacky way would be setting AWS_ variables to bogus values.)

The point is that the requirement of credentials being present comes from amaznoka, not from stackage-server, despite that they might not be used (eg. --do-not-upload is passed)

@develop7
Copy link
Contributor

develop7 commented Dec 5, 2019

@lehins empty credentials file was not enough, only bogus credentials and --do-not-upload did the job. Thank you for the tip.

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

5 participants