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

feat(segments): download functionality #1647

Merged
merged 9 commits into from
Dec 20, 2024
Merged

feat(segments): download functionality #1647

merged 9 commits into from
Dec 20, 2024

Conversation

jskelin
Copy link
Contributor

@jskelin jskelin commented Dec 10, 2024

Add support for downloading segment type. As part of the download process, uid, version and externalId are striped from the payload.

When a flag --only-segments is added to download command, only configurations of type segment will be downloaded.

@jskelin jskelin requested a review from a team as a code owner December 10, 2024 08:17
Copy link

github-actions bot commented Dec 10, 2024

Unit Test Results

1 941 tests  +11   1 940 ✅ +11   54s ⏱️ ±0s
  134 suites + 1       1 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit a84aae5. ± Comparison against base commit 0c9386f.

♻️ This comment has been updated with latest results.

@jskelin jskelin self-assigned this Dec 10, 2024
@jskelin jskelin added run-e2e-test Manually trigger the E2E tests for reviewed PRs release-notes This feature/fix should be mentioned in release notes labels Dec 10, 2024
Copy link

github-actions bot commented Dec 10, 2024

E2E Test Results

    4 files   -   1    270 suites   - 131   41m 5s ⏱️ - 34m 1s
2 028 tests +  5  2 026 ✅ +  5  2 💤 ±0  0 ❌ ±0 
2 146 runs   - 107  2 144 ✅  - 107  2 💤 ±0  0 ❌ ±0 

Results for commit 0a55447. ± Comparison against base commit fe98181.

This pull request removes 2 and adds 7 tests. Note that renamed tests count towards both.
github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestPaginationClassic
github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestPaginationPlatform
github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/download ‑ TestDownload_Options/only_grail_filter-segment_requested
github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/download ‑ Test_prepareAPIs/handling_"--only*"_flags/onlyFilterSegments
github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/download ‑ Test_prepareAPIs/handling_of_deprecated_endpoints/onlyGrailFilterSegment
github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/download ‑ Test_prepareAPIs/no_endpoint_marked_as_'skip'_is_present/onlyGrailFilterSegment
github.com/dynatrace/dynatrace-configuration-as-code/v2/pkg/download/grailfiltersegment ‑ TestDownloader_Download
github.com/dynatrace/dynatrace-configuration-as-code/v2/pkg/download/grailfiltersegment ‑ TestDownloader_Download/download_grail_filter-segments_works
github.com/dynatrace/dynatrace-configuration-as-code/v2/pkg/download/grailfiltersegment ‑ TestDownloader_Download/no_error_downloading_grail_filter_segments_with_faulty_client

♻️ This comment has been updated with latest results.

cmd/monaco/download/download_command.go Outdated Show resolved Hide resolved
cmd/monaco/download/download_configs.go Outdated Show resolved Hide resolved
cmd/monaco/download/download_configs.go Outdated Show resolved Hide resolved
cmd/monaco/download/download_configs.go Outdated Show resolved Hide resolved
cmd/monaco/download/download_configs.go Outdated Show resolved Hide resolved
pkg/deploy/internal/classic/validation_test.go Outdated Show resolved Hide resolved
pkg/download/grailfiltersegment/download.go Outdated Show resolved Hide resolved
pkg/download/grailfiltersegment/download.go Outdated Show resolved Hide resolved
pkg/download/grailfiltersegment/download.go Outdated Show resolved Hide resolved
pkg/download/grailfiltersegment/download.go Outdated Show resolved Hide resolved
@jskelin jskelin force-pushed the feat/GFF/download branch 4 times, most recently from 43b708f to ee8b7b6 Compare December 12, 2024 10:10
Copy link
Contributor

@Laubi Laubi left a comment

Choose a reason for hiding this comment

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

Please remove the unnecessary changes I commented: You can drop the single commit directly.

Please rename the wording to 'Segments' directly in this PR, as we already know the naming.

Something we need to fix somehow soonish is the aweful handling of the 'only' stuff. This does not scale. Nothing to do in this PR regarding this matter.

pkg/download/grailfiltersegment/download.go Outdated Show resolved Hide resolved
pkg/download/grailfiltersegment/download.go Outdated Show resolved Hide resolved
pkg/download/grailfiltersegment/download.go Outdated Show resolved Hide resolved
pkg/download/grailfiltersegment/download.go Outdated Show resolved Hide resolved
pkg/download/grailfiltersegment/download_test.go Outdated Show resolved Hide resolved
@jskelin jskelin force-pushed the feat/GFF/download branch 2 times, most recently from bca9e08 to dd5c43b Compare December 13, 2024 21:30
@jskelin jskelin changed the title Download for grail filter-segments feat(segments): download functionality Dec 16, 2024
tomazpu
tomazpu previously approved these changes Dec 16, 2024
Copy link
Contributor

@tomazpu tomazpu left a comment

Choose a reason for hiding this comment

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

Approved, from my side. Please still check with @Laubi about his comments.

@jskelin jskelin force-pushed the feat/GFF/download branch 5 times, most recently from 1219eae to 15d62f9 Compare December 17, 2024 06:38
@jskelin jskelin requested review from Laubi and tomazpu December 17, 2024 07:31
cmd/monaco/download/download_configs_test.go Outdated Show resolved Hide resolved
cmd/monaco/download/downloadopts_test.go Show resolved Hide resolved
pkg/download/segment/download.go Show resolved Hide resolved
pkg/download/segment/download.go Outdated Show resolved Hide resolved
@jskelin jskelin requested review from Laubi and tomazpu December 17, 2024 15:44
Laubi
Laubi previously approved these changes Dec 18, 2024
pkg/download/segment/download_test.go Outdated Show resolved Hide resolved
pkg/download/segment/download_test.go Outdated Show resolved Hide resolved
Laubi
Laubi previously approved these changes Dec 18, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
25.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@jskelin jskelin merged commit 74698e1 into main Dec 20, 2024
11 of 12 checks passed
@jskelin jskelin deleted the feat/GFF/download branch December 20, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes This feature/fix should be mentioned in release notes run-e2e-test Manually trigger the E2E tests for reviewed PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants