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

Refs #37989 - Pluralize api docs endpoint and other changes #11223

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

sjha4
Copy link
Member

@sjha4 sjha4 commented Nov 19, 2024

What are the changes introduced in this pull request?

Pluralize a couple of API endpoint docs so hammer and apidocs can correctly point to them.
Add label to remote index rabl

Considerations taken when implementing this change?

What are the testing steps for this pull request?

Go to the remote index and show endpoints and check if you see label field.
Check if the apidocs point correctly to the create/scan endpoints.

Copy link

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

Patched my packit VM and looks good to me. 👍

@sjha4 sjha4 force-pushed the flatpak_api_updates branch 4 times, most recently from b4a0d8c to 7f8e55c Compare November 26, 2024 14:12
@sjha4 sjha4 force-pushed the flatpak_api_updates branch from 7f8e55c to 5e0e19a Compare December 6, 2024 16:45
def show
respond :resource => @flatpak_remote
end

api :POST, "/flatpak_remote", N_("Create a flatpak remote")
api :POST, "/flatpak_remotes", N_("Create a flatpak remote")
param :name, String, :desc => N_("name"), :required => true
param :url, String, :desc => N_("url"), :required => true
Copy link
Member

Choose a reason for hiding this comment

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

In reviewing the hammer side, I realized the "url" description is still a little confusing. The RHEL 9 docs mention enabling the RHEL flatpak repo using the URL https://flatpaks.redhat.io/rhel.flatpakrepo, but I wonder if using the flatpakrepo file in our case would work. I've just been using https://flatpaks.redhat.io/rhel, but I'm not sure how a user would find that out.

I suppose these repos will be documented and we'll seed them into Katello at some point, but that might not work for other repos out in the wild.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ack..The flatpak index path is a little obscure unless it's a custom index users have on their end and know all the details. That's where the idea to auto-create the redhat and fedora came. If we do not auto-create them, we'll add some help text to list the 2 remote URLs or documentation.

Copy link
Member

Choose a reason for hiding this comment

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

Would it be worth updating the URL description to be something like "flatpak index URL"? It looks like the code will accept a path to an index or will append the index suffix otherwise.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to: Base URL of the flatpak registry index, ex: https://flatpaks.redhat.io/rhel/ , https://registry.fedoraproject.org/.

@sjha4 sjha4 force-pushed the flatpak_api_updates branch from 5e0e19a to 411ccd6 Compare December 7, 2024 13:27
Copy link

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

Should we add the organization_id param for the flatpak-remote update after the recent org-scoping changes?

    api :PUT, "/flatpak_remotes/:id", N_("Update a flatpak remote")
    param_group :flatpak_remote
    param :id, :number, :desc => N_("Flatpak remote numeric identifier"), :required => true
    param :name, String, :desc => N_("name")
    param :url, String, :desc => N_("url")
    param :organization_id, :number, :desc => N_("organization identifier"), :required => true

@sjha4
Copy link
Member Author

sjha4 commented Dec 9, 2024

@vsedmik I fixed that on the hammer side. The API will get the required params from hammer after hammer name resolution magic.

@sjha4 sjha4 force-pushed the flatpak_api_updates branch from 411ccd6 to 0ecac80 Compare December 10, 2024 19:10
Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Looks good!

@sjha4 sjha4 force-pushed the flatpak_api_updates branch from 0ecac80 to 8990d7c Compare December 11, 2024 13:40
@sjha4
Copy link
Member Author

sjha4 commented Dec 11, 2024

Rebased..Will merge when tests go green..

@sjha4 sjha4 merged commit 363db98 into Katello:master Dec 11, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants