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

[jaeger-idl] Copy model/*go to jaeger-idl/model/v1 #6571

Closed
yurishkuro opened this issue Jan 20, 2025 · 9 comments
Closed

[jaeger-idl] Copy model/*go to jaeger-idl/model/v1 #6571

yurishkuro opened this issue Jan 20, 2025 · 9 comments
Labels
enhancement 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 Jan 20, 2025

Part of #6494

In Jaeger the domain model is generated in model/model.pb.go from model.proto but then enriched with all kinds of business functions / helpers. To ease the transition of the existing code to the new jaeger-idl/model/v1 package we should copy all those helpers (a minimal required set was done in jaegertracing/jaeger-idl#118).

After copying and running go mod tidy there should be no new dependencies in go.mod. We should avoid copying some functions that have external dependencies, like translations between model IDs and OTEL IDs.

As there are many different files in model/, it's best to do this incrementally, not as a single PR.

model/dependencies.go
model/hash.go
model/keyvalue.go
model/process.go
model/sort.go
model/span.go
model/spanref.go
model/time.go
model/trace.go
@yurishkuro yurishkuro added good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement labels Jan 20, 2025
@dosubot dosubot bot added the enhancement label Jan 20, 2025
@Nabil-Salah
Copy link
Contributor

hello @yurishkuro
I'm trying to work on this issue what I reached till now is that ".pb.go" files generated by selected files in the photo
I need to transfer them to jaeger-idl repo

Image

and then calling them in Jaeger repo to use instead of depending on generating them + only add minimum and only essential business functions / helpers used

can you confirm I'm on the right path so I can start implementation?

@yurishkuro
Copy link
Member Author

No, you are not on the right path. The issue is about copying manually written Go code, it has nothing to do with .proto or .pb. files.

@Nabil-Salah
Copy link
Contributor

okay so as a starting point the models you stated should be copied to jaeger-idl repo along with the tests while avoid copying some functions that have external dependencies same as what you have done with ids model

should I then after that I remove them from jager repo and use jaeger-idl repo or this is for another issue?

@yurishkuro
Copy link
Member Author

should I then after that I remove them from jager repo and use jaeger-idl repo or this is for another issue?

that's part of the parent issue.

yurishkuro added a commit to jaegertracing/jaeger-idl that referenced this issue Jan 21, 2025
## Which problem is this PR solving?
[#6571](jaegertracing/jaeger#6571)

## Description of the changes
- Copy set of types from original `model/` -> `dependencies.go`,
`hash.go`, `keyvalue.go`, `process.go`

## How was this change tested?
- `go test ./model/v1`

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

---------

Signed-off-by: nabil salah <nabil.salah203@gmail.com>
Signed-off-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
danish9039 pushed a commit to danish9039/jaeger-idl that referenced this issue Jan 21, 2025
…gertracing#123)

[#6571](jaegertracing/jaeger#6571)

- Copy set of types from original `model/` -> `dependencies.go`,
`hash.go`, `keyvalue.go`, `process.go`

- `go test ./model/v1`

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

---------

Signed-off-by: nabil salah <nabil.salah203@gmail.com>
Signed-off-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
yurishkuro added a commit that referenced this issue Jan 21, 2025
## Which problem is this PR solving?
- Part of #6571
- Follow-up to jaegertracing/jaeger-idl#118

## Description of the changes
- Separate model files into more independent pieces that are easier to
move to jaeger-idl

## How was this change tested?
- CI

Signed-off-by: Yuri Shkuro <github@ysh.us>
yurishkuro pushed a commit that referenced this issue Jan 21, 2025
)

## Which problem is this PR solving?

- Part of #6571

- Follow-up to jaegertracing/jaeger-idl#118

## Description of the changes
- Separate model files into more independent pieces that are easier to
move to jaeger-idl

## How was this change tested?
- `go test ./model/` 
- `go test ./internal/sampling/samplingstrategy/adaptive/`

## 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`: `npm run lint` and `npm run test`

---------

Signed-off-by: nabil salah <nabil.salah203@gmail.com>
yurishkuro added a commit to jaegertracing/jaeger-idl that referenced this issue Jan 22, 2025
…_test.proto (#125)

## Which problem is this PR solving?
* Part of jaegertracing/jaeger#6571

## Description of the changes
- built on the prev [pr
#123](#123)
- Copy set of types from original `model/` -> `sort.go`, `spanref.go`,
`time.go`, `trace.go`

## How was this change tested?
- `go test ./model/v1`

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

---------

Signed-off-by: nabil salah <nabil.salah203@gmail.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Co-authored-by: Yuri Shkuro <github@ysh.us>
@Nabil-Salah
Copy link
Contributor

is there any remaining changes needed for this issue?

yurishkuro added a commit to jaegertracing/jaeger-idl that referenced this issue Jan 22, 2025
Part of #jaegertracing/jaeger#6571

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro
Copy link
Member Author

I copied the last two files, this is done. Thanks!

@yurishkuro
Copy link
Member Author

The next step is to update the main Jaeger repo to use model from jaeger-idl

@Nabil-Salah
Copy link
Contributor

Nabil-Salah commented Jan 22, 2025

i can work on this after some couple of hours if that is okay you can mention me in the issue or give me a link :D

@yurishkuro
Copy link
Member Author

@Nabil-Salah you can see the parent issue (#6494) at the top of this one, under the title.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 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

No branches or pull requests

2 participants