Skip to content

Revert "Umutuzgur/sc 23256/pwt native code package simple" #1064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ jobs:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
# Extract the dynamic value from the canary label if present
- name: Extract CANARY_TAG
- name: Extract dynamic value from canary label
id: extract-canary
run: |
export LABELS_JSON='${{ toJson(github.event.pull_request.labels) }}'
CANARY_TAG=$(node -e "
const labels = JSON.parse(process.env.LABELS_JSON || '[]');
const canaryLabel = labels.find(label => label.name.startsWith('canary:'));
if (canaryLabel) console.log(canaryLabel.name.split(':')[1]);
")
echo "CANARY_TAG=$CANARY_TAG" >> $GITHUB_ENV
if [[ "${GITHUB_EVENT_LABEL_NAME}" == canary:* ]]; then
CANARY_TAG="${GITHUB_EVENT_LABEL_NAME#canary:}"
echo "CANARY_TAG=${CANARY_TAG}" >> $GITHUB_ENV
fi
env:
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
# Ensure that the README is published with the package
- run: rm -f packages/cli/README.md && cp README.md packages/cli
- run: echo "PR_VERSION=0.0.0-pr.${{github.event.pull_request.number}}.$(git rev-parse --short HEAD)" >> $GITHUB_ENV
Expand All @@ -37,13 +36,10 @@ jobs:
# Publish to npm with the additional tag if CANARY_TAG is set
- run: |
npm publish --workspace packages/cli --tag experimental
if [[ -n "$CANARY_TAG" ]]; then
echo "Publishing with additional tag: $CANARY_TAG"
npm dist-tag add checkly@$PR_VERSION $CANARY_TAG
fi
if [[ -n "${{ env.CANARY_TAG }}" ]]; then
npm dist-tag add checkly@${{ env.PR_VERSION }} ${{ env.CANARY_TAG }}
fi
env:
CANARY_TAG: ${{ env.CANARY_TAG }}
PR_VERSION: ${{ env.PR_VERSION }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: marocchino/sticky-pull-request-comment@v2
with:
Expand Down
11,316 changes: 10,573 additions & 743 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,9 @@
"@oclif/plugin-not-found": "^3.2.44",
"@oclif/plugin-plugins": "^5.4.36",
"@oclif/plugin-warn-if-update-available": "^3.1.35",
"@types/archiver": "6.0.3",
"@typescript-eslint/typescript-estree": "^8.30.0",
"acorn": "^8.14.1",
"acorn-walk": "^8.3.4",
"archiver": "7.0.1",
"axios": "^1.8.4",
"chalk": "^4.1.2",
"ci-info": "^4.2.0",
Expand All @@ -91,7 +89,6 @@
"jwt-decode": "^3.1.2",
"log-symbols": "^4.1.0",
"luxon": "^3.6.1",
"minimatch": "9.0.5",
"mqtt": "^5.11.0",
"open": "^8.4.2",
"p-queue": "^6.6.2",
Expand Down
18 changes: 1 addition & 17 deletions packages/cli/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { Runtime } from '../rest/runtimes'
import {
Check, AlertChannelSubscription, AlertChannel, CheckGroup, Dashboard,
MaintenanceWindow, PrivateLocation, PrivateLocationCheckAssignment, PrivateLocationGroupAssignment,
Project, ProjectData, BrowserCheck, PlaywrightCheck,
Project, ProjectData, BrowserCheck,
} from '../constructs'
import chalk from 'chalk'
import { splitConfigFilePath, getGitInformation } from '../services/util'
Expand Down Expand Up @@ -114,9 +114,6 @@ export default class Deploy extends AuthCommand {
defaultRuntimeId: account.runtimeId,
verifyRuntimeDependencies,
checklyConfigConstructs,
playwrightConfigPath: checklyConfig.checks?.playwrightConfigPath,
include: checklyConfig.checks?.include,
playwrightChecks: checklyConfig.checks?.playwrightChecks,
})
const repoInfo = getGitInformation(project.repoUrl)

Expand All @@ -131,19 +128,6 @@ export default class Deploy extends AuthCommand {
}
check.snapshots = await uploadSnapshots(check.rawSnapshots)
}

for (const check of Object.values(project.data.check)) {
// TODO: Improve bundling and uploading
if (!(check instanceof PlaywrightCheck) || check.codeBundlePath) {
continue
}
const {
relativePlaywrightConfigPath, browsers, key,
} = await PlaywrightCheck.bundleProject(check.playwrightConfigPath, check.include)
check.codeBundlePath = key
check.browsers = browsers
check.playwrightConfigPath = relativePlaywrightConfigPath
}
}

