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

Solution: Storage Adapter #313

Merged
merged 1 commit into from
Apr 5, 2018
Merged

Solution: Storage Adapter #313

merged 1 commit into from
Apr 5, 2018

Conversation

maennchen
Copy link
Member

@maennchen maennchen commented Feb 28, 2018

Based on #317, merge that PR first.

Partial Implementation of #240

This PR is currently only to track changes, do not merge until it is proven to be working with an actual storage implementation.

@maennchen maennchen self-assigned this Feb 28, 2018
@maennchen maennchen requested a review from c-rack February 28, 2018 15:30
@maennchen maennchen changed the title WIP: Solution Storage Adapter WIP: Solution: Storage Adapter Feb 28, 2018
@maennchen
Copy link
Member Author

@c-rack Do you have any idea how to capture logs in a tests setup block?

@c-rack
Copy link
Member

c-rack commented Mar 1, 2018

@maennchen no idea, sorry

@maennchen
Copy link
Member Author

@c-rack I'm going to ask around then.

@barthez
Copy link
Contributor

barthez commented Mar 3, 2018

@maennchen Hi! Have you tried capture_log from ExUnit.CaptureLog module. I have tried it and works in setup block as well.

@maennchen
Copy link
Member Author

@barthez I tried using it, but I need the created values and capture_log returns the logs and not those values. (I need to pass them to the return of the setup.)

Do you know a way around that?

@barthez
Copy link
Contributor

barthez commented Mar 3, 2018

I don't know another way around it than sending a message to self:

      capture_log(fn ->
        {:ok, broadcaster} =
          start_supervised(
            {ExecutionBroadcaster, {__MODULE__, producer, TestStorage, TestScheduler}}
          )

        send(self(), {:boardcaster, broadcaster})
      end)

      broadcaster =
        receive do
          {:boardcaster, result} -> result
        end

@maennchen
Copy link
Member Author

I haven’t thought of that. I don’t really like the solution, but it is way better than a jamed test log. I’ll change that.

@maennchen maennchen force-pushed the storage branch 2 times, most recently from 8cecd57 to 5a9b00b Compare March 5, 2018 11:08
@maennchen
Copy link
Member Author

@barthez
Copy link
Contributor

barthez commented Mar 5, 2018

Looks nice. Maybe ExUnit deserves a PR? I doubt you are the only one struggling with this problem.

@maennchen
Copy link
Member Author

Maybe ExUnit deserves a PR?

We'd have to write a proposal to the Mailing List. Creating PR's directly is not always appreciated.

@maennchen
Copy link
Member Author

maennchen commented Mar 21, 2018

@c-rack I have one thing I really dislike about this PR. If we continue to add more storage adapters, we're soon going to have a lot of optional dependencies. (Which could cause problems even for people which do not want to use an adapter.) I would much rather split them up in multiple repositories & packages.

Would you agree to create a GitHub Orga where we could put multiple libraries together? That way we could create a separate repo for every adapter and still have them all in one place.

EDIT: I would also make the effort and migrate all the stuff if you agree.

@c-rack
Copy link
Member

c-rack commented Mar 21, 2018

@maennchen Sure, I agree. I have created https://github.com/quantum-elixir orga and invited you as owner. It is great to see this project evolving. We should be open to everyone to contribute to this project under the C4 process and invite contributors to join the team. Feel free to migrate this project to the new orga as you like.

@maennchen
Copy link
Member Author

Cool! Thank you. I‘ll figure out the details of the migration tomorrow.

@c-rack
Copy link
Member

c-rack commented Mar 21, 2018

Ok. We should agree on a naming schema for the repos in that orga. Maybe quantum-core for the base library and quantum-storage-xxx for the xxx-storage adapters. What do you think?

@maennchen
Copy link
Member Author

I agree. Do I have owner rights on that repo so that I can move it? (I know that I have them in the orga, but here I don‘t know.)

I‘ll transfer the image to the orga, rename to quantum-core. After that we should fork it back here so that the url still works.

After that we should create a new release pointing to the new urls. In the forked back repo here we should update the readme with a notice that the repo has been moved.

After all that is done, I‘ll extract the storage adapter into its own repo.

@c-rack
Copy link
Member

c-rack commented Mar 22, 2018

@maennchen just looked and found no option to give you owner permissions on this repo, but I can do the transfer. One thing regarding the naming: if we rename the project and fork back, the URLs will still break. So maybe it is better to keep the project name as it is, ok?

@maennchen
Copy link
Member Author

maennchen commented Mar 22, 2018

@c-rack You can always rename a repository.

I would do it like this:

  • Transfer repo to orga
  • Rename orga repo to quantum-core
  • Fork orga repo to your local account
  • Rename personal fork back to quantum-elixir EDIT: I have just verified, that this works with my personal fork

When you're done I'll go and change the links in the mix.exs and README.md swiftly to the new location.

This way we should break no urls and have everything named correctly.

@c-rack
Copy link
Member

c-rack commented Mar 22, 2018

@maennchen transfer completed, fork is already renamed and I've added you as collaborator for the README changes.

@maennchen
Copy link
Member Author

@pyatkov I removed your changes and put them into this repo: https://github.com/quantum-elixir/quantum-storage-ets

I will stabilize the code and add tests. After that we should be able to release the new API and the ets storage package.

@coveralls
Copy link

coveralls commented Mar 23, 2018

Pull Request Test Coverage Report for Build 775

  • 53 of 53 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.9%) to 94.801%

Totals Coverage Status
Change from base Build 773: 0.9%
Covered Lines: 310
Relevant Lines: 327

💛 - Coveralls

@maennchen
Copy link
Member Author

@c-rack Would it be ok to mark this module as "experimental" and not adhere to the semantic versioning as we do with the rest of the library. (Only until it is stabilized)

@c-rack
Copy link
Member

c-rack commented Apr 5, 2018

@maennchen that would be ok, yes

@maennchen
Copy link
Member Author

@c-rack Great! Then I'm ready to release it into the wild I think.

@maennchen maennchen changed the title WIP: Solution: Storage Adapter Solution: Storage Adapter Apr 5, 2018
@maennchen
Copy link
Member Author

PS: I'm adding documentation as soon as it is stable.

@c-rack c-rack merged commit bab91cb into master Apr 5, 2018
@c-rack c-rack deleted the storage branch April 5, 2018 18:40
@c-rack
Copy link
Member

c-rack commented Apr 5, 2018

Great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants