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

Fix broken Service Sets page #2799

Closed
wants to merge 1 commit into from

Conversation

konstantin-kelemen
Copy link
Contributor

I was getting an SQL error on the Director Service Sets page since I got the module updated from v1.10.2 to the latest master code from the repo.

The query was:

SELECT os.id, os.uuid, (NULL) AS branch_uuid, os.object_name, os.object_type, os.assign_filter, os.description, o.object_name AS service_object_name, COUNT(DISTINCT o.uuid) AS count_services FROM icinga_service_set AS os
 LEFT JOIN icinga_service AS o ON o.service_set_id = os.id WHERE (os.object_type = 'template') GROUP BY os.uuid,
	os.uuid,
	os.id,
	os.object_name,
	os.object_type,
	os.assign_filter,
	os.description ORDER BY os.object_name ASC LIMIT 25

and the error was:

ERROR:  column "o.object_name" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...os.object_type, os.assign_filter, os.description, o.object_n...

After trying to run this command in psql shell I quickly figured out that there was a typo in one of the parameters: o.object_name instead of os.object_name.

This PR fixes the typo in the module code.

@cla-bot
Copy link

cla-bot bot commented Sep 7, 2023

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Konstantin Kelemen.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot
Copy link

cla-bot bot commented Sep 7, 2023

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Konstantin Kelemen.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot
Copy link

cla-bot bot commented Sep 7, 2023

Thank you for your pull request. Before we can look at it, you'll need to sign a Contributor License Agreement (CLA).

Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA.

After that, please reply here with a comment and we'll verify.

Contributors that have not signed yet: @konstantin-kelemen

  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Please contact us if you think this is the case.

  • If you signed the CLA as a corporation, your GitHub username may not have been submitted to us. Please reach out to the responsible person in your organization.

@konstantin-kelemen
Copy link
Contributor Author

CLA has been signed

@bobapple
Copy link
Member

bobapple commented Sep 8, 2023

@cla-bot check

@cla-bot cla-bot bot added the cla/signed label Sep 8, 2023
@Thomas-Gelf
Copy link
Contributor

Thanks for reporting this! The error can be reproduced, but the fix is not correct - it provides the set name as the service name. Service names are not shown in this table, but should be subject for search

@Thomas-Gelf Thomas-Gelf self-assigned this Sep 21, 2023
@Thomas-Gelf Thomas-Gelf added this to the v1.11.0 milestone Sep 21, 2023
@Thomas-Gelf
Copy link
Contributor

Fixed with 7c2a3f2

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