-
Notifications
You must be signed in to change notification settings - Fork 594
feat: Add Handling for OCB In YAML Dependency File #5065
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
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
954f3b7
Add OCB template and file_type
blewis12 7b35d82
Refactor sync-mod so that we can NewRootCommand() without errors
blewis12 95b8555
Add E2E test case for OCB
blewis12 58e6059
Use line number instead of offset to simplify indentations
blewis12 19e3a70
Update README
blewis12 d4e9a39
PR feedback: unify capitalization in error messages
blewis12 d3d0bf3
Don't run tidy command in OCB modules
blewis12 38a50fe
Rename missed variables from test
blewis12 57912ed
Use split/join approach instead of index based
blewis12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # BEGIN GENERATED REPLACES - DO NOT EDIT MANUALLY | ||
| {{- range . }} | ||
| {{- if .Comment }} | ||
| # {{ .Comment }} | ||
| {{- end }} | ||
| - {{ .Dependency }} => {{ .Replacement }} | ||
| {{- end }} | ||
| # END GENERATED REPLACES |
13 changes: 13 additions & 0 deletions
13
tools/generate-module-dependencies/testdata/basic-ocb/dependency-replacements-test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| modules: | ||
| - name: test-collector | ||
| path: test-builder-config.yaml | ||
| file_type: ocb | ||
|
|
||
| replaces: | ||
| - comment: Test replace for example.com/package | ||
| dependency: example.com/package | ||
| replacement: example.com/fork v1.0.0 | ||
|
|
||
| - comment: Another test replace | ||
| dependency: github.com/test/dependency | ||
| replacement: github.com/test/fork v1.0.0 |
24 changes: 24 additions & 0 deletions
24
tools/generate-module-dependencies/testdata/basic-ocb/test-builder-config-expected.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| dist: | ||
| module: github.com/test | ||
| name: test | ||
| description: test distribution | ||
| version: v1.0.0 | ||
|
|
||
| extensions: | ||
| - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.139.0 | ||
|
|
||
| exporters: | ||
| - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.139.0 | ||
|
|
||
| receivers: | ||
| - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.139.0 | ||
|
|
||
| replaces: | ||
| # local replacements | ||
| - github.com/some-dependencys/some-dep => ./some-dep | ||
| # BEGIN GENERATED REPLACES - DO NOT EDIT MANUALLY | ||
| # Test replace for example.com/package | ||
| - example.com/package => example.com/fork v1.0.0 | ||
| # Another test replace | ||
| - github.com/test/dependency => github.com/test/fork v1.0.0 | ||
| # END GENERATED REPLACES |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.