Skip to content

Commit

Permalink
Add a nuclio suffix to the module name if function is being deployed …
Browse files Browse the repository at this point in the history
…from the file
  • Loading branch information
rokatyy committed Jul 14, 2024
1 parent d348a84 commit 763867b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nuclio/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def build_file(filename='', name='', handler='', archive=False, project='',
code = add_kind_footer(kind, config, code)

name = normalize_name(name or filebase)
# Avoid import issues if the filename is the same as an existing Python library by adding a Nuclio suffix
normalized_filebase = normalize_name(filebase) + '-nuclio'
update_in(config, 'metadata.name', name)
config = extend_config(config, spec, tag, filename)
set_handler(config, normalize_name(filebase), '' if kind else handler, ext)
Expand Down

0 comments on commit 763867b

Please sign in to comment.