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

Create config for Mockery #5569

Closed
1 of 2 tasks
yurishkuro opened this issue Jun 11, 2024 · 2 comments · Fixed by #5626
Closed
1 of 2 tasks

Create config for Mockery #5569

yurishkuro opened this issue Jun 11, 2024 · 2 comments · Fixed by #5626
Labels
good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement

Comments

@yurishkuro
Copy link
Member

yurishkuro commented Jun 11, 2024

When running make generate-mocks, mockery tool complains that it will require a config file in the next major version. We should migrate now to a config file instead of giving instructions via CLI flags.

11 Jun 24 19:56 UTC WRN DEPRECATION: use of the packages config will be the only way to generate mocks in v3. Please migrate your config to use the packages feature. dry-run=false migration=https://vektra.github.io/mockery/v2.42/migrating_to_packages/ url=https://vektra.github.io/mockery/v2.42/features/#packages-configuration version=v2.42.3

We seem to have a lot of other packages for which we probably just generated mocks manually once. We need to include them into config too:

$ find . -name mocks
./crossdock/services/mocks
./cmd/ingester/app/processor/mocks
./cmd/ingester/app/consumer/mocks
./cmd/collector/app/sanitizer/cache/mocks
./proto-gen/storage_v1/mocks
./plugin/sampling/leaderelection/mocks
./plugin/storage/grpc/mocks
./storage/mocks
./storage/metricsstore/mocks
./storage/dependencystore/mocks
./storage/spanstore/mocks
./storage/samplingstore/mocks
./pkg/kafka/mocks
./pkg/cassandra/mocks
./pkg/es/mocks
./pkg/es/client/mocks
./pkg/distributedlock/mocks
@yurishkuro yurishkuro added help wanted Features that maintainers are willing to accept but do not have cycles to implement good first issue Good for beginners labels Jun 11, 2024
@jesslourenco
Copy link
Contributor

Hi @yurishkuro, I'd like to work on this :) will be opening a PR soon.

@EraKin575
Copy link
Contributor

Can I also work on this parallely?

yurishkuro added a commit that referenced this issue Jun 13, 2024
… the Makefile (#5623)

## Which problem is this PR solving?
- Part of #5569

## Description of the changes
- Created the configuration file (.mockery.yaml) to match what was being
done by `make generate-mocks`
- Removed a few mock files from es/mocks that were defined within the
subpackage `client`. These files are still (auto) generated but within
es/client/mocks only

## How was this change tested?
- manually by running `mockery`
- by running `make test`

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: jessica lourenco <jess.mailed@gmail.com>
Signed-off-by: jesslourenco <70455379+jesslourenco@users.noreply.github.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants