Skip to content

Commit

Permalink
Cleanup migration warning
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-el committed Nov 12, 2024
1 parent c43738f commit b4cd732
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 33 deletions.
6 changes: 1 addition & 5 deletions komodo/data/activator_switch.csh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ else if ( `uname -r` =~ *el8* ) then
setenv KOMODO_RELEASE $KOMODO_RELEASE_REAL
{%- endif %}
else if ( `uname -r` =~ *el6* ) then
{% filter indent(4, True) -%}
{% for line in migration_warning.split('\n') -%}
echo "{{ line }}"
{% endfor -%}
{% endfilter -%}
echo -e "{{ migration_warning }}"
else
echo "Attention! Your machine is running on an environment that is not supported."
endif
12 changes: 1 addition & 11 deletions komodo/data/activator_switch.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,7 @@ if [[ $(uname -r) == *el7* ]] ; then
export PS1="(${KOMODO_RELEASE_REAL}) ${_PRE_KOMODO_PS1}"
export KOMODO_RELEASE=$KOMODO_RELEASE_REAL
else
echo "Attention! Your machine is running on an environment
that is not supported. RHEL7 has been phased out.
From October 2024, komodo versions only support RHEL8.
Please migrate as soon as possible.

To use the latest stable RHEL7 build use
source /prog/res/komodo/deprecated-rhel7/enable

If you have any questions or issues -
contact us on #ert-users on Slack or Equinor's Yammer.
"
echo -e "{{ migration_warning }}"
fi
elif [[ $(uname -r) == *el8* ]] ; then
export KOMODO_ROOT={{ prefix }}
Expand Down
11 changes: 8 additions & 3 deletions komodo/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@

MIGRATION_WARNING = (
"Attention! Your machine is running on an environment "
"that is not supported. RHEL6 has been phased out.\n"
"From October 2020, komodo versions only support RHEL7.\n"
"Please migrate as soon as possible. If you have any questions or issues - "
"that is not supported. RHEL7 has been phased out.\n"
"From November 2024, komodo versions only support RHEL8.\n"
"Please migrate as soon as possible.\n"
"To use the latest stable RHEL7 build use either: "
"source /prog/res/komodo/deprecated-rhel7/enable\n"
"source /prog/res/komodo/deprecated-rhel7/enable.csh\n"
"\n"
"If you have any questions or issues - "
"contact us on #ert-users on Slack or Equinor's Yammer."
)

Expand Down
16 changes: 2 additions & 14 deletions tests/test_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,7 @@ def test_write_activator_switches(tmpdir):
export PS1="(${{KOMODO_RELEASE_REAL}}) ${{_PRE_KOMODO_PS1}}"
export KOMODO_RELEASE=$KOMODO_RELEASE_REAL
else
echo "Attention! Your machine is running on an environment
that is not supported. RHEL7 has been phased out.
From October 2024, komodo versions only support RHEL8.
Please migrate as soon as possible.
To use the latest stable RHEL7 build use
source /prog/res/komodo/deprecated-rhel7/enable
If you have any questions or issues -
contact us on #ert-users on Slack or Equinor's Yammer.
"
echo -e "{MIGRATION_WARNING}"
fi
elif [[ $(uname -r) == *el8* ]] ; then
export KOMODO_ROOT={prefix}
Expand Down Expand Up @@ -78,9 +68,7 @@ def test_write_activator_switches(tmpdir):
endif
setenv KOMODO_RELEASE $KOMODO_RELEASE_REAL
else if ( `uname -r` =~ *el6* ) then
echo "Attention! Your machine is running on an environment that is not supported. RHEL6 has been phased out."
echo "From October 2020, komodo versions only support RHEL7."
echo "Please migrate as soon as possible. If you have any questions or issues - contact us on #ert-users on Slack or Equinor's Yammer."
echo -e "{MIGRATION_WARNING}"
else
echo "Attention! Your machine is running on an environment that is not supported."
endif
Expand Down

0 comments on commit b4cd732

Please sign in to comment.