Skip to content
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

chore: change auto-pr action to create proper PR body for renku pre-releases #3044

Merged
merged 8 commits into from May 2, 2023

Conversation

Panaetius
Copy link
Member

@Panaetius Panaetius commented Apr 24, 2023

Needs SwissDataScienceCenter/renku-python#3415 to properly work

closes SwissDataScienceCenter/renku-python#3402

allows setting something like extra-values=global.renku.cli_version=2.4.0rc2 in auto-prs to test with a specific version (this is automatically set by CI with the changes in this PR)

/deploy #persist

@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 24, 2023 09:48 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 24, 2023 12:03 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 24, 2023 13:55 — with GitHub Actions Inactive
@RenkuBot
Copy link
Collaborator

You can access the deployment of this PR at https://ci-renku-3044.dev.renku.ch

@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 24, 2023 14:19 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 25, 2023 13:17 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 25, 2023 15:48 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 26, 2023 05:56 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 26, 2023 07:01 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 26, 2023 07:58 — with GitHub Actions Inactive
@jachro jachro temporarily deployed to ci-renku-3044 April 26, 2023 09:00 — with GitHub Actions Inactive
@Panaetius Panaetius marked this pull request as ready for review April 26, 2023 13:43
@Panaetius Panaetius requested review from a team as code owners April 26, 2023 13:43
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 26, 2023 13:44 — with GitHub Actions Inactive
Copy link
Member

@olevski olevski left a comment

Choose a reason for hiding this comment

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

One small change. Also did you have a chance to test the modified action?

.github/workflows/auto-reqs-update-pr.yml Show resolved Hide resolved
@Panaetius
Copy link
Member Author

Panaetius commented Apr 27, 2023

I tested the modified action code locally, but haven't tested on Github (it has to be merged anyways before being able to run it, no?). Sometimes jq behaves a bit differently in GH Actions than locally, even using something like act, so I give it a ~70% chance of working out of the box...

I.e. I just tested it with a bash script like

#!/bin/bash
GITHUB_REF=$1
regex='renku-[a-z]+'
[[ ${GITHUB_REF} =~ $regex ]]
pr_repo=$BASH_REMATCH
pr_body="This is an automated pull request.\n\n/deploy"

# get current cli version for core PRs and set PR body for tests to pass
if [ "$pr_repo" == "renku-core" ]; then
   regex='renku-core-([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)'
   [[ ${GITHUB_REF} =~ $regex ]]
   core_version=${BASH_REMATCH[1]}
   current_version_maybe_rc=$(curl -s https://pypi.org/pypi/renku/json | jq -r ".releases | keys_unsorted | map(select( . | startswith(\"$core_version\"))) | sort_by(. | split(\"[.]|rc\";\"\") | map(tonumber))[-1]")
   pr_body="$pr_body extra-values=global.renku.cli_version=$current_version_maybe_rc"
fi
echo "$pr_body"
$ ./test.sh "auto-update/renku-core-2.4.0"
This is an automated pull request.\n\n/deploy extra-values=global.renku.cli_version=2.4.0rc2

$ ./test.sh "auto-update/renku-core-2.3.2"
This is an automated pull request.\n\n/deploy extra-values=global.renku.cli_version=2.3.2

$ ./test.sh "auto-update/renku-core-1.11.2"
This is an automated pull request.\n\n/deploy extra-values=global.renku.cli_version=1.11.2

$ ./test.sh "auto-update/renku-gateway-0.19.2"
This is an automated pull request.\n\n/deploy

$ ./test.sh "auto-update/renku-graph-2.31.0"
This is an automated pull request.\n\n/deploy

@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 27, 2023 07:21 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 27, 2023 07:31 — with GitHub Actions Inactive
@rokroskar
Copy link
Member

@Panaetius you can change which branch it runs on temporarily to test

@Panaetius Panaetius temporarily deployed to ci-renku-3044 April 27, 2023 13:25 — with GitHub Actions Inactive
@Panaetius Panaetius requested a review from olevski April 27, 2023 14:34
@Panaetius Panaetius enabled auto-merge (squash) April 27, 2023 14:35
@Panaetius Panaetius deployed to ci-renku-3044 May 2, 2023 11:58 — with GitHub Actions Active
@Panaetius Panaetius merged commit ed975b9 into master May 2, 2023
9 checks passed
@Panaetius Panaetius deleted the renku-core-release-action branch May 2, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix acceptance test usage of the CLI for release candidates
5 participants