Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

Changelog
=========
--------------------
3.23.1 (2025-04-18)
--------------------
- Handle `eb migrate` execution failures on non-Windows machines gracefully

--------------------
3.23 (2025-04-18)
--------------------
Expand Down
2 changes: 1 addition & 1 deletion ebcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
__version__ = '3.23'
__version__ = '3.23.1'
15 changes: 11 additions & 4 deletions ebcli/controllers/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
from ebcli.objects.exceptions import (
NotFoundError,
NotAnEC2Instance,
NotSupportedError,
)
from ebcli.resources.strings import prompts, flag_text
from ebcli.operations import commonops, createops, platformops, statusops
Expand All @@ -81,6 +82,8 @@ class Meta:
stacked_type = "nested"

def do_command(self):
if not sys.platform.startswith("win"):
raise NotSupportedError("'eb migrate explore' is only supported on Windows")
verbose = self.app.pargs.verbose

if verbose:
Expand All @@ -102,6 +105,8 @@ class Meta:
]

def do_command(self):
if not sys.platform.startswith("win"):
raise NotSupportedError("'eb migrate cleanup' is only supported on Windows")
force = self.app.pargs.force
cleanup_previous_migration_artifacts(force, self.app.pargs.verbose)

Expand Down Expand Up @@ -274,6 +279,8 @@ def generate_ms_deploy_source_bundle(
json.dump(manifest_contents, file, indent=4)

def do_command(self):
if not sys.platform.startswith("win"):
raise NotSupportedError("'eb migrate' is only supported on Windows")
validate_iis_version_greater_than_7_0()
verbose = self.app.pargs.verbose

Expand Down Expand Up @@ -375,7 +382,7 @@ def do_command(self):
listener_configs_json = {"listener_configs": listener_configs}
json.dump(listener_configs_json, file, indent=2)
if archive_only and upload_target_dir:
generate_upload_target_archive(upload_target_dir, env_name)
generate_upload_target_archive(upload_target_dir, env_name, region)
return

self.create_app_version_and_environment(
Expand Down Expand Up @@ -572,7 +579,7 @@ def establish_instance_profile(instance_profile):
return instance_profile


def generate_upload_target_archive(upload_target_dir, env_name):
def generate_upload_target_archive(upload_target_dir, env_name, region):
fileoperations.zip_up_folder(upload_target_dir, upload_target_zip_path())
relative_normalized_upload_target_dir_path = absolute_to_relative_normalized_path(
upload_target_dir
Expand All @@ -583,13 +590,13 @@ def generate_upload_target_archive(upload_target_dir, env_name):
io.echo(
f"\nGenerated destination archive ZIP at .\\{relative_normalized_upload_target_dir_path}.zip. "
"You can now upload the zip using:\n\n"
" eb deploy --zip .\\migrations\\latest\\upload_target.zip\n"
f" eb deploy {env_name} --archive .\\migrations\\latest\\upload_target.zip --region {region}\n"
)
except NotFoundError:
io.echo(
f"\nGenerated destination archive directory at .\\{relative_normalized_upload_target_dir_path}.zip. "
"You can create en environment with the zip using:\n\n"
" eb migrate --archive .\\migrations\\latest\\upload_target.zip\n"
f" eb migrate --environment-name {env_name} --archive .\\migrations\\latest\\upload_target.zip --region {region}\n"
)


Expand Down
Loading