Skip to content

Move pkg/config to internal/config #6884

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

Merged
merged 9 commits into from
Mar 22, 2025

Conversation

gentcod
Copy link
Contributor

@gentcod gentcod commented Mar 20, 2025

Which problem is this PR solving?

Description of the changes

  • It moves private code from pkg/config to internal/config
  • Modifies related files where there are related imports of the moved file(s)

How was this change tested?

  make test

Checklist

@gentcod gentcod requested a review from a team as a code owner March 20, 2025 04:02
@gentcod gentcod requested a review from albertteoh March 20, 2025 04:02
@gentcod gentcod changed the title Move config to internal [mod]: moved config to internal Mar 20, 2025
@yurishkuro
Copy link
Member

please fix conflicts

@gentcod
Copy link
Contributor Author

gentcod commented Mar 21, 2025

@yurishkuro done

@yurishkuro
Copy link
Member

I'm still seeing conflicts (could be from other changes being merged)

@gentcod
Copy link
Contributor Author

gentcod commented Mar 21, 2025

I'm still seeing conflicts (could be from other changes being merged)

Probably due to other merged PRs. I have resolved the conflicts now

Signed-off-by: Yuri Shkuro <[email protected]>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

since you moved certificate files you need to update the references to them

$ rg pkg/config/tlscfg/testdata
Makefile
225:	cd pkg/config/tlscfg/testdata && ./gen-certs.sh
229:	cd pkg/config/tlscfg/testdata && ./gen-certs.sh -d

cmd/remote-storage/app/server_test.go
37:var testCertKeyLocation = "../../../pkg/config/tlscfg/testdata"

cmd/collector/app/server/http_test.go
29:var testCertKeyLocation = "../../../../pkg/config/tlscfg/testdata"

cmd/collector/app/handler/zipkin_receiver_tls_test.go
25:	const testCertKeyLocation = "../../../../pkg/config/tlscfg/testdata"

cmd/query/app/server_test.go
49:var testCertKeyLocation = "../../../pkg/config/tlscfg/testdata"

cmd/internal/flags/admin_test.go
29:var testCertKeyLocation = "../../../pkg/config/tlscfg/testdata"

make sure to run make test and make lint before submitting, you could've easily discovered these issues locally

@yurishkuro yurishkuro added the changelog:refactoring Internal code refactoring without functional changes label Mar 21, 2025
@yurishkuro yurishkuro changed the title [mod]: moved config to internal Move pkg/config to internal/config Mar 21, 2025
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.14%. Comparing base (a0d2100) to head (5b1eae1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6884      +/-   ##
==========================================
- Coverage   96.15%   96.14%   -0.02%     
==========================================
  Files         341      341              
  Lines       19738    19738              
==========================================
- Hits        18980    18978       -2     
- Misses        573      575       +2     
  Partials      185      185              
Flag Coverage Δ
badger_v1 10.20% <ø> (ø)
badger_v2 2.12% <ø> (ø)
cassandra-4.x-v1-manual 15.36% <ø> (ø)
cassandra-4.x-v2-auto 2.11% <ø> (ø)
cassandra-4.x-v2-manual 2.11% <ø> (ø)
cassandra-5.x-v1-manual 15.36% <ø> (ø)
cassandra-5.x-v2-auto 2.11% <ø> (ø)
cassandra-5.x-v2-manual 2.11% <ø> (ø)
elasticsearch-6.x-v1 20.15% <ø> (ø)
elasticsearch-7.x-v1 20.23% <ø> (ø)
elasticsearch-8.x-v1 20.40% <ø> (ø)
elasticsearch-8.x-v2 2.12% <ø> (ø)
grpc_v1 11.28% <ø> (ø)
grpc_v2 8.25% <ø> (ø)
kafka-3.x-v1 10.51% <ø> (ø)
kafka-3.x-v2 2.12% <ø> (ø)
memory_v2 2.12% <ø> (ø)
opensearch-1.x-v1 20.28% <ø> (ø)
opensearch-2.x-v1 20.28% <ø> (ø)
opensearch-2.x-v2 2.12% <ø> (ø)
tailsampling-processor 0.57% <ø> (ø)
unittests 94.93% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gentcod gentcod requested a review from yurishkuro March 21, 2025 22:30
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Thanks

@yurishkuro yurishkuro enabled auto-merge March 22, 2025 00:19
@yurishkuro
Copy link
Member

       	Error:      	Received unexpected error:
        	            	open ../../config/tlscfg/testdata/example-server-cert.pem: no such file or directory
 

auto-merge was automatically disabled March 22, 2025 02:02

Head branch was pushed to by a user without write access

@gentcod
Copy link
Contributor Author

gentcod commented Mar 22, 2025

@yurishkuro I had issues testing the entire package, and the failing test referenced the path differently but I ran the test in isolation now and it passed, so no issues.

image

@yurishkuro yurishkuro enabled auto-merge March 22, 2025 03:18
@yurishkuro yurishkuro added this pull request to the merge queue Mar 22, 2025
Merged via the queue into jaegertracing:main with commit d3f6682 Mar 22, 2025
56 checks passed
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
## Which problem is this PR solving?
- Part of jaegertracing#6869

## Description of the changes
- It moves private code from `pkg/config` to `internal/config`
- Modifies related files where there are related imports of the moved
file(s)

## How was this change tested?
```bash 
  make test
```

## 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 `jaeger`: `make lint test`

---------

Signed-off-by: Oyefule <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
## Which problem is this PR solving?
- Part of jaegertracing#6869

## Description of the changes
- It moves private code from `pkg/config` to `internal/config`
- Modifies related files where there are related imports of the moved
file(s)

## How was this change tested?
```bash
  make test
```

## 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 `jaeger`: `make lint test`

---------

Signed-off-by: Oyefule <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
Signed-off-by: amol-verma-allen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:refactoring Internal code refactoring without functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants