-
Notifications
You must be signed in to change notification settings - Fork 84
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
Setup the new auto-release CircleCI Release #43
Conversation
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
…icd-auto-release Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
This reverts commit eb6ade0.
Signed-off-by: Nok Chan <[email protected]>
This reverts commit 547b938.
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
@@ -0,0 +1 @@ | |||
# A dummy file to keep CI behave correctly |
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 kedro-datasets
didn't really have an e2e test. But keeping a dummy test here simplifies the conditions with CI config and it doesn't have much overhead, so I create a dummy file.
@@ -33,7 +33,7 @@ min-public-methods = 1 | |||
[tool.coverage.report] | |||
fail_under = 100 | |||
show_missing = true | |||
omit = ["tests/*"] | |||
omit = ["tests/*", "kedro_datasets/datasets/holoviews/*"] |
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.
Carries from kedro
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
payload = { | ||
"branch": CIRCLE_BRANCH, | ||
"parameters": { | ||
"release_package": package_name, |
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.
We used to check the version twice in two different jobs, I think it's better to keep a single source of truth and just pass this information in the requests.
from utils.package_version import get_package_version | ||
|
||
PACKAGE_PATHS = ( | ||
"kedro-datasets/kedro_datasets", |
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.
In theory, we can just use kedro-datasets
and parse it, but I am not sure if this is a convention. So I just keep the longer path here, not too important anyway.
} | ||
|
||
print(package_name, package_version) | ||
if check_no_version_pypi(pypi_endpoint, package_name, package_version): |
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.
Everytime main
is updated, it will check all repositories and see if there is a need to do a release. So it is possible that it triggers more than 1 release job (for different repository) but in practice, we shouldn't have one commit changing 2 different repositories.
Signed-off-by: Nok Chan <[email protected]>
No idea why getting
|
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.
Some minor questions from me, but in general this looks good to me! 👍
@@ -1,5 +1,13 @@ | |||
version: 2.1 | |||
|
|||
parameters: |
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.
Why do you need these parameters here?
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.
It's a CircleCI thing, otherwise, it will just throw an error. We called these 2 parameters in the POST request.
.circleci/continue_config.yml
Outdated
# - run: | ||
# name: Maybe merge main into develop or raise a PR | ||
# command: ./tools/circleci/github_scripts/merge.sh . "main" "develop" "${GITHUB_TAGGING_TOKEN}" |
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 guess we can remove this as I don't see us adding a develop
branch for this repo.
print("Creating CircleCI Pipeline successfully") | ||
print(resp.content) | ||
else: | ||
print("Failed to create CircleCI Pipeline") |
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 need any more info here? Error code or something like that to help us figure out what went wrong?
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 agree with Merel, maybe put the response code in the print statement as well.
Hmm strange.. I think I solved those issues at the time by running tests sequentially instead of in parallel. But it's odd it's just the one test now.. |
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.
Awesome work on this just a minor comment! 🎉
print("Creating CircleCI Pipeline successfully") | ||
print(resp.content) | ||
else: | ||
print("Failed to create CircleCI Pipeline") |
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 agree with Merel, maybe put the response code in the print statement as well.
Let's solve this unittest issue for 3.10 separately |
Description
To adapt the monorepo structure and support auto-release for plugin
The old process
__version__.py
is updated, if so trigger async
jobversion
is on PyPI - if not - trigger - Send a POST request to CircleCI to triggerpublish_kedro
pipelineThe Current Flow
main
get updated, it checked if any of the repositories need to do a release (By looping all__version__
and compare to PyPI)release_version
andrelease_package
) which triggers thebuild
andpublish
workflow.Development notes
release_package
&release_version
replace therelease_kedro :True
to handle multiple repositoriesThe credential on CCI are token generated on PyPI, I don't know where's the best place to document this information, maybe I will document how I do the testing locally on Confluence.
Extra tips:
I only realise I can trigger a pipeline on
main
with the UI, which should help you to "unit test" some individual workflow. (So you don't have to make a thousand dummy commits to trigger the job 😅)Testings are done locally with Personal Token, we have a separate set of tokens saved in CircleCI - some links are written in docstring to guide how to create these tokens.
Checklist
RELEASE.md
file