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

frontend: add commands for adding and removing warning banner #2436

Merged
merged 2 commits into from
Dec 23, 2022

Conversation

nikromen
Copy link
Member

@nikromen nikromen commented Dec 12, 2022

TODO:

  • docs update

Fixes #2319

Copy link
Member

@FrostyX FrostyX left a comment

Choose a reason for hiding this comment

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

Nice, thank you for the PR, this would be a helpful feature during release. I made a few notes, and also the documentation change is needed.

frontend/coprs_frontend/commands/add_warning_banner.py Outdated Show resolved Hide resolved
frontend/coprs_frontend/commands/add_warning_banner.py Outdated Show resolved Hide resolved
frontend/coprs_frontend/commands/remove_warning_banner.py Outdated Show resolved Hide resolved
@nikromen nikromen force-pushed the update-banner branch 5 times, most recently from 05aee50 to ac378fa Compare December 16, 2022 16:19
<div class="alert alert-danger" role="alert">
{% if outage_time and ticket %}
<b>Warning!</b> Scheduled outage of Copr servers - {{ outage_time }}. For more information
please refer to <a href="https://pagure.io/fedora-infrastructure/issue/{{ ticket }}">this
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, this is to hardcoded. Especially for people who run their own instance. I would have nothing against it if this file will be in /etc/copr/ and marked as %config

Copy link
Member Author

@nikromen nikromen Dec 20, 2022

Choose a reason for hiding this comment

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

yes it is hardcoded. I meant this to be really specific and strict for our release use cases since we do them often and it is a very specific banner (and we want basically every time the same warning message).

what do you mean by marked as %config? what (and how) do I achieve from it?

Copy link
Member

Choose a reason for hiding this comment

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

When the file is in spec file marked as %config then it can be modified by user and it will not be overwritten during dnf upgrade but .rpmnew file will be created instead.

doc/how_to_release_copr.rst Outdated Show resolved Hide resolved
@xsuchy
Copy link
Member

xsuchy commented Dec 23, 2022

I still have a few ideas on how to enhance it, but ... yeah, this works and is better than before. +1 from me.

@xsuchy xsuchy merged commit d1c77fc into fedora-copr:main Dec 23, 2022
@nikromen nikromen deleted the update-banner branch April 4, 2023 16:18
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.

Show warning banner on copr frontend before release
3 participants