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

Added api calls for notifications #8668

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

quinilo
Copy link
Contributor

@quinilo quinilo commented Apr 26, 2024

What does this PR change?

Added api calls getNotifications, makeNotificationRead, makeAllNotificationsRead, deleteNotification to UserNotificationHandler

GUI diff

No difference.

  • DONE

Documentation

  • Api documentation added

  • DONE

Test coverage

  • No tests: already covered

  • DONE

Links

Issue(s): #5540

  • DONE

Changelogs

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 "javascript_lint"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

Copy link
Contributor

👋 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/8668/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/8668/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. ⚠️

Copy link
Contributor

Suggested tests to cover this Pull Request
  • srv_first_settings
  • proxy_cobbler_pxeboot
  • srv_monitoring
  • srv_rename_hostname
  • proxy_as_pod_basic_tests
  • proxy_branch_network
  • allcli_sanity
  • srv_sync_channels
  • srv_user_configuration_salt_states
  • srv_cobbler_distro
  • srv_mainpage
  • srv_maintenance_windows
  • srv_user_api
  • srv_distro_cobbler
  • srv_cobbler_profile
  • srv_wait_for_reposync
  • srv_cobbler_buildiso

@mcalmer
Copy link
Contributor

mcalmer commented Apr 26, 2024

@quinilo Thanks. Sorry that I cannot be in the office today.

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.

Hi @quinilo, thank you very much for the additions to the API.

I've suggested some changes below. Apart from those, here's another suggestion:

The user namespace is already a big one. Your changes introduce notifications as a new entity to the namespace. I think in this case, creating a new user.notifications namespace would help organize everything better. To do this, you need to do the following:

  • Create a new UserNotificationsHandler and move your endpoint methods there
  • Register your handler in the HandlerFactory class

And finally, some general remarks about the PR itself:

  • Please address the failing checks
  • Rebase the PR on top of master and squash your commits so only the relevant code changes are there
  • Some files are missing newlines at the end

About the documentation: I suggested some changes but I didn't build the docs myself so I might be missing something. To make sure the docs are generated correctly, please make sure to read the wiki about writing documentation for the API to build and validate your additions to the docs.

@quinilo
Copy link
Contributor Author

quinilo commented Apr 26, 2024

@cbbayburt thanks for your review. I will fix the code

@mcalmer
Copy link
Contributor

mcalmer commented May 20, 2024

@quinilo there are some checkstyle issues. Check the Details link to see what is wrong.

@quinilo
Copy link
Contributor Author

quinilo commented May 20, 2024

@quinilo there are some checkstyle issues. Check the Details link to see what is wrong.

Do i have to write a changelog for this change?

@mcalmer
Copy link
Contributor

mcalmer commented May 20, 2024

@quinilo there are some checkstyle issues. Check the Details link to see what is wrong.

Do i have to write a changelog for this change?

Yes, please do so. Thanks

@quinilo
Copy link
Contributor Author

quinilo commented May 21, 2024

@quinilo there are some checkstyle issues. Check the Details link to see what is wrong.

Do i have to write a changelog for this change?

Yes, please do so. Thanks

In which file do I have to write the changelogs in this case?

@mcalmer
Copy link
Contributor

mcalmer commented May 22, 2024

In which file do I have to write the changelogs in this case?

https://github.com/uyuni-project/uyuni/wiki/Contributing#changelog-rules-for-packages-in-git

There is a description about mkchlog and where the repo is to install it.
In the end it create a new file spacewalk-java.changes.login.branch-name and you write a line starting with a dash.

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.

None yet

3 participants