Skip to content

Tools: update release date checker to check for release date vs. last commit of release#16712

Merged
mattklein123 merged 8 commits intoenvoyproxy:mainfrom
moderation:main
Jun 3, 2021
Merged

Tools: update release date checker to check for release date vs. last commit of release#16712
mattklein123 merged 8 commits intoenvoyproxy:mainfrom
moderation:main

Conversation

@moderation
Copy link
Copy Markdown
Contributor

Tools: update release date checker to check for release date vs. last commit of release
Additional Description:

  • change six from pythonhosted to Github location so we can verify release date
  • change layout of bazel/repository_locations.bzl and api/bazel/repository_locations.bzl so that release_date follows version and sha256 to aid with dependency maintainance
  • updated tools/dependency/release_dates.py to check for release metadata vs. current approach of checking for latest commit in a release which may not equal release date. /cc @htuch + @phlax for Python review.
  • no dependency changes in this PR

Risk Level: Low
Testing: bazel --nohome_rc test //test/..., bazel --nohome_rc test @envoy_api_canonical//test/... @envoy_api_canonical//tools/..., bazel --nohome_rc build @envoy_api_canonical//envoy/..., tools/dependency/release_dates.py bazel/repository_locations.bzl
Docs Changes: None required
Release Notes: None required

Signed-off-by: Michael Payne michael@sooper.org

…vs. last commit date.

Signed-off-by: Michael Payne <michael@sooper.org>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).

🐱

Caused by: #16712 was opened by moderation.

see: more, trace.

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label May 27, 2021
Signed-off-by: Michael Payne <michael@sooper.org>
Signed-off-by: Michael Payne <michael@sooper.org>
@phlax phlax self-assigned this May 28, 2021
Copy link
Copy Markdown
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

hi @moderation - it would have been helpful to build on the previous pr rather than opening a new one

i have flagged a few nits

except github.GithubException as e:
print('GithubException {e} while getting latest release.')
latest = ''
pass
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this pass doesnt do anything

im wondering if it should return here - ie if its thrown a GithubException im thinking repo.get_tags will also fail

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.

I've improved the error handling using the Github exception data and added comments explaining why it is OK to not find latest releases in some cases and keep processing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ok - but the pass is still superfluous

Signed-off-by: Michael Payne <michael@sooper.org>
Signed-off-by: Michael Payne <michael@sooper.org>
Signed-off-by: Michael Payne <michael@sooper.org>
mismatch = ''
iso_release_date = format_utc_date(github_release_date)
print(f'{dep} has a GitHub release date {iso_release_date}')
print(f'{Fore.GREEN}{dep} has a GitHub release date {iso_release_date}{Style.RESET_ALL}')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i would move this after the condition/raise - and in the raise provide more info about the mismatch

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.

The way this is structured today makes finding the date mismatches easy to find. The script outputs the real GH date followed by the exception that shows the erroneous date. I don't expect many people to view this but helpful for myself and the deps maintainers. But let me know if I'm missing something

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

kinda unreliable iiuc - because one is going to stdout and the other to stderr

there is no guarantee that both will be shown and if they are that they will be in correct order

not a blocker - but that is the reason i suggested this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(also that it flashes green even when its about to fail)

except github.GithubException as e:
print('GithubException {e} while getting latest release.')
latest = ''
pass
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ok - but the pass is still superfluous

Signed-off-by: Michael Payne <michael@sooper.org>
Signed-off-by: Michael Payne <michael@sooper.org>
@moderation moderation requested a review from phlax June 3, 2021 13:46
Copy link
Copy Markdown
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @moderation

as discussed offline - this needs some further updates in terms of moving to bazel and adding tests - but in terms of the scope of this PR i think its gtm

@mattklein123 mattklein123 merged commit 14782eb into envoyproxy:main Jun 3, 2021
leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
… commit of release (envoyproxy#16712)

Signed-off-by: Michael Payne <michael@sooper.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deps Approval required for changes to Envoy's external dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants