Skip to content

Commit

Permalink
Merge pull request #489 from epam/hotfix/1.16.1
Browse files Browse the repository at this point in the history
Hotfix/1.16.1
  • Loading branch information
bohdan-onsha authored Jan 21, 2025
2 parents 977b1fc + d321c3b commit 7ecc0f2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [1.16.1] - 2025-01-17
# [1.16.1] - 2025-01-21
- Added sync project state to the project state initialization
- Fixed an issue related to `build_project_mapping` resolving for `appsync`, `swagger_ui`, and `lambda` functions with runtime .NET resources
- Fixed issue with building java artifacts for Unix OS

# [1.16.0] - 2025-01-14
- Added support for the AppSync resource
Expand Down
5 changes: 2 additions & 3 deletions syndicate/core/build/runtime/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def assemble_java_mvn_lambdas(project_path: str, bundles_dir: str,
_LOG.info(f'Java sources are located by path: {src_path}')
_LOG.info(f'Going to process java mvn project by path: '
f'{CONFIG.project_path}')
command = ['mvn', 'clean', 'install']
command = [shutil.which('mvn'), 'clean', 'install']

if skip_tests:
command.append('-DskipTests')
Expand All @@ -43,8 +43,7 @@ def assemble_java_mvn_lambdas(project_path: str, bundles_dir: str,
command.append('-DerrorsAllowed')

execute_command_by_path(
command=command,
path=CONFIG.project_path)
command=command, path=CONFIG.project_path, shell=False)

# copy java artifacts to the target folder
for root, dirs, files in os.walk(target_path):
Expand Down
6 changes: 3 additions & 3 deletions syndicate/core/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ def prettify_json(obj):
return json.dumps(obj, indent=4)


def execute_command_by_path(command, path):
result = subprocess.run(command, shell=True, cwd=path, capture_output=True,
text=True)
def execute_command_by_path(command, path, shell=True):
result = subprocess.run(command, shell=shell, cwd=path,
capture_output=True, text=True)

if result.returncode != 0:
msg = (f'While running the command "{command}" occurred an error:\n'
Expand Down
2 changes: 2 additions & 0 deletions tests/smoke/commons/step_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ def process_steps(steps: dict[str: List[dict]],
build_command.append('--verbose')
print(f'Run command: {build_command}')
subprocess.run(build_command, check=False,
env=os.environ.copy(),
capture_output=True, text=True)

print(f'Run command: {command_to_execute}')
exec_result = subprocess.run(command_to_execute, check=False,
encoding='utf-8',
env=os.environ.copy(),
capture_output=True, text=True)
print(f'stdout: {exec_result.stdout}')
Expand Down
6 changes: 4 additions & 2 deletions tests/smoke/happy_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ def should_process_stage(stage_info):
return True

result = {STAGES_CONFIG_PARAM: {}}
with open(config) as file:
config_file = json.load(file)
with open(config, 'rb') as file:
raw_data = file.read()
decoded_data = raw_data.decode('utf-8', errors='replace')
config_file = json.loads(decoded_data)

init_params = config_file.get(INIT_PARAMS_CONFIG_PARAM, {})
output_file = full_path(init_params.pop(OUTPUT_FILE_CONFIG_PARAM,
Expand Down

0 comments on commit 7ecc0f2

Please sign in to comment.