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

append string to Message text for disabled messages #3135

Merged
merged 6 commits into from
May 5, 2020

Conversation

vladak
Copy link
Member

@vladak vladak commented May 4, 2020

In order to make operational aspect easier, it would help if the cause of disabled projects could be propagated to the UI when using the opengrok-mirror script. The disabled: true behavior will be preserved however if the value is a string, it will be appended to the message. I.e. when running the tool with this config:

disabled_command:
  command:
    - http://localhost:8080/source/api/v1/messages
    - POST
    - messageLevel: info
      duration: PT5M
      tags: ['%PROJECT%']
      text: disabled project
projects:
  opengrok:
    disabled: true
  opengrok-1.0:
    disabled: true
    disabled-reason: "foo bar"

the opengrok project's disabled message will be:

{"messageLevel": "info", "duration": "PT5M", "tags": ["opengrok"], "text": "disabled project"}

while opengrok-1.0's will be:

{"messageLevel": "info", "duration": "PT5M", "tags": ["opengrok-1.0"], "text": "disabled project: foo bar"}

@vladak vladak added the tools Python tools label May 4, 2020
@ktulinger
Copy link

What about another configuration property like disabled-reason or similar instead of introducing this variable duality?

@vladak
Copy link
Member Author

vladak commented May 5, 2020

had to bump GitPython version due to gitpython-developers/GitPython#983

@vladak
Copy link
Member Author

vladak commented May 5, 2020

What about another configuration property like disabled-reason or similar instead of introducing this variable duality?

yes, that would be cleaner.

@vladak
Copy link
Member Author

vladak commented May 5, 2020

Thanks for the review !

@vladak
Copy link
Member Author

vladak commented May 5, 2020

@vladak vladak merged commit 4719100 into oracle:master May 5, 2020
@vladak vladak deleted the messages_disabled_text_append branch May 5, 2020 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Python tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants