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

SRX-FZ6M63/#1043: fix colors for environments #1101

Merged
merged 5 commits into from
Nov 7, 2023

Conversation

bjoern-michaelsen-freiheit
Copy link
Contributor

@bjoern-michaelsen-freiheit bjoern-michaelsen-freiheit commented Nov 7, 2023

  • make explicit the definition of "Priority" and their precedence
  • change the precedence: UPSTREAM is now over PRE_PROD
  • modify existing tests (slightly breaking backwards compatibility):
    • if the chain of environments contains loops, all environments are
      marked OTHER. This is likely for the better.
    • multiple environments with no upstream will all get marked the same
      way as PROD.
    • if there are two environments and one is the upstream of the other,
      then they are marked as Priority "UPSTREAM" and "PROD"

This PR intends to fix #1043 .

@bjoern-michaelsen-freiheit bjoern-michaelsen-freiheit requested a review from a team as a code owner November 7, 2023 08:04
@bjoern-michaelsen-freiheit
Copy link
Contributor Author

bjoern-michaelsen-freiheit commented Nov 7, 2023

  • note this means if there are n > 1 environments between UPSTREAM and
    PROD, only the last environment before PROD will be marked PRE_PROD

Do we really want that? Note that if we change this to all environments between UPSTREAM and PROD are PRE_PROD, then OTHER will almost never appear (AFAICS only with broken configs containing loops).

Clarified with @sven-urbanski-freiheit-com: We want no all environments between UPSTREAM and PROD to be marked as PRE_PROD, only the last one. The rest shall be OTHER.

@bjoern-michaelsen-freiheit bjoern-michaelsen-freiheit force-pushed the bm/gh#1043 branch 3 times, most recently from 59dc7e4 to ae1c716 Compare November 7, 2023 08:30
- use the following rules to determine the "priority" of an environment:
  * UPSTREAM is an environment that has no upstream environment of it
    own
  * PROD is an environment that no environment names as its upstream
  * PRE_PROD is an evironment that is the upstream of a PROD environment
  * any remaining environment is marked OTHER
  * PROD takes precedence over UPSTREAM and PRE_PROD
  * PRE_PROD takes precendence over UPSTREAM
- the precendence rules are kept for backwards compatibility:
  * note they imply that PRE_PROD can only exist if there are at least
    two daisy chained environments
  * note they imply that an UPSTREAM environment can only exist, if
    there are at least three daisy chained environments
  * => consider breaking compatibility making UPSTREAM take precedence
    over PRE_PROD
- note this means if there are n > 1 environments between UPSTREAM and
  PROD, only the last environment before PROD will be marked PRE_PROD
- modify existing tests (slightly breaking backwards compatibility):
  * if the chain of environments contains loops, all environments are
    marked OTHER. This is likely for the better.
  * multiple enviroments with no upstream will all get marked the same
    way as PROD.

This PR intends to fix #1043 .
@bjoern-michaelsen-freiheit bjoern-michaelsen-freiheit merged commit 6b8b609 into main Nov 7, 2023
10 checks passed
@bjoern-michaelsen-freiheit bjoern-michaelsen-freiheit deleted the bm/gh#1043 branch November 7, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent Coloring Scheme on Environment Groups
3 participants