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

[WIP] use cosmos db emulator #941

Closed
wants to merge 10 commits into from
Closed

Conversation

marpio
Copy link
Member

@marpio marpio commented Nov 22, 2018

What is the problem I am trying to address?

Azure pipelines builds are slow b/c we need to install mongodb

How is the fix applied?

Use Azure Cosmos DB emulator insead

Mention the issue number it fixes or add the details of the changes if it doesn't have a specific issue.

No issue

@marpio marpio requested a review from a team as a code owner November 22, 2018 10:19
@codecov-io
Copy link

codecov-io commented Nov 22, 2018

Codecov Report

Merging #941 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #941   +/-   ##
=======================================
  Coverage   59.99%   59.99%           
=======================================
  Files          75       75           
  Lines        2327     2327           
=======================================
  Hits         1396     1396           
  Misses        800      800           
  Partials      131      131
Impacted Files Coverage Δ
pkg/storage/mongo/mongo.go 50% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c097fc8...23635a7. Read the comment docs.

@marpio marpio changed the title use cosmos db emulator [WIP] use cosmos db emulator Nov 22, 2018

- powershell: |
go test -mod=vendor -race ./...
env:
ATHENS_MINIO_ENDPOINT: "127.0.0.1:9001"
ATHENS_MONGO_STORAGE_URL: "127.0.0.1:27017"
ATHENS_MONGO_INSECURE: "true"
ATHENS_MONGO_STORAGE_URL: "mongodb://localhost:C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==@localhost:10255/admin?ssl=true"
Copy link
Member

Choose a reason for hiding this comment

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

Just a thought in mind. If we are using an emulator, we might want to check if the indices when the tests start, they should not have any documents or modules in it, so that our integration tests do not give a false success.

@manugupt1
Copy link
Member

oops! I updated it on wrong branch!

@@ -56,7 +56,7 @@ func (m *ModuleStore) connect() error {

func (m *ModuleStore) initDatabase() error {
// TODO: database and collection as env vars, or params to New()? together with user/mongo
m.d = "athens"
m.d = "admin"
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about fixing up the TODO above instead of changing this? I know that this would break a lot of deployments that already use mongo storage (including https://athens.azurefd.net)

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 Sure, I couldn't figure out how to talk to the emulator and I tried things out. It wasn't meant to stay here like this.

@marpio
Copy link
Member Author

marpio commented Jan 3, 2019

I'm closing this - we should probably try again using docker.

@marpio marpio closed this Jan 3, 2019
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.

None yet

4 participants