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

Pull #12857: Make twitter-releasenotes job depend on update-github-page #12857

Merged
merged 1 commit into from Mar 18, 2023

Conversation

stoyanK7
Copy link
Collaborator

Resolves twitter failure in release run: https://github.com/checkstyle/checkstyle/actions/runs/4438465653
Twitter job: https://github.com/checkstyle/checkstyle/actions/runs/4438465653/jobs/7790124616#step:4:124

TARGET_RELEASE_INDEX=
PREVIOUS_RELEASE_INDEX=1

Release on my fork: https://github.com/stoyanK7/checkstyle/actions/runs/4449215620
Twitter job : https://github.com/stoyanK7/checkstyle/actions/runs/4449215620/jobs/7813174923#step:4:125

TARGET_RELEASE_INDEX=0
PREVIOUS_RELEASE_INDEX=1

Twitter releasenotes job should be dependent on update-github-page because it expects the release to be there

curl https://api.github.com/repos/checkstyle/checkstyle/releases \
-H "Authorization: token $GITHUB_READ_ONLY_TOKEN" \
-o /var/tmp/cs-releases.json
TARGET_RELEASE_NUM=$1
TARGET_RELEASE_INDEX=$(cat /var/tmp/cs-releases.json | \
jq "[.[].tag_name] | to_entries | .[] | \
select(.value==\"checkstyle-$TARGET_RELEASE_NUM\") | .key")
echo TARGET_RELEASE_INDEX="$TARGET_RELEASE_INDEX"


What happened in the fail run was that the twitter job ran before the release was on GitHub and it could not find it. GitHub release was created at

Thu, 16 Mar 2023 15:22:11 GMT Creating Github release

but twitter job started pulling releases at

Thu, 16 Mar 2023 15:22:12 GMT   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

Yes, we need this dependency

@romani romani merged commit 8b6a0b0 into checkstyle:master Mar 18, 2023
63 checks passed
@github-actions github-actions bot added this to the 10.9.2 milestone Mar 18, 2023
@stoyanK7 stoyanK7 deleted the pull/12857 branch March 18, 2023 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants