-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Move release note generation to a sub module #3299
Conversation
pip install --upgrade pip | ||
pip install hermetic_build/common | ||
pip install hermetic_build/library_generation | ||
pip install hermetic_build/release_note_generation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we keep the dependencies together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created requirements.in
and requirements.txt
in each module.
.github/scripts/action.yaml
Outdated
shell: bash | ||
run: | | ||
cd "${GITHUB_WORKSPACE}" | ||
pip install --upgrade pip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to upgrade pip
? Can this be done in previous steps like setup-python
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this comment, pip is not updated in this action.
As for pip, we don't need it to be updated. I'll remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
pip install --require-hashes -r hermetic_build/common/requirements.txt | ||
pip install hermetic_build/common | ||
pip install --require-hashes -r hermetic_build/library_generation/requirements.txt | ||
pip install hermetic_build/library_generation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to install library_generation
anymore once we move ConfigChange
out of this module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We need to install library_generation
because config change is still part of it. Once it moves to common
, we don't need to install it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. LGTM so far - just some minor comments.
echo "PATH=${PATH}" >> $GITHUB_ENV | ||
|
||
set +ex | ||
python-version: 3.12 | ||
- name: install python dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: install python dependencies | |
- name: install python modules and dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -80,23 +69,26 @@ jobs: | |||
- uses: actions/checkout@v4 | |||
- uses: actions/setup-python@v5 | |||
with: | |||
python-version: 3.11 | |||
python-version: 3.12 | |||
- name: install python dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: install python dependencies | |
- name: install python modules and dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -0,0 +1,109 @@ | |||
# | |||
# This file is autogenerated by pip-compile with Python 3.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the implications of generating a reqs file with a different python version? Maybe we can create one with 3.12 instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pip-tools
(which contains pip-compile
) is built with python 3.11.
You can confirm this by running which pip-compile
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, looks like pip-compile is available only for 3.11, but it's installable via pip install pip-tools
from 3.12 onwards. I managed to locally generate the hashes with python 3.12. Can you confirm this works?
pyenv install 3.12
pyenv local 3.12
python --version
pip install pip-tools
pip-compile --generate-hashes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
I changed the requirements.txt
using python 3.12.
@@ -21,9 +21,9 @@ code declared in a "golden branch" of the repo. | |||
It requires docker and python 3.x to be installed. | |||
|
|||
``` | |||
python -m pip install --require-hashes -r requirements.txt | |||
python -m pip install . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The development guide shows commands to be run from the sdk-platform-java/library_generation
folder. However this command now must be run from sdk-platform-java/hermetic_build/library_generation
(or change pip install .
to pip install library_generation
and run it from //hermetic_build
. We can modify this note to point to hermetic_build
.
With this, then we could correct this to
python -m pip install . | |
python -m pip install library_generation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -89,14 +89,6 @@ will be created/modified: | |||
| pom.xml (repo root dir) | Always generated from inputs | | |||
| versions.txt | New entries will be added if they don’t exist | | |||
|
|||
### Change history |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC this feature is not being actually removed. Should we keep it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change history is not generated by entry_point.py
so I think we don't need to include this part.
I plan to raise another PR to consolidate library generation and release note generation into a README in hermetic_build
directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah gotcha, I was missing the fact that this readme is in the library_generation
folder.
@@ -0,0 +1,417 @@ | |||
# | |||
# This file is autogenerated by pip-compile with Python 3.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same concern about python versions
Quality Gate passed for 'gapic-generator-java-root'Issues Measures |
Quality Gate passed for 'java_showcase_integration_tests'Issues Measures |
🤖 I have created a release *beep* *boop* --- <details><summary>2.49.0</summary> ## [2.49.0](v2.48.0...v2.49.0) (2024-10-25) ### Features * Move release note generation to a sub module ([#3299](#3299)) ([7d6d66a](7d6d66a)) ### Bug Fixes * add additional potential exceptions when retrieving protobuf manifest file to get version ([#3315](#3315)) ([ef9e518](ef9e518)) ### Dependencies * update dependency com.google.errorprone:error_prone_annotations to v2.35.1 ([#3316](#3316)) ([d7c290f](d7c290f)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
In this PR:
generate_release_note.py
to separate PR description generation fromentrypoint.py
.Example generation workflow in downstream library: https://github.com/googleapis/java-bigtable/actions/runs/11442581326/job/31833887512
Note that
release_note_generation
module still depends onlibrary_generation
module because we didn't separate config change functions intocommon
module. This will be in a follow up PR.