Skip to content

Commit

Permalink
Merge branch 'main' of github.com:evergreen-ci/ui into dependabot/npm…
Browse files Browse the repository at this point in the history
…_and_yarn/leafygreen-ui/tooltip-11.1.0
  • Loading branch information
SupaJoon committed Sep 10, 2024
2 parents 944c9c1 + 33aca0a commit 45df4aa
Show file tree
Hide file tree
Showing 82 changed files with 321 additions and 1,612 deletions.
7 changes: 2 additions & 5 deletions apps/parsley/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,14 @@ develop against them you will need to run both of the servers locally.
**Logkeeper**

1. Clone the [Logkeeper Repository](https://github.com/evergreen-ci/logkeeper)
2. Run `yarn bootstrap-logkeeper` to download some sample resmoke logs from s3.
2. Run `yarn bootstrap-s3-logs` to download some sample resmoke logs from s3.
3. Run the command outputted by the previous step to seed the env variables and
start the local logkeeper server
start the local logkeeper server with the following command:

```bash
LK_CORS_ORIGINS=http:\/\/localhost:\\d+ LK_EVERGREEN_ORIGIN=http://localhost:8080 LK_PARSLEY_ORIGIN=http://localhost:5173 go run main/logkeeper.go --localPath {abs_path_to_parsley}/bin/_bucketdata
```

Note that all log output is piped to a file named `logkeeperapp.log`. You can
use `tail -f logkeeperapp.log` to view the log output.

### GraphQL Type Generation

To be able to use code generation, you'll need to create a symlink to the
Expand Down
4 changes: 2 additions & 2 deletions apps/parsley/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "parsley",
"version": "2.1.56",
"version": "2.1.58",
"private": true,
"type": "module",
"scripts": {
"bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh",
"bootstrap-s3-logs": "../../scripts/bootstrap-s3-logs.sh",
"build": "tsc && GIT_SHA=`git rev-parse HEAD` APP_VERSION=$npm_package_version vite build",
"build:local": "env-cmd -e local -r .env-cmdrc.local.json yarn build",
"build:beta": "env-cmd -e beta yarn build",
Expand Down
68 changes: 60 additions & 8 deletions apps/parsley/src/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,14 @@ export type GeneralSubscription = {
triggerData?: Maybe<Scalars["StringMap"]["output"]>;
};

export type GeneratedTaskCountResults = {
__typename?: "GeneratedTaskCountResults";
buildVariantName?: Maybe<Scalars["String"]["output"]>;
estimatedTasks: Scalars["Int"]["output"];
taskId?: Maybe<Scalars["String"]["output"]>;
taskName?: Maybe<Scalars["String"]["output"]>;
};

export type GitHubDynamicTokenPermissionGroup = {
__typename?: "GitHubDynamicTokenPermissionGroup";
name: Scalars["String"]["output"];
Expand Down Expand Up @@ -748,6 +756,8 @@ export type Host = {
distro?: Maybe<DistroInfo>;
distroId?: Maybe<Scalars["String"]["output"]>;
elapsed?: Maybe<Scalars["Time"]["output"]>;
/** events returns the event log entries for a given host. */
events: HostEvents;
expiration?: Maybe<Scalars["Time"]["output"]>;
homeVolume?: Maybe<Volume>;
homeVolumeID?: Maybe<Scalars["String"]["output"]>;
Expand All @@ -770,6 +780,13 @@ export type Host = {
volumes: Array<Volume>;
};

/** Host models a host, which are used for things like running tasks or as virtual workstations. */
export type HostEventsArgs = {
limit?: InputMaybe<Scalars["Int"]["input"]>;
page?: InputMaybe<Scalars["Int"]["input"]>;
sortDir?: InputMaybe<SortDirection>;
};

export type HostAllocatorSettings = {
__typename?: "HostAllocatorSettings";
acceptableHostIdleTime: Scalars["Duration"]["output"];
Expand Down Expand Up @@ -1616,7 +1633,7 @@ export type Patch = {
createTime?: Maybe<Scalars["Time"]["output"]>;
description: Scalars["String"]["output"];
duration?: Maybe<PatchDuration>;
generatedTaskCounts: Scalars["Map"]["output"];
generatedTaskCounts: Array<GeneratedTaskCountResults>;
githash: Scalars["String"]["output"];
hidden: Scalars["Boolean"]["output"];
id: Scalars["ID"]["output"];
Expand Down Expand Up @@ -1879,7 +1896,6 @@ export type Project = {
perfEnabled?: Maybe<Scalars["Boolean"]["output"]>;
periodicBuilds?: Maybe<Array<PeriodicBuild>>;
prTestingEnabled?: Maybe<Scalars["Boolean"]["output"]>;
private?: Maybe<Scalars["Boolean"]["output"]>;
projectHealthView: ProjectHealthView;
remotePath: Scalars["String"]["output"];
repo: Scalars["String"]["output"];
Expand Down Expand Up @@ -2018,7 +2034,6 @@ export type ProjectInput = {
perfEnabled?: InputMaybe<Scalars["Boolean"]["input"]>;
periodicBuilds?: InputMaybe<Array<PeriodicBuildInput>>;
prTestingEnabled?: InputMaybe<Scalars["Boolean"]["input"]>;
private?: InputMaybe<Scalars["Boolean"]["input"]>;
projectHealthView?: InputMaybe<ProjectHealthView>;
remotePath?: InputMaybe<Scalars["String"]["input"]>;
repo?: InputMaybe<Scalars["String"]["input"]>;
Expand Down Expand Up @@ -2150,6 +2165,7 @@ export type Query = {
githubProjectConflicts: GithubProjectConflicts;
hasVersion: Scalars["Boolean"]["output"];
host?: Maybe<Host>;
/** @deprecated Use host.events instead. */
hostEvents: HostEvents;
hosts: HostsResponse;
image?: Maybe<Image>;
Expand Down Expand Up @@ -2180,6 +2196,7 @@ export type Query = {
userSettings?: Maybe<UserSettings>;
version: Version;
viewableProjectRefs: Array<GroupedProjects>;
waterfall?: Maybe<Waterfall>;
};

export type QueryBbGetCreatedTicketsArgs = {
Expand Down Expand Up @@ -2320,6 +2337,10 @@ export type QueryVersionArgs = {
versionId: Scalars["String"]["input"];
};

export type QueryWaterfallArgs = {
options: WaterfallOptions;
};

export type RemoveFavoriteProjectInput = {
projectIdentifier: Scalars["String"]["input"];
};
Expand Down Expand Up @@ -2366,7 +2387,6 @@ export type RepoRef = {
perfEnabled: Scalars["Boolean"]["output"];
periodicBuilds?: Maybe<Array<PeriodicBuild>>;
prTestingEnabled: Scalars["Boolean"]["output"];
private: Scalars["Boolean"]["output"];
remotePath: Scalars["String"]["output"];
repo: Scalars["String"]["output"];
repotrackerDisabled: Scalars["Boolean"]["output"];
Expand Down Expand Up @@ -2410,7 +2430,6 @@ export type RepoRefInput = {
perfEnabled?: InputMaybe<Scalars["Boolean"]["input"]>;
periodicBuilds?: InputMaybe<Array<PeriodicBuildInput>>;
prTestingEnabled?: InputMaybe<Scalars["Boolean"]["input"]>;
private?: InputMaybe<Scalars["Boolean"]["input"]>;
remotePath?: InputMaybe<Scalars["String"]["input"]>;
repo?: InputMaybe<Scalars["String"]["input"]>;
repotrackerDisabled?: InputMaybe<Scalars["Boolean"]["input"]>;
Expand Down Expand Up @@ -2553,7 +2572,6 @@ export type SleepSchedule = {
__typename?: "SleepSchedule";
dailyStartTime: Scalars["String"]["output"];
dailyStopTime: Scalars["String"]["output"];
isBetaTester?: Maybe<Scalars["Boolean"]["output"]>;
nextStartTime?: Maybe<Scalars["Time"]["output"]>;
nextStopTime?: Maybe<Scalars["Time"]["output"]>;
permanentlyExempt: Scalars["Boolean"]["output"];
Expand All @@ -2566,7 +2584,6 @@ export type SleepSchedule = {
export type SleepScheduleInput = {
dailyStartTime: Scalars["String"]["input"];
dailyStopTime: Scalars["String"]["input"];
isBetaTester?: InputMaybe<Scalars["Boolean"]["input"]>;
permanentlyExempt: Scalars["Boolean"]["input"];
shouldKeepOff: Scalars["Boolean"]["input"];
temporarilyExemptUntil?: InputMaybe<Scalars["Time"]["input"]>;
Expand Down Expand Up @@ -3278,7 +3295,7 @@ export type Version = {
errors: Array<Scalars["String"]["output"]>;
externalLinksForMetadata: Array<ExternalLinkForMetadata>;
finishTime?: Maybe<Scalars["Time"]["output"]>;
generatedTaskCounts: Scalars["Map"]["output"];
generatedTaskCounts: Array<GeneratedTaskCountResults>;
gitTags?: Maybe<Array<GitTag>>;
id: Scalars["String"]["output"];
ignored: Scalars["Boolean"]["output"];
Expand Down Expand Up @@ -3374,6 +3391,41 @@ export type VolumeHost = {
volumeId: Scalars["String"]["input"];
};

export type Waterfall = {
__typename?: "Waterfall";
buildVariants: Array<WaterfallBuildVariant>;
versions: Array<Version>;
};

export type WaterfallBuild = {
__typename?: "WaterfallBuild";
activated?: Maybe<Scalars["Boolean"]["output"]>;
displayName: Scalars["String"]["output"];
id: Scalars["String"]["output"];
tasks: Array<WaterfallTask>;
version: Scalars["String"]["output"];
};

export type WaterfallBuildVariant = {
__typename?: "WaterfallBuildVariant";
builds: Array<WaterfallBuild>;
displayName: Scalars["String"]["output"];
id: Scalars["String"]["output"];
};

export type WaterfallOptions = {
limit?: InputMaybe<Scalars["Int"]["input"]>;
projectIdentifier: Scalars["String"]["input"];
requesters?: InputMaybe<Array<Scalars["String"]["input"]>>;
};

export type WaterfallTask = {
__typename?: "WaterfallTask";
displayName: Scalars["String"]["output"];
id: Scalars["String"]["output"];
status: Scalars["String"]["output"];
};

export type Webhook = {
__typename?: "Webhook";
endpoint: Scalars["String"]["output"];
Expand Down
9 changes: 0 additions & 9 deletions apps/spruce/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ const errorIfStrict = process.env.STRICT ? ERROR : WARN;
module.exports = {
root: true,
extends: ["@evg-ui"],
overrides: [
{
files: ["src/gql/**/*.graphql"],
extends: "plugin:@graphql-eslint/operations-recommended",
rules: {
"@graphql-eslint/selection-set-depth": OFF,
},
},
],
plugins: ["check-file"],
rules: {
"check-file/filename-naming-convention": [
Expand Down
13 changes: 8 additions & 5 deletions apps/spruce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,14 @@ Spruce has a minimal dependency on Logkeeper: it is used by Cypress tests on the
Job Logs page. If you'd like to get set up to develop these tests, complete the
following:

1. Clone the [Logkeeper repository](https://github.com/evergreen-ci/logkeeper)
2. Run `yarn bootstrap-logkeeper` within Spruce to download some sample resmoke
logs from S3.
3. Run the command output by the previous step to seed the env variables and
start the local logkeeper server at http://localhost:8080.
1. Clone the [Logkeeper Repository](https://github.com/evergreen-ci/logkeeper)
2. Run `yarn bootstrap-s3-logs` to download some sample resmoke logs from s3.
3. Run the command outputted by the previous step to seed the env variables and
start the local logkeeper server with the following command:

```bash
LK_CORS_ORIGINS=http:\/\/localhost:\\d+ LK_EVERGREEN_ORIGIN=http://localhost:8080 LK_PARSLEY_ORIGIN=http://localhost:5173 go run main/logkeeper.go --localPath {abs_path_to_spruce}/bin/_bucketdata
```

## Deployment

Expand Down
83 changes: 0 additions & 83 deletions apps/spruce/cypress/integration/commit_queue.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { INCLUDE_HIDDEN_PATCHES } from "constants/cookies";

const patchWithoutVersion = "test meee";
const patchWithVersion = "main: EVG-7823 add a commit queue message (#4048)";
const patchWithVersionOnCommitQueue =
"'evergreen-ci/evergreen' pull request #3186 by bsamek: EVG-7425 Don't send ShouldExit to unprovisioned hosts (https://github.com/evergreen-ci/evergreen/pull/3186)";

const getPatchCardByDescription = (description: string) =>
cy.dataCy("patch-card").filter(`:contains(${description})`);
Expand Down Expand Up @@ -40,8 +38,6 @@ describe("Dropdown Menu of Patch Actions", () => {
cy.dataCy("schedule-patch").should("be.disabled");
});

// We shouldn't actually unschedule patchWithVersion because patchWithVersionOnCommitQueue is a downstream project
// and other integration tests will be affected.
it("'Unschedule' link opens popconfirm and unschedules patch", () => {
getPatchCardByDescription(patchWithVersion).within(() => {
cy.dataCy("patch-card-dropdown").click();
Expand All @@ -59,16 +55,15 @@ describe("Dropdown Menu of Patch Actions", () => {
cy.dataCy("unschedule-patch").should("be.disabled");
});

// This will generate a 'Will Run' status that is used in version/task_filters.ts
it("'Restart' link shows restart patch modal", () => {
getPatchCardByDescription(patchWithVersionOnCommitQueue).within(() => {
getPatchCardByDescription(patchWithVersion).within(() => {
cy.dataCy("patch-card-dropdown").click();
});
cy.dataCy("restart-version").click({ force: true });

cy.dataCy("variant-accordion").first().click();
cy.dataCy("task-status-checkbox").should("exist");
cy.contains("generate-lint").click();
cy.contains("asdf").click();
cy.dataCy("version-restart-modal").within(() => {
cy.contains("Restart").click();
});
Expand All @@ -82,20 +77,6 @@ describe("Dropdown Menu of Patch Actions", () => {
cy.dataCy("restart-version").should("be.disabled");
});

it("'Add to commit queue' shows enqueue modal", () => {
getPatchCardByDescription(patchWithVersionOnCommitQueue).within(() => {
cy.dataCy("patch-card-dropdown").click();
});
cy.dataCy("enqueue-patch").should("exist");
});

it("'Add to commit queue' is disabled for unfinalized patch", () => {
getPatchCardByDescription(patchWithoutVersion).within(() => {
cy.dataCy("patch-card-dropdown").click();
});
cy.dataCy("enqueue-patch").should("be.disabled");
});

it("Toggle patch visibility", () => {
// "Include hidden" checkbox is not checked and patch is visible
cy.getInputByLabel("Include hidden").should("not.be.checked");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("Attaching Spruce to a repo", () => {
cy.visit(origin);
});

it("Saves and attaches new repo and shows warnings on the Github/Commit Queue page", () => {
it("Saves and attaches new repo and shows warnings on the Github page", () => {
cy.dataCy("repo-input").as("repoInput").clear();
cy.get("@repoInput").type("evergreen");
cy.dataCy("attach-repo-button").should(
Expand Down
Loading

0 comments on commit 45df4aa

Please sign in to comment.