Skip to content

Fix gen_pkg_func failure not being recorded by generate_installers#187

Merged
allenh1 merged 1 commit intoros-infrastructure:masterfrom
lgsvl:fix_generate_installers_success_on_error
May 22, 2019
Merged

Fix gen_pkg_func failure not being recorded by generate_installers#187
allenh1 merged 1 commit intoros-infrastructure:masterfrom
lgsvl:fix_generate_installers_success_on_error

Conversation

@andre-rosa
Copy link
Contributor

generate_installers() didn't consider a few gen_pkg_func() failure
situations like:

  • InvalidPackage:
    The manifest contains invalid XML: syntax error: line 1, column 0
    !!!! 61.7%: Failed to generate installer for package 'qb_chain'!
  • NoPkgXml: Could not fetch pkg!

Those are signaled by gen_pkg_func by returning no installer (None)
and no missing dependencies ([]).

Whenever gen_pkg_func() returns no installer, it must be an error except
when we want to preserve_existing.

Fixes #186 .

generate_installers() didn't consider a few gen_pkg_func() failure
situations like:

  - InvalidPackage:
    The manifest contains invalid XML: syntax error: line 1, column 0
    !!!! 61.7%: Failed to generate installer for package 'qb_chain'!
  - NoPkgXml: Could not fetch pkg!

Those are signaled by gen_pkg_func by returning no installer (None)
and no missing dependencies ([]).

Whenever gen_pkg_func() returns no installer, it must be an error except
when we want to preserve_existing.

Fixes ros-infrastructure#186 .
@allenh1
Copy link
Contributor

allenh1 commented May 8, 2019

@andre-rosa I don't think I'm quite understanding what this patch does. Can you explain what your concerns are for running without this/what this blocks?

@andre-rosa
Copy link
Contributor Author

andre-rosa commented May 8, 2019

@andre-rosa I don't think I'm quite understanding what this patch does. Can you explain what your concerns are for running without this/what this blocks?

@allenh1 When get_pkg_func() raises NoPkgXml it returns None, [] (no installer, no missing dependency) and that gets recorded as a success generating the installer by generate_installer().

Patch handles the situation if not current and not preserve_existing: record failure. In that case, it'll not output ok('Successfully generated an installer for package ...') but instead err('Failed to generate an installer for package ...').

Every time we don't return an installer it's a failure except when we want to preserve_existing.

@allenh1 allenh1 merged commit 7d19415 into ros-infrastructure:master May 22, 2019
@andre-rosa andre-rosa deleted the fix_generate_installers_success_on_error branch May 22, 2019 20:52
zffgithub pushed a commit to zffgithub/superflore that referenced this pull request Apr 11, 2023
…os-infrastructure#187)

generate_installers() didn't consider a few gen_pkg_func() failure
situations like:

  - InvalidPackage:
    The manifest contains invalid XML: syntax error: line 1, column 0
    !!!! 61.7%: Failed to generate installer for package 'qb_chain'!
  - NoPkgXml: Could not fetch pkg!

Those are signaled by gen_pkg_func by returning no installer (None)
and no missing dependencies ([]).

Whenever gen_pkg_func() returns no installer, it must be an error except
when we want to preserve_existing.

Fixes ros-infrastructure#186 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generate_installers() may record a failure in gen_pkg_func() as success

3 participants