Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

mostly moving files around + fix the sporadic job cancelling #147

Merged
merged 3 commits into from
Jan 6, 2023

Conversation

mordamax
Copy link
Contributor

@mordamax mordamax commented Jan 5, 2023

image

@@ -0,0 +1,125 @@
import assert from "assert"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved from bot.ts

@@ -0,0 +1,49 @@
import { Probot } from "probot"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved from bot.ts

@@ -0,0 +1,35 @@
import { EmitterWebhookEventName } from "@octokit/webhooks/dist-types/types"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved from bot.ts

`git clone --progress --verbose --depth 1 ${
withRef ? `--branch "$PIPELINE_SCRIPTS_REF"` : ""
} "$PIPELINE_SCRIPTS_REPOSITORY" "$PIPELINE_SCRIPTS_DIR"`
function getCiBranchName(task: Task): string {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this actually fixes the sporadic cancelling

@@ -172,68 +180,6 @@ export const runCommandInGitlabPipeline = async (ctx: Context, task: Task): Prom
return getAliveTaskGitlabContext(ctx, { id: pipeline.id, projectId: pipeline.project_id, jobWebUrl: job.web_url })
}

export function getGitlabCiYmlConfig(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to its own file

@mordamax mordamax marked this pull request as ready for review January 5, 2023 23:25
@mordamax mordamax requested a review from a team as a code owner January 5, 2023 23:25
import { PullRequestError } from "src/types"
import { getLines } from "src/utils"

export const onIssueCommentCreated: WebhookHandler<"issue_comment.created"> = async (ctx, octokit, payload) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved from bot.ts

gcc \
python3-dev \
libc-dev && \
apt-get autoremove -y
Copy link
Contributor

Choose a reason for hiding this comment

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

This all can fit nicely into the base image, having a separate CI image doesn't make much sense anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alvicsam recommended to leave as is, he will clean this up in https://github.com/paritytech/ci_cd/issues/690 💪

@@ -10,6 +10,7 @@ import { CmdJson } from "src/schema/schema.cmd"
import { CommandRunner } from "src/shell"
import { CommandConfigs } from "src/types"

export const PIPELINE_SCRIPTS_REF = "PIPELINE_SCRIPTS_REF"
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just having a constant (for autocomplete) vs hardcoding as string

mordamax and others added 2 commits January 6, 2023 11:23
@mordamax mordamax merged commit 1ff8517 into master Jan 6, 2023
@mordamax mordamax deleted the mak/sporadic-job-cancellations branch January 6, 2023 14:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move pre-commit settings to package.json command-bot jobs get auto-canceled sporadically
2 participants