Skip to content

Conversation

@wweellddeerr
Copy link
Contributor

@wweellddeerr wweellddeerr commented Nov 5, 2025

What does this PR change?

This PR introduces AppStreams configuration feature to SSM through WebUI and API.

Codespace

Check if you already have a running container clicking on Running CodeSpace

Create CodeSpace About billing for Github Codespaces CodeSpace Billing Summary CodeSpace Limit

GUI diff

After:

image image image
  • DONE

Documentation

Test coverage

ℹ️ If a major new functionality is added, it is strongly recommended that tests for the new functionality are added to the Cucumber test suite

  • No tests: add explanation

  • No tests: already covered

  • Unit tests were added

  • Cucumber tests were added

  • DONE

Links

Issue(s): https://github.com/SUSE/spacewalk/issues/24196

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "frontend_checks"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

👋 Hello! Thanks for contributing to our project.
Acceptance tests will take some time (aprox. 1h), please be patient ☕

You can see the progress at the end of this page and at https://github.com/uyuni-project/uyuni/pull/11135/checks
Once tests finish, if they fail, you can check 👀 the cucumber report. See the link at the output of the action.
You can also check the artifacts section, which contains the logs at https://github.com/uyuni-project/uyuni/pull/11135/checks.

If you are unsure the failing tests are related to your code, you can check the "reference jobs". These are jobs that run on a scheduled time with code from master. If they fail for the same reason as your build, it means the tests or the infrastructure are broken. If they do not fail, but yours do, it means it is related to your code.

Reference tests:

KNOWN ISSUES

Sometimes the build can fail when pulling new jar files from download.opensuse.org . This is a known limitation. Given this happens rarely, when it does, all you need to do is rerun the test. Sorry for the inconvenience.

For more tips on troubleshooting, see the troubleshooting guide.

Happy hacking!
⚠️ You should not merge if acceptance tests fail to pass. ⚠️

@wweellddeerr wweellddeerr force-pushed the ssm-appstreams branch 2 times, most recently from 4006ebd to 31f057b Compare November 5, 2025 22:30
@wweellddeerr wweellddeerr force-pushed the ssm-appstreams branch 3 times, most recently from 2e3c3fa to 1f40aea Compare November 10, 2025 23:38
<>
{row.parentId && (
<img
style={{ marginLeft: "4px", marginRight: "8px", verticalAlign: "middle" }}
Copy link
Member

Choose a reason for hiding this comment

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

Instead of inline styles, it would be preferable to use a css module, see e.g. web/html/src/components/table/SearchPanel.module.scss and web/html/src/components/table/SearchPanel.tsx.

Etheryte
Etheryte previously approved these changes Nov 11, 2025
Copy link
Member

@Etheryte Etheryte left a comment

Choose a reason for hiding this comment

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

Thank you very much for the updates, LGTM. 👍

Copy link
Contributor

@cbbayburt cbbayburt left a comment

Choose a reason for hiding this comment

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

I left a couple of questions below to clarify, but overall it looks good to me 👍

One thing though; not strictly necessary, but since we're not in a rush, could you add a shortcut link to the SSM Overview tab like the others?

Copy link
Contributor

@cbbayburt cbbayburt left a comment

Choose a reason for hiding this comment

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

Meanwhile, I deployed the code and tested it manually. It works great!

I only have one more request below regarding RBAC.

Comment on lines 690 to 692
INSERT INTO access.namespace (namespace, access_mode, description)
VALUES ('systems.appstreams', 'W', 'Manage AppStreams on systems (SSM)')
ON CONFLICT (namespace, access_mode) DO NOTHING;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're going to use the existing systems.software.appstreams namespace, you don't need to insert anything to the namespace table.

Suggested change
INSERT INTO access.namespace (namespace, access_mode, description)
VALUES ('systems.appstreams', 'W', 'Manage AppStreams on systems (SSM)')
ON CONFLICT (namespace, access_mode) DO NOTHING;

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, if we were going to use a namespace, you would need to add a row into the accessgroupnamespace table for each access group that should have access to the new namespace by default.

If you don't add the namespace to any access group, effectively, only Uyuni admin (not even org admin) can access the namespace.

You don't need to do this for existing namespaces, unless you want to change the default access rules for them for some reason.

- Update migration script to use the existing 'systems.software.appstreams' RBAC namespace
  instead of creating a new one.
- Fix typo in the endpoint path within the migration script.
- Remove unnecessary DISTINCT clause from LIST_SSM_SERVERS_IN_CHANNEL_SQL query.
- Rename 'getAppStreamChannelFromPath' to 'resolveAppStreamChannel'.
- Change invalid channel handling to use 'response.redirect' instead of a server-side
  forward, ensuring the URL matches the view.
- Add a shortcut link to the SSM Overview tab.
@cbbayburt
Copy link
Contributor

Thanks for addressing my comments, @wweellddeerr.

I have just one final suggestion:

For RBAC, we have this new ACL called authorized_for(<namespace>) that renders parts of the JSP conditionally, only if the user has access to the specific namespace. We don't have it everywhere, but I've been trying to use it as much as possible, especially when adding new stuff.

With this ACL, we can let the AppStreams tab render only if the user has access to systems.software.appstreams, so we can avoid 403 links as much as we can.

Here's some examples:

SSM tabs:

<rhn-tab name="Product Migration" acl="authorized_for(systems.software.migration); all_systems_in_set_have_feature(ftr_package_updates)">
<rhn-tab-url>/rhn/manager/systems/ssm/product-migration</rhn-tab-url>
</rhn-tab>

SSM index page shortcuts:

<rhn:require acl="authorized_for(systems.software.migration); all_systems_in_set_have_feature(ftr_package_updates)">
<li class="list-group-item">
<div class="row">
<div class="col-sm-2">
<rhn:icon type="header-channel" title="ssm.overview.product_migration" />
<bean:message key="ssm.overview.product_migration"/>
</div>
<div class="col-sm-10">
<bean:message key="ssm.overview.product_migration.migrate"/>
</div>
</div>
</li>
</rhn:require>

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