Axel von Bertoldi (f5ad0734) at 17 Mar 19:02
Jobs like https://gitlab.com/gitlab-org/ci-cd/runner-tools/gitlab-runner-package-tests/-/jobs/13531483010 get a lot further than they should because downloaded a package succeeded when it should have failed.
Axel von Bertoldi (ba41d42b) at 17 Mar 19:02
Merge branch 'avonbertoldi/curl-fail-on-404' into 'main'
... and 1 more commit
@GitLabDuo I tested this locally, and --fail or --fail-with-body, and --show-error all result in the same output, so adding --show-error doesn't provide any benefit. Adding --fail is also enough to cause the script to abort immediately, so IMO this is good enough.
Jobs like https://gitlab.com/gitlab-org/ci-cd/runner-tools/gitlab-runner-package-tests/-/jobs/13531483010 get a lot further than they should because downloaded a package succeeded when it should have failed.
Axel von Bertoldi (f5ad0734) at 17 Mar 18:55
Fail when the package we're downloading does not exist
onRunCompletion() already referenced stepResult members without checking if the latter is nil before this change, so this is not new behaviour. Still, it would not hurt to do nil check here or in Run before calling onRunCompletion.
Indeed @timofurrer, the point of this type is to provide a stable public API and hide the implementation details, in this case PB/gRPC.
Claude Code itself had this to say about this section:
- glab mr create IID extraction could be more explicit
Step 6 says "Capture the MR URL and IID from the output" but glab mr create outputs a URL like https://gitlab.com/.../merge_requests/440. Extracting the
IID requires parsing the URL (taking the last path segment). Step 7 relies on this IID, so it's worth showing how to extract it, e.g.:MR_URL=(glab mr create ... | tail -1) MR_IID=(echo "MR_URL" | grep -oE '[0-9]+')
It clearly knows how to do this, so it's really giving instructions to itself
this is dangerous if your working branch's upstream is anything other than the same name as thee working branch. A safer version is git push origin <branch-name>:<branch-name>. E.g. I always have origin/main as my working branch's upstream, and git push would attempt to push to origin/main.
A few notes:
--assignee=@me here and glab will do the right thing--related-issue and maybe --copy-issue-labels
--remove-source-branch
Title should be 50 characters or less. The description should be wrapped at 72 characters, but not cut words, urls or code snippets.
@cam_swords With Dogfood Step images in Steps Pipeline (step-runner#234 - closed) closed I think we can close this epic. If you disagree feel free to reopen.
Axel von Bertoldi (47f22286) at 17 Mar 16:30
With Use OCI version of `create_gitlab_release` Func... (!436 - merged) merged I'm calling this done. Closing issue.
This MR uses the elsewhere created OCI version of the create_gitlab_release Function,a dn deletes the local version. I've also bumped the version of two other OCI Functions, though neither have changed functionally.
I have tested this Function works by using it to create new releases of the changelog and upload-to-package-registry Functions.
With this I'm calling #234 done. There's still a bit more work to do in this area, but I think we're sufficiently dogfooding OCI Functions to claim as much.
Possible future work
rc_version Functionsign_files Function in step-runner to an OCI Functionbuild and promote Functions out of step-runner into their own OCI Functions.Closes #234
Axel von Bertoldi (4d4035b2) at 17 Mar 16:29
Merge branch 'avonbertoldi/oci-functions' into 'main'
... and 4 more commits
@cam_swords I've had a script to do this that is quite similar, and does a few more things that we might want here:
avonbertoldi/12345/do-the-thing), take that number as a issue ID in the same project. I would require everyone follow some kind of branch naming convention (which is not a bad idea IMO).in-review label to the associated issue.Here it is for reference:
#!/bin/bash
ME="avonbertoldi"
ISSUE_RE="$ME/([0-9]*)/"
ISSUE=""
LABELS="devops::verify,group::runner,section::ops,runner::core,workflow::ready-for-review"
EXTRA_LABELS=(
"type::bug"
"bug::availability"
"bug::functional"
"bug::performance"
"bug::transient"
"bug::vulnerability"
"type::feature"
"feature::addition"
"feature::enhancement"
"type::maintenance"
"maintenance::dependency"
"maintenance::refactor"
"maintenance::workflow"
"security"
"documentation"
"Steps-Integration"
)
ELIGIBLE_REVIEWERS=(
"rsarangadharan"
"DarrenEastman"
"ajwalker"
"avonbertoldi"
"cam_swords"
"dbickford"
"gdoyle"
"ggeorgiev_gitlab"
"joe-shaw"
"josephburnett"
"nicolewilliams"
"pedropombeiro"
"ratchade"
"tmaczukin"
"stanhu"
"GitLabDuo"
)
function is_in_git_repo() {
git rev-parse HEAD >/dev/null
}
function get_issue_from_branch() {
if [[ $CURRENT_BRANCH =~ $ISSUE_RE ]]; then
ISSUE="${BASH_REMATCH[1]}"
else
echo "$CURRENT_BRANCH is not an issue branch"
fi
}
function get_merge_branch() {
git upstream | sed 's/origin\///'
}
function main() {
is_in_git_repo || exit 1
UPSTREAM=$(git upstream)
CURRENT_BRANCH=$(git current-branch)
get_issue_from_branch
REVIEWERS=$(printf "%s\n" "${ELIGIBLE_REVIEWERS[@]}" | fzf --multi --tac --prompt="Select reviewers >")
REVIEWERS=$(echo -n "$REVIEWERS" | sed -z 's/[\n ]\+/,/g')
SELECTED_EXTRA_LABELS=$(printf "%s\n" "${EXTRA_LABELS[@]}" | fzf --multi --tac --prompt="Select additional labels >")
[[ -n "$SELECTED_EXTRA_LABELS" ]] && LABELS="${LABELS} ${SELECTED_EXTRA_LABELS}"
LABELS=$(echo -n "$LABELS" | sed -z 's/[\n ]\+/,/g')
MERGE_BRANCH=$(get_merge_branch)
args=(mr create --assignee=@me --label "$LABELS" --yes --remove-source-branch --push --fill --fill-commit-body -b "$MERGE_BRANCH")
[[ -n "$REVIEWERS" ]] && args+=(--reviewer "$REVIEWERS")
[[ -z "$REVIEWERS" ]] && args+=(--wip)
# [[ -n "$ISSUE" ]] && args+=(--related-issue "$ISSUE" --copy-issue-labels)
MILESTONE=$(active_milestone.sh)
[[ -n "$MILESTONE" ]] && args+=(--milestone "$MILESTONE")
echo "${args[@]}"
glab "${args[@]}"
git change-upstream "$UPSTREAM"
[[ -n "$ISSUE" ]] && [[ -n "$REVIEWERS" ]] && glab issue update "$ISSUE" -l "workflow::in review"
}
main