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

Add warnings to deprecate Mambaforge #615

Merged
merged 10 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ jobs:
miniforge-variant: Mambaforge
use-mamba: true
if: ${{ ! contains(matrix.OS_NAME, 'Linux') }}

- name: Patch license for Mambaforge deprecation
if: matrix.MINIFORGE_NAME == 'Mambaforge' || matrix.MINIFORGE_NAME == 'Mambaforge-pypy3'
run: |
echo "!!!!!! Mambaforge is now deprecated !!!!!" > Miniforge3/MAMBAFORGE_LICENSE.txt
echo "Future Miniforge releases will NOT build Mambaforge installers." >> Miniforge3/MAMBAFORGE_LICENSE.txt
echo "We advise you switch to Miniforge at your earliest convenience." >> Miniforge3/MAMBAFORGE_LICENSE.txt
echo "More details at https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/." >> Miniforge3/MAMBAFORGE_LICENSE.txt
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> Miniforge3/MAMBAFORGE_LICENSE.txt
cat LICENSE >> Miniforge3/MAMBAFORGE_LICENSE.txt
echo "MINIFORGE_LICENSE_OVERRIDE=MAMBAFORGE_LICENSE.txt" >> $GITHUB_ENV

- name: Build and test miniforge
env:
Expand Down
5 changes: 4 additions & 1 deletion Miniforge3/construct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ write_condarc: True
# keep pkgs for space-saving implications for hardlinks when create new environments
# and keep the same with Miniconda
keep_pkgs: True
license_file: ../LICENSE
license_file: {{ os.environ.get("MINIFORGE_LICENSE_OVERRIDE", "../LICENSE") }}

# During the interactive installation, these variables are checked.
# During batch installation, conda is never initialized
Expand Down Expand Up @@ -48,3 +48,6 @@ specs:

- pip
- miniforge_console_shortcut 1.* # [win]

pre_install: mambaforge_deprecation.sh # [unix]
pre_install: mambaforge_deprecation.bat # [win]
25 changes: 25 additions & 0 deletions Miniforge3/mambaforge_deprecation.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
if "%GITHUB_ACTIONS%"=="true" (
echo ::warning title=Mambaforge is now deprecated!::Future Miniforge releases will NOT build Mambaforge installers. We advise you switch to Miniforge at your earliest convenience. More details at https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/.
)
else (
msg "%sessionname%" Mambaforge is now deprecated! Future Miniforge releases will NOT build Mambaforge installers. We advise you switch to Miniforge at your earliest convenience. More details at https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/.
)

for /f "delims=" %%# in ('powershell get-date -format "{yyyy-MM-dd}"') do @set _date=%%#
if "%_date%"=="2024-10-01" exit 1
if "%_date%"=="2024-10-15" exit 1
if "%_date%"=="2024-11-01" exit 1
if "%_date%"=="2024-11-10" exit 1
if "%_date%"=="2024-11-20" exit 1
if "%_date%"=="2024-11-30" exit 1
if "%_date%"=="2024-12-05" exit 1
if "%_date%"=="2024-12-10" exit 1
if "%_date%"=="2024-12-15" exit 1
if "%_date%"=="2024-12-20" exit 1
if "%_date%"=="2024-12-25" exit 1
if "%_date%"=="2024-12-30" exit 1
if "%_date%"=="2024-12-31" exit 1
if "%_date:~0,4%"=="2025" exit 1

echo Sleeping for 30s...
powershell -nop -c "& {sleep 30}"
21 changes: 21 additions & 0 deletions Miniforge3/mambaforge_deprecation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

if [[ "$GITHUB_ACTIONS" == "true" ]]; then
echo "::warning title=Mambaforge is now deprecated!::Future Miniforge releases will NOT build Mambaforge installers. We advise you switch to Miniforge at your earliest convenience. More details at https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/."
else
echo "!!!!!! Mambaforge is now deprecated !!!!!"
echo "Future Miniforge releases will NOT build Mambaforge installers."
echo "We advise you switch to Miniforge at your earliest convenience."
echo "More details at https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/."
fi

case $(date +%F) in
# Brownouts
2024-10-01|2024-10-15|2024-11-01|2024-11-10|2024-11-20|2024-11-30|2024-12-05|2024-12-10|2024-12-15|2024-12-20|2024-12-25|2024-12-30|2024-12-31|2025-*)
exit 1
;;
*)
echo "Sleeping for 30s..."
sleep 30
;;
esac
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ Latest installers with PyPy 3.9 in the base environment:
| OS X | x86_64 | macOS >= 10.13 | [Miniforge-pypy3-MacOSX-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-MacOSX-x86_64.sh) |
| Windows | x86_64 | Windows >= 7 | [Miniforge-pypy3-Windows-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-Windows-x86_64.exe) |

<details><summary>Mambaforge (Discouraged as of September 2023)</summary>
<details>

<summary>🚨 Mambaforge (<b>Deprecated</b> as of July 2024) 🚨</summary>

With the [release](https://github.com/conda-forge/miniforge/releases/tag/23.3.1-0) of
`Miniforge3-23.3.1-0`, that incorporated the changes in
Expand All @@ -58,12 +60,8 @@ configuration of `Mambaforge` and `Miniforge3` are now **identical**. The
only difference between the two is the name of the installer and, subsequently,
the default installation directory.

Given its wide usage, there are no plans to deprecate Mambaforge. If at some
point we decide to deprecate Mambaforge, it will be appropriately announced and
communicated with sufficient time in advance.

As of September 2023, the new usage of Mambaforge is thus discouraged. Bug
reports specific to Mambaforge will be closed as won't fix.
We recommend switching to `Miniforge3` immediately. These installers will be
retired in January 2025.
beckermr marked this conversation as resolved.
Show resolved Hide resolved

#### Mambaforge

Expand Down
2 changes: 1 addition & 1 deletion build_miniforge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ docker run --privileged --rm tonistiigi/binfmt --install all

echo "============= Build the installer ============="
docker run --rm -v "$(pwd):/construct" \
-e CONSTRUCT_ROOT -e MINIFORGE_VERSION -e MINIFORGE_NAME -e TARGET_PLATFORM \
-e CONSTRUCT_ROOT -e MINIFORGE_VERSION -e MINIFORGE_NAME -e TARGET_PLATFORM -e MINIFORGE_LICENSE_OVERRIDE \
"${DOCKERIMAGE}" /construct/scripts/build.sh

echo "============= Test the installer ============="
Expand Down
Loading