Skip to content

Conversation

@yelizhenden-mdb
Copy link
Collaborator

@yelizhenden-mdb yelizhenden-mdb commented Feb 4, 2025

Proposed changes

Jira ticket: CLOUDP-298521

  • Extract the IPA metrics collection job from the FOAS Release workflow.
  • Schedule the workflow to run once per day at the end of the day (22:00 UTC)

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works

Changes to Spectral

  • I have read the README file for Spectral Updates

uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: $NODE_VERSION
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

failure-handler:
name: Failure Handler
needs: [ release-IPA-metrics ]
if: ${{ failure() }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@yelizhenden-mdb yelizhenden-mdb marked this pull request as ready for review February 4, 2025 16:52
@yelizhenden-mdb yelizhenden-mdb requested a review from a team as a code owner February 4, 2025 16:52
openapi/v2/openapi*.json
changelog/changelog.json
changelog/internal/changelog-all.json
changelog/internal/metadata.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we don't need to upload the changelog files here, since we're only using openapi files

required: true
type: string
schedule:
- cron: '0 22 * * *' # Runs daily at 22:00 UTC (10 PM UTC)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What are the reasons to run it outside working hours? Keep in mind that you will get a notification if the action fails

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. Changed it to 11:00 AM. Do we have any standards around it?

Copy link
Collaborator

@lovisaberggren lovisaberggren Feb 5, 2025

Choose a reason for hiding this comment

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

Related: Perhaps we should only run mon-fri as well? The OASes don't get updated during the weekend either AFAIK

Copy link
Collaborator

@andreaangiolillo andreaangiolillo Feb 5, 2025

Choose a reason for hiding this comment

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

Do we have any standards around it?

No, it is up to the team. Ideally, it should be working hours so that we can action on failure

Copy link
Collaborator Author

@yelizhenden-mdb yelizhenden-mdb Feb 5, 2025

Choose a reason for hiding this comment

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

Related: Perhaps we should only run mon-fri as well? The OASes don't get updated during the weekend either AFAIK

Yes, but the metric collection job is not related to OAS updates anymore. And, DPE team asked us to send the data every day if possible. I checked with them about skipping weekend, but they need the data to be sent every day

Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

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

LGTM. Great work on this 👍

Comment on lines 12 to 13
OAS_ENV: 'dev'
OAS_BRANCH: 'dev'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since they are the same, you just need one right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, the OAS_ENV is used for the failure handler, but I believe it also represents the environment where the OpenAPI specification is generated, so I can combine them into one variable 👍

Copy link
Collaborator

@lovisaberggren lovisaberggren left a comment

Choose a reason for hiding this comment

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

🚀

@yelizhenden-mdb yelizhenden-mdb merged commit a1aea1b into main Feb 5, 2025
13 checks passed
@yelizhenden-mdb yelizhenden-mdb deleted the CLOUDP-298521 branch February 5, 2025 13:51
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