const projectPayload = project.synthesize(false)
Expand Down
19 changes: 1 addition & 18 deletions packages/cli/src/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { loadChecklyConfig } from '../services/checkly-config-loader'
import { filterByFileNamePattern, filterByCheckNamePattern, filterByTags } from '../services/test-filters'
import type { Runtime } from '../rest/runtimes'
import { AuthCommand } from './authCommand'
import { BrowserCheck, Check, HeartbeatCheck, MultiStepCheck, PlaywrightCheck, Project, RetryStrategyBuilder, Session } from '../constructs'
import { BrowserCheck, Check, HeartbeatCheck, MultiStepCheck, Project, RetryStrategyBuilder, Session } from '../constructs'
import type { Region } from '..'
import { splitConfigFilePath, getGitInformation, getCiInformation, getEnvs } from '../services/util'
import { createReporters, ReporterType } from '../reporters/reporter'
Expand Down Expand Up @@ -146,7 +146,6 @@ export default class Test extends AuthCommand {
'update-snapshots': updateSnapshots,
retries,
'verify-runtime-dependencies': verifyRuntimeDependencies,
playwrightConfig,
} = flags
const filePatterns = argv as string[]

Expand Down Expand Up @@ -183,9 +182,6 @@ export default class Test extends AuthCommand {
defaultRuntimeId: account.runtimeId,
verifyRuntimeDependencies,
checklyConfigConstructs,
playwrightConfigPath: checklyConfig.checks?.playwrightConfigPath,
include: checklyConfig.checks?.include,
playwrightChecks: checklyConfig.checks?.playwrightChecks,
})
const checks = Object.entries(project.data.check)
.filter(([, check]) => {
Expand Down Expand Up @@ -234,19 +230,6 @@ export default class Test extends AuthCommand {
check.snapshots = await uploadSnapshots(check.rawSnapshots)
}

for (const check of checks) {
// TODO: Improve bundling and uploading
if (!(check instanceof PlaywrightCheck) || check.codeBundlePath) {
continue
}
const {
relativePlaywrightConfigPath, browsers, key,
} = await PlaywrightCheck.bundleProject(check.playwrightConfigPath, check.include)
check.codeBundlePath = key
check.browsers = browsers
check.playwrightConfigPath = relativePlaywrightConfigPath
}

if (this.fancy) {
ux.action.stop()
}
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/constructs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ export * from './telegram-alert-channel'
export * from './status-page'
export * from './status-page-service'
export * from './incident'
export * from './playwright-check'
124 changes: 0 additions & 124 deletions packages/cli/src/constructs/playwright-check.ts

This file was deleted.

12 changes: 6 additions & 6 deletions packages/cli/src/reporters/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ export default class ListReporter extends AbstractListReporter {
printLn(formatCheckTitle(CheckStatus.RETRIED, checkResult, { printRetryDuration: true }))
printLn(indentString(formatCheckResult(checkResult), 4), 2, 1)
if (links) {
printLn(indentString('View result: ' + chalk.underline.cyan(links.testResultLink), 4))
printLn(indentString('View result: ' + chalk.underline.cyan(`${links.testResultLink}`), 4))
if (links.testTraceLinks?.length) {
// TODO: print all video files URLs
printLn(indentString('View trace : ' + links.testTraceLinks.map(link => chalk.underline.cyan(link)).join(', '), 4))
printLn(indentString('View trace : ' + chalk.underline.cyan(links.testTraceLinks.join(', ')), 4))
}
if (links.videoLinks?.length) {
// TODO: print all trace files URLs
printLn(indentString('View video : ' + links.videoLinks.map(link => chalk.underline.cyan(link)).join(', '), 4))
printLn(indentString('View video : ' + chalk.underline.cyan(`${links.videoLinks.join(', ')}`), 4))
}
printLn('')
}
Expand All @@ -76,14 +76,14 @@ export default class ListReporter extends AbstractListReporter {
}

if (links) {
printLn(indentString('View result: ' + chalk.underline.cyan(links.testResultLink), 4))
printLn(indentString('View result: ' + chalk.underline.cyan(`${links.testResultLink}`), 4))
if (links.testTraceLinks?.length) {
// TODO: print all video files URLs
printLn(indentString('View trace : ' + links.testTraceLinks.map(link => chalk.underline.cyan(link)).join(', '), 4))
printLn(indentString('View trace : ' + chalk.underline.cyan(links.testTraceLinks.join(', ')), 4))
}
if (links.videoLinks?.length) {
// TODO: print all trace files URLs
printLn(indentString('View video : ' + links.videoLinks.map(link => chalk.underline.cyan(link)).join(', '), 4))
printLn(indentString('View video : ' + chalk.underline.cyan(`${links.videoLinks.join(', ')}`), 4))
}
printLn('')
}
Expand Down
8 changes: 0 additions & 8 deletions packages/cli/src/rest/checkly-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ class ChecklyStorage {
)
}

uploadCodeBundle (stream: Readable, size: number) {
return this.api.post<{ key: string }>(
'/next/checkly-storage/upload-code-bundle',
stream,
{ headers: { 'Content-Type': 'application/octet-stream', 'content-length': size } },
)
}

download (key: string) {
return this.api.post('/next/checkly-storage/download', { key }, { responseType: 'stream' })
}
Expand Down

This file was deleted.

Loading
Loading