add schedule runs-on variables test for post 7.0 releases #151

Merged
earl-warren merged 5 commits from thefox/end-to-end:schedule-tests into main 2024-04-07 20:25:02 +00:00
Member

reimplements: forgejo/end-to-end#146 for 8.0-dev and 8.0-test

reimplements: forgejo/end-to-end#146 for 8.0-dev and 8.0-test
thefox added 1 commit 2024-04-06 20:43:15 +00:00
add schedule test for 8.0-dev/test
Some checks failed
/ build (pull_request) Successful in 2m58s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:7.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:1.21]) (pull_request) Has been skipped
/ packages (pull_request) Has been cancelled
/ upgrade and storage (pull_request) Has been cancelled
/ actions (pull_request) Has been cancelled
e1d7fc6100
earl-warren requested changes 2024-04-06 20:51:44 +00:00
Dismissed
@ -112,4 +113,14 @@ function test_actions() {
done
fi
done
Owner

To reduce the runtime, it should be included in the loop above with something like:

if dpkg --compare-versions $version ge 8.0 ; then
    for example in 8-0-schedule ; do
        run actions_verify_example $example
    done
fi

the for loop is not useful but it is quite possible that more tests that require Forgejo 8.0 or above will be added later.

To reduce the runtime, it should be included in the loop above with something like: ```sh if dpkg --compare-versions $version ge 8.0 ; then for example in 8-0-schedule ; do run actions_verify_example $example done fi ``` the `for` loop is not useful but it is quite possible that more tests that require Forgejo `8.0` or above will be added later.
Owner

Also (bit of a late thought) since this can be considered a feature and won't be backported to 7.0, it should be 8-0-schedule instead. Unless you think there is a strong case for including it in 7.0 at this late stage of the preparation of the release?

Also (bit of a late thought) since this can be considered a feature and won't be backported to 7.0, it should be `8-0-schedule` instead. Unless you think there is a strong case for including it in 7.0 at this late stage of the preparation of the release?
Author
Member

Hm... I think we can leave it in 8.0 at the moment, since it was broken for a while and no one noticed until recently. It can always be added in a patch to 7.x if it will be necessary.

Also, I don't think the loop includes 8.0-test... but I find the labels still a bit confusing.

Hm... I think we can leave it in 8.0 at the moment, since it was broken for a while and no one noticed until recently. It can always be added in a patch to 7.x if it will be necessary. Also, I don't think the loop includes 8.0-test... but I find the labels still a bit confusing.
Owner

I canceled the CI run because of the requested changes.

I canceled the CI run because of the requested changes.
thefox added 1 commit 2024-04-06 21:10:31 +00:00
add test to the loop
Some checks failed
/ build (pull_request) Successful in 3m41s
/ packages (pull_request) Failing after 1m56s
/ actions (pull_request) Failing after 2m18s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:7.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:1.21]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Failing after 2m11s
a2e44947b4
thefox force-pushed schedule-tests from a2e44947b4 to f75691ca4e 2024-04-06 21:19:40 +00:00 Compare
earl-warren reviewed 2024-04-07 05:48:23 +00:00
@ -0,0 +12,4 @@
steps:
- run: |
echo "TEST_SCHEDULE_RUNSON=${{ vars.TEST_SCHEDULE_RUNSON }}"
touch /srv/example/7-0-schedule-volume/DONE
Owner

s/7-0-schedule/8-0-schedule/ here too and everywhere else.

s/7-0-schedule/8-0-schedule/ here too and everywhere else.
Owner

There is no way to tell what the next version will be, my bad for suggesting that🤦

It should be replaced with post-7-0 (or something similar if you find a better name). Since your patch was merged in the development branch yesterday, it will be in the version that is going to be published after 7.0 that is for sure, even if there is no way to know what the version number of this release will be.

Semantic versioning is particular in this way, it gets some getting use to.

There is no way to tell what the next version will be, my bad for suggesting that🤦 It should be replaced with post-7-0 (or something similar if you find a better name). Since your patch was merged in the development branch yesterday, it will be in the version that is going to be published after 7.0 that is for sure, even if there is no way to know what the version number of this release will be. Semantic versioning is particular in this way, it gets some getting use to.
thefox marked this conversation as resolved
earl-warren reviewed 2024-04-07 05:49:20 +00:00
@ -112,2 +113,4 @@
done
fi
if dpkg --compare-versions $version gt 8.0 ; then
Owner

it is actually ge rather than gt

