diff --git a/CHANGELOG.md b/CHANGELOG.md index ecf078ae7efd..1fc377bd25dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Multiple DataSource] Add support for SigV4 authentication ([#3058](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3058)) - Make build scripts find and use the latest version of Node.js that satisfies `engines.node` ([#3467](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3467)) - [Multiple DataSource] Refactor test connection to support SigV4 auth type ([#3456](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3456)) +- [Darwin] Add support for Darwin for running OpenSearch snapshots with `yarn opensearch snapshot` ([#3537](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3537)) ### 🐛 Bug Fixes diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 4486f8d9aec5..682fab8aee70 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -110,7 +110,7 @@ $ yarn osd clean OpenSearch Dashboards requires a running version of OpenSearch to connect to. In a separate terminal you can run the latest snapshot built using: -_(Linux and Windows only - for MacOS, you'll need to [run OpenSearch from a tarball](#alternative---run-opensearch-from-tarball) instead)_ +_(Linux, Windows, Darwin only - for others, you'll need to [run OpenSearch from a tarball](#alternative---run-opensearch-from-tarball) instead)_ ```bash $ yarn opensearch snapshot ``` diff --git a/packages/osd-opensearch/src/artifact.js b/packages/osd-opensearch/src/artifact.js index b7d8857ba09f..cd1702213d4d 100644 --- a/packages/osd-opensearch/src/artifact.js +++ b/packages/osd-opensearch/src/artifact.js @@ -188,8 +188,8 @@ async function getArtifactSpecForSnapshotFromUrl(urlVersion, log) { const arch = process.arch === 'arm64' ? 'arm64' : 'x64'; const extension = process.platform === 'win32' ? 'zip' : 'tar.gz'; - if (platform !== 'linux' && platform !== 'windows') { - throw createCliError(`Snapshots are only available for Linux and Windows`); + if (platform !== 'linux' && platform !== 'windows' && platform !== 'darwin') { + throw createCliError(`Snapshots are only available for Linux, Windows, and Darwin`); } const latestUrl = `${DAILY_SNAPSHOTS_BASE_URL}/${desiredVersion}-SNAPSHOT`; diff --git a/packages/osd-opensearch/src/artifact.test.js b/packages/osd-opensearch/src/artifact.test.js index 1d5d0bdf330c..92f3700c7935 100644 --- a/packages/osd-opensearch/src/artifact.test.js +++ b/packages/osd-opensearch/src/artifact.test.js @@ -163,10 +163,10 @@ describe('Artifact', () => { }); }); - it('should throw when on a non-Linux or non-Windows platform', async () => { + it('should throw when on a non-Linux, non-Windows, non-Darwin platform', async () => { Object.defineProperties(process, { platform: { - value: 'darwin', + value: 'android', }, arch: { value: ORIGINAL_ARCHITECTURE,