aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Fix pipeline template generation from custom git repositories

Open kfr2 opened this issue 3 years ago • 2 comments

Which issue(s) does this change fix?

#4206

Why is this change necessary?

Without this change, custom git repositories cannot be used for pipeline template generation.

How does it address the issue?

This commit restructures the _generate_from_custom_location() function to ensure self._generate_from_pipeline_template() is called within the context manager under which the custom git repository is cloned.

What side effects does this change have?

None.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • [x] Add input/output type hints to new functions/methods
  • [x] Write design document if needed (Do I need to write a design document?)
  • [x] Write/update unit tests
  • [x] Write/update integration tests
  • [x] Write/update functional tests if needed
  • [x] make pr passes
  • [x] make update-reproducible-reqs if dependencies were changed
  • [x] Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

kfr2 avatar Sep 08 '22 17:09 kfr2

Thanks for raising this PR! Can we add some tests to cover the case which is been fixed by this PR? So that we won't have the same issue by mistake later.

mndeveci avatar Sep 09 '22 21:09 mndeveci

@mndeveci @aahung Thanks for the feedback! I've added a test case which exercises the interactive workflow operating against a "remote" Git repository.

kfr2 avatar Sep 19 '22 14:09 kfr2

@aahung @mndeveci Do y'all need me to do anything else for this pull request? The failing test doesn't seem to be related to anything I've changed.

kfr2 avatar Sep 27 '22 16:09 kfr2

I'll update this branch from develop, that way the tests are restarted 😃

lucashuy avatar Oct 11 '22 22:10 lucashuy