Skip to content

chore: Update development guide to include information on dependency updates - #4476

Merged
qingchm merged 9 commits into
aws:developfrom
qingchm:develop_guide
Jan 4, 2023
Merged

chore: Update development guide to include information on dependency updates#4476
qingchm merged 9 commits into
aws:developfrom
qingchm:develop_guide

Conversation

@qingchm

@qingchm qingchm commented Dec 12, 2022

Copy link
Copy Markdown
Contributor

Which issue(s) does this change fix?

N.A.

Why is this change necessary?

For contributions with , there is currently no instructions or checks on which required files are updated. The is causing confusion to both contributors and maintainers. For contributors they don't have instructions on which files to update, and for maintainers the PRs are harder to review as these misses are hard to be spotted.

How does it address the issue?

It adds a dependency update section on the development guide page for the community to reference to. It states what circumstances each file under requirements folder needs to be updated.

What side effects does this change have?

N.A.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

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

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

@qingchm
qingchm requested a review from a team as a code owner December 12, 2022 21:59
@qingchm
qingchm requested review from hawflau and mndeveci December 12, 2022 21:59
Comment thread DEVELOPMENT_GUIDE.md Outdated

### Dependency Updates

Please update all the required files if the changes involve a version update on a dependency or to include a new dependency. The requirements files are located inside the `requirements folder`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contents looks good, could we structure it such there are 3 parts, base, reproducible and installer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep makes sense! I can break down the sections further for this to be clearer

@qingchm
qingchm requested a review from sriram-mv December 15, 2022 01:18
Comment thread DEVELOPMENT_GUIDE.md Outdated
For dependencies used in SAM CLI code, update `base.txt` in `requirements` folder. To update `base.txt` file, simply follow the current convention and input the dependency name plus version, together with any necessary comment. For more information on the operators to be used for restricting compatible versions, read on [python's enhancement proposals](https://peps.python.org/pep-0440/#compatible-release).

#### reproducible-linux.txt for SAM CLI code dependencies
For dependencies used in SAM CLI code, also remember to update`reproducible-linux.txt` in `requirements` folder and `THIRD-PART-LICENSESD` in `installer/assets` folder. To update the `reproducible-linux.txt`, run the following script to replace the file:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THIRD-PART-LICENSESD to THIRD-PARTY-LICENSES

Comment thread DEVELOPMENT_GUIDE.md Outdated
```
make update-reproducible-reqs
```
Note that this is a fully auto-generated file, any manual changes to reproducible-linux.txt will not last after the next update running the above script. As for updating the `THIRD-PARTY-LICENSE`, find the corresponding dependency entry in the license file (usually grouped by licensing organization) and update the versions. For adding a new dependency, look up for its licensing organization through PyPi and update the corresponding section. If the license is from GNU or another license type not included in the file, please contact the repository maintainers first. If you are not familiar with working with this file, please contact one of the repository maintainers or cut an issue to help with the update.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

Comment thread DEVELOPMENT_GUIDE.md Outdated
For changing dependencies used for `make pr` checks and test related dependencies, update `dev.txt` in `requirements` folder only.

#### pyinstaller-build.txt for SAM CLI native installer build dependencies
For changing dependencies needed to run PyInstaller builds (to run `build-mac.sh` or `build-linux.sh` in `installer/pyinstaller` folder), modify `pyinstaller-build.txt`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For changing python dependencies needed for creating builds through Pyinstaller? does that sound better?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, let me re-word this a bit!

@qingchm
qingchm requested a review from sriram-mv December 15, 2022 20:12
Comment thread DEVELOPMENT_GUIDE.md Outdated
For dependencies used in SAM CLI code, update `base.txt` in `requirements` folder. To update `base.txt` file, simply follow the current convention and input the dependency name plus version, together with any necessary comment. For more information on the operators to be used for restricting compatible versions, read on [python's enhancement proposals](https://peps.python.org/pep-0440/#compatible-release).

#### reproducible-linux.txt for SAM CLI code dependencies
For dependencies used in SAM CLI code, also remember to update`reproducible-linux.txt` in `requirements` folder and `THIRD-PART-LICENSES` in `installer/assets` folder. To update the `reproducible-linux.txt`, run the following script to replace the file:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo on 3rd party licenses.

@qingchm
qingchm requested a review from sriram-mv January 4, 2023 18:30
@qingchm
qingchm enabled auto-merge (squash) January 4, 2023 20:09
@qingchm
qingchm merged commit 94fb228 into aws:develop Jan 4, 2023
mildaniel pushed a commit that referenced this pull request Jan 10, 2023
* support lists of source_path dicts

* add unit tests for source_path is specified as a list of dicts

* fix: update pyopenssl dependency (#4528)

* chore(deps): bump setuptools from 54.2.0 to 65.5.1 in /requirements (#4518)

Bumps [setuptools](https://github.com/pypa/setuptools) from 54.2.0 to 65.5.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst)
- [Commits](pypa/setuptools@v54.2.0...v65.5.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump version to 1.68.0 (#4532)

Co-authored-by: Lau <lauwing@f8ffc25e8e59.ant.amazon.com>

* CVE-2007-4559 Patch (#4499)

* Adding tarfile member sanitization to extractall()

* fix formatting issues

* Refactored extract_tarfile functions and added unit/functional tests

Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Mohamed Elasmar <71043312+moelasmar@users.noreply.github.com>
Co-authored-by: hnnasit <84355507+hnnasit@users.noreply.github.com>
Co-authored-by: Haresh Nasit <hnnasit@amazon.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>

* chore: Update development guide to include information on dependency updates (#4476)

* Add in instructions on updating SAMCLI dependencies

* Update the command to be run to write to reproducible linux

* Highlight content using separate sections for requirement files

* Fix typos and reword for better readability

* Update development guide text

* Revert "CVE-2007-4559 Patch (#4499)" (#4535)

This reverts commit 40bd90a.

* chore: change license badge in readme to display GH license (#4538)

* chore: update readme with pypi license

* use gh rather than pypi

* formatting only changes made by terraform fmt command

* add intergration tests

* Re-arrange order of if statements to remove recursion

* remove print statement that was leftover from development

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Mohamed Elasmar <71043312+moelasmar@users.noreply.github.com>
Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
Co-authored-by: Lau <lauwing@f8ffc25e8e59.ant.amazon.com>
Co-authored-by: TrellixVulnTeam <112716341+TrellixVulnTeam@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: hnnasit <84355507+hnnasit@users.noreply.github.com>
Co-authored-by: Haresh Nasit <hnnasit@amazon.com>
Co-authored-by: Qingchuan Ma <69653965+qingchm@users.noreply.github.com>
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.

3 participants