Skip to content

Conversation

@cmuellner
Copy link
Collaborator

The activity check of the nightly release pipeline extracts the field 'commit.author.date' from the top commit to decide if commit was added in the last 24 hours. However, unless PRs are reviewed and merged within 24 hours this activity check will fail. Using the date of the merge instead leads to a more robust activity check.

To give a concrete example, here are the top lines of today's commit log:

{
  "sha": "a14abe3265ae8bd3ce463aefa4645bd376d08e5a",
  "node_id": "C_kwDOAWrbKtoAKGExNGFiZTMyNjVhZThiZDNjZTQ2M2FlZmE0NjQ1YmQzNzZkMDhlNWE",
  "commit": {
    "author": {
      "name": "Christoph Müllner",
      "email": "[email protected]",
      "date": "2024-10-12T22:54:57Z"
    },
    "committer": {
      "name": "Christoph Müllner",
      "email": "[email protected]",
      "date": "2024-10-16T08:08:11Z"
    },
[...]

The existing code extracts the following time:

$ jq -r '.commit.author.date' commit.json
2024-10-12T22:54:57Z

The code change in this PR changes this to the following:

$ jq -r '.commit.committer.date' commit.json
2024-10-16T08:08:11Z

@cmuellner cmuellner requested a review from kito-cheng October 16, 2024 19:42
@cmuellner cmuellner changed the title CI: Use merge time for activity checkk CI: Use merge time for activity check Oct 16, 2024
The activity check of the nightly release pipeline extracts the field
'commit.author.date' from the top commit to decide if commit was added
in the last 24 hours. However, unless PRs are reviewed and merged
within 24 hours this activity check will fail. Using the date of the
merge instead leads to a more robust activity check.

To give a concrete example, here are the top lines of today's commit log:

```
{
  "sha": "a14abe3265ae8bd3ce463aefa4645bd376d08e5a",
  "node_id": "C_kwDOAWrbKtoAKGExNGFiZTMyNjVhZThiZDNjZTQ2M2FlZmE0NjQ1YmQzNzZkMDhlNWE",
  "commit": {
    "author": {
      "name": "Christoph Müllner",
      "email": "[email protected]",
      "date": "2024-10-12T22:54:57Z"
    },
    "committer": {
      "name": "Christoph Müllner",
      "email": "[email protected]",
      "date": "2024-10-16T08:08:11Z"
    },
[...]
```

The existing code extracts the following time:
```
$ jq -r '.commit.author.date' commit.json
2024-10-12T22:54:57Z
```

The code change in this PR changes this to the following:
```
$ jq -r '.commit.committer.date' commit.json
2024-10-16T08:08:11Z
```

Signed-off-by: Christoph Müllner <[email protected]>
@cmuellner cmuellner force-pushed the nightly-release-date branch from de4960e to 5e32279 Compare October 16, 2024 19:44
@cmuellner
Copy link
Collaborator Author

Background: I attempted to trigger a new nightly release. However, that failed because of the activity check. See https://github.com/riscv-collab/riscv-gnu-toolchain/actions/runs/11337056889/job/31636752315

@TommyMurphyTM1234
Copy link
Collaborator

The nightly build still seems to be failing to run so there still isn't a CI build of the GCC 14.2 based toolchain:

Is that because this PR hasn't been merged yet or for some other reason?

@cmuellner
Copy link
Collaborator Author

The nightly build still seems to be failing to run so there still isn't a CI build of the GCC 14.2 based toolchain:

Is that because this PR hasn't been merged yet or for some other reason?

Yes, the release builds are blocked because the activity check fails. This PR attempts to fix this.

@TommyMurphyTM1234
Copy link
Collaborator

Yes, the release builds are blocked because the activity check fails. This PR attempts to fix this.

OK - thanks @cmuellner. 👍

@cmuellner
Copy link
Collaborator Author

I'm merging this without a formal review from somebody else.
This PR was available for several days and people are waiting for the CI/CD to work again.

@cmuellner cmuellner merged commit 68a48d2 into riscv-collab:master Oct 25, 2024
26 checks passed
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.

2 participants