Skip to content

Conversation

feiyangliu2023
Copy link
Contributor

Issue #, if available:
Because Automation Update workflow makes assumptions on CodeOSS version update, it's possible that CodeEditor version is behind CodeOSS for longer than 1 month while Github Action still publishes success metric to CloudWatch during execution, which leads to undetected update problem.

Description of changes:
New metric CodeOSSReleaseLag is published to calculate second elapsed since last update, monitored by timestamp of last commit in third-party-src in repository. The value is normalized to month (so 1.0 means 1 month)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@feiyangliu2023 feiyangliu2023 had a problem deploying to security-scanning-workflow-env October 2, 2025 12:18 — with GitHub Actions Failure
@feiyangliu2023 feiyangliu2023 had a problem deploying to security-scanning-workflow-env October 2, 2025 12:18 — with GitHub Actions Failure
@feiyangliu2023 feiyangliu2023 marked this pull request as ready for review October 2, 2025 12:19
@feiyangliu2023 feiyangliu2023 requested a review from a team as a code owner October 2, 2025 12:19
name: Publish Success Metrics
runs-on: ubuntu-latest
needs: [update-automation, build-and-update-package-locks, generate-oss-attribution, create-pr, send-notification]
needs: [update-automation, build-and-update-package-locks, generate-oss-attribution, create-pr, send-notification, publish-release-lag-metric]
Copy link
Contributor

Choose a reason for hiding this comment

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

will publish-release-lag-metric execute in parallel with other actions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, to make sure it is run before deciding success and failure metric

aws-region: us-east-1

- name: Calculate and publish release lag metric
if: steps.aws-creds.outcome == 'success'
Copy link
Contributor

Choose a reason for hiding this comment

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

what if this condition is not meet, how can we detect it? will it be covered by automation update missing alarm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, in the case if metric is missing alarm will also be triggered
treatMissingData: TreatMissingData.BREACHING

CURRENT_TIMESTAMP=$(date +%s)
SECONDS_BEHIND=$((CURRENT_TIMESTAMP - SUBMODULE_COMMIT_TIMESTAMP))
NORMALIZED_VALUE=$(awk "BEGIN {printf \"%.6f\", $SECONDS_BEHIND / 2592000}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to make it more granular by normalize to days instead of month in case we will update alarm threshold, also we may need to show this metric in the dashboard, days is easier to show. It also means we need to update alarm threshold to 30 in the gitfarm CR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem done

Copy link
Contributor

Choose a reason for hiding this comment

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

did u publish? I didn't see an update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now changes are pushed!

@feiyangliu2023 feiyangliu2023 had a problem deploying to security-scanning-workflow-env October 3, 2025 07:32 — with GitHub Actions Failure
@feiyangliu2023 feiyangliu2023 had a problem deploying to security-scanning-workflow-env October 3, 2025 07:32 — with GitHub Actions Failure
@feiyangliu2023 feiyangliu2023 merged commit 56efdc7 into aws:main Oct 3, 2025
3 of 6 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.

3 participants