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

HMS-5348: ensure order on module stream search #945

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

jlsherrill
Copy link
Member

@jlsherrill jlsherrill commented Jan 17, 2025

Summary

we have to aggregate the the streams into modules, and are using a map. This doesn't preserve module ordering though, so this change ensures that the name order is consistent.

Testing steps

run the dao/TestSearchRepositoryModuleStreams test 10 times and see no failures

@Andrewgdewar Andrewgdewar changed the title Fixes HMS-5348: ensure order on module stream search HMS-5348: ensure order on module stream search Jan 17, 2025
@jlsherrill
Copy link
Member Author

Copy link
Contributor

@xbhouse xbhouse left a comment

Choose a reason for hiding this comment

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

test passes consistently 👍 lgtm!

@mayurilahane
Copy link
Contributor

testing it in stage

@mayurilahane mayurilahane merged commit 1f41f9d into content-services:main Jan 17, 2025
12 of 15 checks passed
@jlsherrill
Copy link
Member Author

jlsherrill commented Jan 17, 2025

snipped

@jlsherrill jlsherrill deleted the HMS-5348 branch January 17, 2025 21:32
@mayurilahane
Copy link
Contributor

Verified on stage by repeatedly executing ascending and descending commands, yielding accurate results.

@mayurilahane
Copy link
Contributor

cmd's used -

list modules in descending order:

curl --proxy http://squid.corp.redhat.com:3128/ https://console.stage.redhat.com/api/content-sources/v1.0/module_streams/search -u content7:changeme -d '{"urls":["https://cdn.redhat.com/content/dist/rhel8/8.5/x86_64/appstream/os"], "sort_by":"name:desc"}' -H "Content-Type: application/json" | jq '.[].module_name'

list in ascending:

curl --proxy http://squid.corp.redhat.com:3128/ https://console.stage.redhat.com/api/content-sources/v1.0/module_streams/search -u content7:changeme -d '{"urls":["https://cdn.redhat.com/content/dist/rhel8/8.5/x86_64/appstream/os"], "sort_by":"name:asc"}' -H "Content-Type: application/json" | jq '.[].module_name'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants