Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_PARALLEL: true
ARGOS_PARALLEL_TOTAL: ${{ strategy.job-total }}
ARGOS_PARALLEL_INDEX: ${{ matrix.containers }}
ARGOS_PARALLEL_INDEX: ${{ strategy.job-index }}
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}
SPLIT_FILE: 'cypress/timings.json'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"devDependencies": {
"@applitools/eyes-cypress": "^3.44.4",
"@argos-ci/cypress": "^2.2.2",
"@argos-ci/cypress": "^2.2.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.7",
"@cspell/eslint-plugin": "^8.8.4",
Expand Down
15 changes: 15 additions & 0 deletions patches/@argos-ci__api-client.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 121ed29385ceca37f7cb6b7188709d7ec506dfa6..41092962ccde5177a261b816cffb55f6a1615d6e 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -25,6 +25,10 @@ class APIError extends Error {
*/ function throwAPIError(fetchResponse) {
const { error, response } = fetchResponse;
if (error && typeof error === "object" && "error" in error && typeof error.error === "string") {
+ const message = error.details?.[0]?.message;
+ if (message) {
+ throw new APIError(`${error.error}: ${message}`);
+ }
throw new APIError(error.error);
}
throw new APIError(`API error: ${response.status} ${response.statusText}`);
39 changes: 39 additions & 0 deletions patches/@argos-ci__core.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 5cbaad945826960a6b77b44bf9661e1c2523c16d..6df2474578cdcf2b6d26330bd23dbb48a24ecafe 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -914,13 +914,7 @@ async function uploadFilesToS3(files) {
await uploadFilesToS3(uploadFiles);
// Update build
debug("Updating build");
- const uploadBuildResponse = await apiClient.PUT("/builds/{buildId}", {
- params: {
- path: {
- buildId: result.build.id
- }
- },
- body: {
+ const body = {
screenshots: screenshots.map((screenshot)=>({
key: screenshot.hash,
name: screenshot.name,
@@ -933,9 +927,18 @@ async function uploadFilesToS3(files) {
parallelTotal: config.parallelTotal,
parallelIndex: config.parallelIndex,
metadata: params.metadata
- }
+ };
+ const uploadBuildResponse = await apiClient.PUT("/builds/{buildId}", {
+ params: {
+ path: {
+ buildId: result.build.id
+ }
+ },
+ body
});
if (uploadBuildResponse.error) {
+ console.error(JSON.stringify({body, buildId: result.build.id}, null, 2))
+ console.error(JSON.stringify(uploadBuildResponse, null, 2))
throwAPIError(uploadBuildResponse);
}
return {
29 changes: 16 additions & 13 deletions pnpm-lock.yaml

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