Skip to content

Commit

Permalink
Merge branch 'main' into atlas-sign-in-flake
Browse files Browse the repository at this point in the history
  • Loading branch information
mabaasit authored Jan 16, 2025
2 parents b1066fd + 84ffd4d commit 1a78d04
Show file tree
Hide file tree
Showing 42 changed files with 637 additions and 873 deletions.
6 changes: 3 additions & 3 deletions .evergreen/create-sbom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ trap_handler() {
}
trap trap_handler ERR EXIT

scp -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -P "$SIGNING_SERVER_PORT" .sbom/dependencies.json /tmp/silkbomb.env /tmp/artifactory_password "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME":/tmp/
ssh -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -p "$SIGNING_SERVER_PORT" "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME" \
scp -v -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -P "$SIGNING_SERVER_PORT" .sbom/dependencies.json /tmp/silkbomb.env /tmp/artifactory_password "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME":/tmp/
ssh -v -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -p "$SIGNING_SERVER_PORT" "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME" \
"(cat /tmp/dependencies.json | jq -r '.[] | "'"pkg:npm/" + .name + "@" + .version'"' > /tmp/purls.txt) && \
echo "pkg:generic/mongo_crypt_shared@${CRYPT_SHARED_VERSION}" >> /tmp/purls.txt && \
(cat /tmp/artifactory_password | docker login artifactory.corp.mongodb.com --username '${ARTIFACTORY_USERNAME}' --password-stdin ; rm -f /tmp/artifactor_password ) && \
Expand All @@ -30,4 +30,4 @@ ssh -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -p "$SIGNING_SERVER_PORT" "$SIGNING
--silk-asset-group "${SILK_ASSET_GROUP}" --sbom-in /tmp/sbom-lite.json && \
docker run --env-file /tmp/silkbomb.env --rm -v /tmp:/tmp artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0 download \
--silk-asset-group "${SILK_ASSET_GROUP}" --sbom-out /tmp/sbom.json"
scp -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -P "$SIGNING_SERVER_PORT" "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME":/tmp/{sbom-lite.json,sbom.json,purls.txt} .sbom/
scp -v -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -P "$SIGNING_SERVER_PORT" "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME":/tmp/{sbom-lite.json,sbom.json,purls.txt} .sbom/
2 changes: 1 addition & 1 deletion THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The following third-party software is used by and included in **Mongodb Compass**.
This document was automatically generated on Wed Jan 15 2025.
This document was automatically generated on Thu Jan 16 2025.

## List of dependencies

Expand Down
6 changes: 1 addition & 5 deletions docs/tracking-plan.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Compass Tracking Plan

Generated on Wed, Jan 15, 2025
Generated on Thu, Jan 16, 2025

## Table of Contents

Expand Down Expand Up @@ -936,8 +936,6 @@ This event is fired when a collection is created.

**Properties**:

- **is_capped** (required): `boolean`
- Indicates whether the collection is capped.
- **has_collation** (required): `boolean`
- Indicates whether the collection has a custom collation.
- **is_timeseries** (required): `boolean`
Expand All @@ -960,8 +958,6 @@ This event is fired when a database is created.

**Properties**:

- **is_capped** (required): `boolean`
- Indicates whether the first collection in the database is capped.
- **has_collation** (required): `boolean`
- Indicates whether the first collection in the database has a custom collation.
- **is_timeseries** (required): `boolean`
Expand Down
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/collection-model/lib/collection-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const PROPERTIES_FLE2 = 'fle2';
const PROPERTIES_VIEW = 'view';
const PROPERTIES_READ_ONLY = 'read-only';

/**
* @param {import('../').CollectionProps} coll
*/
function getProperties(coll) {
const properties = [];

Expand All @@ -29,7 +32,7 @@ function getProperties(coll) {
});
}

if (coll.capped) {
if (coll.is_capped) {
properties.push({
id: PROPERTIES_CAPPED,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/collection-model/lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const CollectionModel = AmpersandModel.extend(debounceActions(['fetch']), {
},
},
properties: {
deps: ['collation', 'type', 'capped', 'clustered', 'readonly', 'fle2'],
deps: ['collation', 'type', 'is_capped', 'clustered', 'readonly', 'fle2'],
fn() {
return getProperties(this);
},
Expand Down
5 changes: 5 additions & 0 deletions packages/compass-e2e-tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
fixtures/*.csv
fixtures/*.json
hadron-build-info.json

# Ignoring sandboxes (created per test run)
.smoke-sandboxes/
# Cache of downloaded binaries
.smoke-downloads/
5 changes: 5 additions & 0 deletions packages/compass-e2e-tests/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ fixtures
.nyc_output
coverage
hadron-build-info.json

# Ignoring sandboxes (created per test run)
.smoke-sandboxes/
# Cache of downloaded binaries
.smoke-downloads/
80 changes: 0 additions & 80 deletions packages/compass-e2e-tests/helpers/buildinfo.ts

This file was deleted.

12 changes: 0 additions & 12 deletions packages/compass-e2e-tests/helpers/commands/add-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import type { CompassBrowser } from '../compass-browser';
import * as Selectors from '../selectors';

export type AddCollectionOptions = {
capped?: {
size: number;
};
customCollation?: {
locale: string;
strength: number;
Expand Down Expand Up @@ -51,15 +48,6 @@ export async function addCollection(
);
}

if (collectionOptions && collectionOptions.capped) {
await browser.clickVisible(Selectors.CreateCollectionCappedCheckboxLabel);

await browser.setValueVisible(
Selectors.CreateCollectionCappedSizeInput,
collectionOptions.capped.size.toString()
);
}

if (collectionOptions && collectionOptions.customCollation) {
await browser.clickVisible(
Selectors.CreateCollectionCustomCollationCheckboxLabel
Expand Down
18 changes: 10 additions & 8 deletions packages/compass-e2e-tests/helpers/compass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -949,18 +949,20 @@ async function getCompassBuildMetadata(): Promise<BinPathOptions> {
}

export async function buildCompass(
force = false,
compassPath = COMPASS_DESKTOP_PATH
): Promise<void> {
if (!force) {
try {
await getCompassBuildMetadata();
return;
} catch (e) {
// No compass build found, let's build it
}
try {
await getCompassBuildMetadata();
return;
} catch (e) {
/* ignore */
}

if (process.env.COMPASS_APP_PATH && process.env.COMPASS_APP_NAME) {
throw new Error('We did not expect to have to build Compass');
}

debug("No Compass build found, let's build it");
await packageCompassAsync({
dir: compassPath,
skip_installer: true,
Expand Down
4 changes: 0 additions & 4 deletions packages/compass-e2e-tests/helpers/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,6 @@ export const CreateCollectionCreateButton =
'[data-testid="create-collection-modal"] [data-testid="submit-button"]';
export const CreateCollectionCancelButton =
'[data-testid="create-collection-modal"] [data-testid="cancel-button"]';
export const CreateCollectionCappedCheckboxLabel =
'[data-testid="capped-collection-fields"] [data-testid="capped-collection-fields-label"]';
export const CreateCollectionCappedSizeInput =
'[data-testid="capped-collection-fields"] [data-testid="capped-size"]';
export const CreateCollectionCollectionOptionsAccordion =
'[data-testid="create-collection-modal"] [data-testid="additional-collection-preferences"]';
export const CreateCollectionCustomCollationCheckboxLabel =
Expand Down
Loading

0 comments on commit 1a78d04

Please sign in to comment.