Skip to content

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Aug 19, 2025

Additional details

We were not getting the correct release for some distros and releases. We were using getos which is an npm package that hasn't been updated in 3 years.

The format returned should be os.platform os.distro - os.release, but was often only getting values that often returned:

  • os.platform -
  • os.platform - os.release

This PR further centralizes our use of the systeminformation package to get OS information.

Steps to test

  1. Put a Module API file within the root of the cypress directory
  2. Run node module-api.js and see what osVersion is printed
/* @ts-ignore */
import cypress from './cli/lib/cypress.js'

const run = cypress.run

run({
  spec: './system-tests/projects/e2e/cypress/e2e/simple.cy.js',
  testingType: 'e2e',
  project: './system-tests/projects/e2e',
  /* @ts-ignore */
  dev: true,
}).then((results) => {
  // eslint-disable-next-line no-console
  console.log(results)
})

How has the user experience changed?

Before

Cloud run

Screenshot 2025-08-21 at 10 19 38 AM

Local Module API

Screenshot 2025-08-21 at 12 20 39 PM

After

Cloud run

Screenshot 2025-08-21 at 10 19 08 AM

Local Module API

Screenshot 2025-08-21 at 12 15 16 PM

PR Tasks

@jennifer-shehane jennifer-shehane self-assigned this Aug 19, 2025
@jennifer-shehane jennifer-shehane changed the title fix: move from getos to systeminformation fix: move from getos to systeminformation to fix OS distro/release info Aug 21, 2025
@AtofStryker AtofStryker self-requested a review August 21, 2025 17:02
}

return os.release()
}).catch(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

likely could be a finally but not worth the effort to test

Copy link

cypress bot commented Aug 21, 2025

cypress    Run #65029

Run Properties:  status check passed Passed #65029  •  git commit 329d3bc092: Merge branch 'develop' into fix-os-info-release
Project cypress
Branch Review fix-os-info-release
Run status status check passed Passed #65029
Run duration 20m 14s
Commit git commit 329d3bc092: Merge branch 'develop' into fix-os-info-release
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 12
Tests that did not run due to a developer annotating a test with .skip  Pending 1102
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 26561
View all changes introduced in this branch ↗︎
UI Coverage  44.99%
  Untested elements 187  
  Tested elements 157  
Accessibility  97.71%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 110  

@jennifer-shehane jennifer-shehane merged commit ab2004b into develop Aug 27, 2025
89 of 91 checks passed
@jennifer-shehane jennifer-shehane deleted the fix-os-info-release branch August 27, 2025 13:52
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.

Module API results.osVersion contains only Linux distribution without release version
2 participants