it is actually ge rather than gt
Owner

actually it must be gt 7.0 because there is no way to know that 8.0 will be the next version, my bad for suggesting that.

actually it must be `gt 7.0` because there is no way to know that 8.0 will be the next version, my bad for suggesting that.
thefox marked this conversation as resolved
thefox added 1 commit 2024-04-07 08:39:46 +00:00
fix naming
Some checks failed
/ build (pull_request) Successful in 2m47s
/ packages (pull_request) Successful in 7m38s
/ actions (pull_request) Failing after 19m31s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:7.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:1.21]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Successful in 13m38s
3940679883
Owner

The error here is because there are two tests for the schedule. The existing test for the schedule is named cron. It should only be run in the range of versions >= 1.21 and <= 7.0.

The error [here](https://code.forgejo.org/forgejo/end-to-end/actions/runs/1032/jobs/2#jobstep-3-329) is because there are two tests for the schedule. The existing test for the schedule is named cron. It should only be run in the range of versions >= 1.21 and <= 7.0.
thefox added 1 commit 2024-04-07 16:02:45 +00:00
restrict cron to <=7.0 release
Some checks failed
/ build (pull_request) Successful in 3m25s
/ packages (pull_request) Successful in 9m48s
/ actions (pull_request) Failing after 24m55s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:7.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:1.21]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Successful in 14m41s
a2ce786b31
earl-warren requested changes 2024-04-07 19:12:56 +00:00
Dismissed
earl-warren left a comment
Owner

This semantic versioning and the impossibility to guess what the next version will be makes it unexpectedly difficult to assert a version range. Not impossible but tricky.

Your change will land in a version that has a version number that cannot be predicted. But it:

  • will be published with a version number that will be greater than 7.0 and all the patch / release candidations
  • since it is a new feature it cannot be released in a version that is before 7.1 because it would violate semantic versioning

Asserting on 7.1 makes sense in that logic. What is weird is that it is entirely possible that 7.1 will never be published if the next version contains a breaking change, in which case 8.0 will be released. But the assertion will still be good in both cases.

This whole semantic version thing is still new to me.

This semantic versioning and the impossibility to guess what the next version will be makes it unexpectedly difficult to assert a version range. Not impossible but tricky. Your change will land in a version that has a version number that cannot be predicted. But it: * will be published with a version number that will be greater than 7.0 and all the patch / release candidations * since it is a new feature it cannot be released in a version that is before 7.1 because it would violate semantic versioning Asserting on 7.1 makes sense in that logic. What is weird is that it is entirely possible that 7.1 will never be published if the next version contains a breaking change, in which case 8.0 will be released. But the assertion will still be good in both cases. This whole semantic version thing is still new to me.
@ -112,2 +113,4 @@
done
fi
if dpkg --compare-versions $version gt 1.20 && dpkg --compare-versions $version le 7.0 ; then
Owner

It actually must be lt 7.1 because all release candidates of 7.0 are greater than 7.0 but none of them will be equal to 7.1, nor any of the patch versions that follow.

It actually must be `lt 7.1` because all release candidates of 7.0 are greater than 7.0 but none of them will be equal to 7.1, nor any of the patch versions that follow.
thefox marked this conversation as resolved
@ -114,0 +119,4 @@
done
fi
if dpkg --compare-versions $version gt 7.0 ; then
Owner

It actually must be ge 7.1 because all release candidates of 7.0 are greater than 7.0.

It actually must be `ge 7.1` because all release candidates of `7.0` are greater than `7.0`.
thefox marked this conversation as resolved
earl-warren changed title from add schedule test for 8.0-dev/test to add schedule runs-on variables test for post 7.0 releases 2024-04-07 19:14:16 +00:00
thefox added 1 commit 2024-04-07 19:31:57 +00:00
fix semver assertions
All checks were successful
/ build (pull_request) Successful in 2m47s
/ packages (pull_request) Successful in 7m29s
/ actions (pull_request) Successful in 26m16s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:7.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:1.21]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Successful in 13m25s
d9c5aef513
Author
Member

One day I'll get it right :)

One day I'll get it right :)
earl-warren approved these changes 2024-04-07 20:24:11 +00:00
earl-warren left a comment
Owner

And you did!

And you did!
earl-warren merged commit 416db9031b into main 2024-04-07 20:25:02 +00:00
earl-warren deleted branch schedule-tests 2024-04-07 20:25:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo/end-to-end#151
No description provided.