8000 [MABL-6856] Update Moment and Additional Improvements by twistedpair · Pull Request #53 · mablhq/github-run-tests-action · GitHub
[go: up one dir, main page]

Skip to content

[MABL-6856] Update Moment and Additional Improvements #53

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 7 commits into from
Apr 12, 2022

Conversation

twistedpair
Copy link
Contributor
@twistedpair twistedpair commented Apr 10, 2022
  • Update moment to address CVE-2022-24785
  • Update all other libraries
  • Use pinned library versions for all imports
  • Upgrade runtime from Node.js 12 (End of Life) to Node.js 16
  • Fix code typo in for APP/API URL overrides env variable names (used in testing)
  • Add timeouts to mimic mabl CLI logic to address Test Action Occasionally Gets Stuck #48

@twistedpair twistedpair requested review from gcooney and a team April 10, 2022 00:13
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as"}],
"@typescript-eslint/explicit-function-return-type": ["error"],
"@typescript-eslint/interface-name-prefix": "error",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were removed in the latest versions of eslint, and moved to a more general rule.

@@ -75,5 +75,5 @@ outputs:
description: "Number of mabl tests that failed against this deployment."

runs:
using: "node12"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moving to the future, Node.js v12 is EoL.

@@ -1,5 +1,5 @@
import {Execution, JourneyInfo} from './entities/ExecutionResult';
import Table, {HorizontalTable} from 'cli-table3';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interface changed.

@@ -140,7 +140,7 @@ export class MablApiClient {
httpHeaders: string[],
rebaselineImages: boolean,
setStaticBaseline: boolean,
event_time: number,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Non-compliant variable name.

} catch (error) {
if (error.status !== 404) {
core.warning(error.message);
} catch (error: unknown) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Required for latest Typescript compiler.

@twistedpair twistedpair removed the request for review from a team April 10, 2022 00:16
@twistedpair twistedpair changed the title Update Moment and additional minor updates Update Moment and Additional Improvements Apr 10, 2022
@@ -6,10 +6,13 @@ import axios, {AxiosInstance, AxiosRequestConfig} from 'axios';
import {Environment} from './entities/Environment';
import {USER_AGENT} from './constants';

const GET_REQUEST_TIMEOUT_MILLIS = 60_000;
const POST_REQUEST_TIMEOUT_MILLIS = 900_000;
Copy link
Contributor Author
@twistedpair twistedpair Apr 11, 2022

Choose a reason for hiding this comment

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

@jbaldassari , is this the same timeout logic you added in the CLI, for deployments pulling?
I want to address the PR description linked customer issue where this Action appears to hang.

Choose a reason for hiding this comment

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

I think it's a little bit of a different situation in mabl-cli because we have the auto-retry logic in there too, but we're using very liberal timeouts now: https://github.com/mablhq/mabl-cli/blob/master/runtime/src/api/mablApiClient.ts#L127-L130

The individual request uses no timeout (0), and the retryable wrapper uses a 1 hour timeout

Copy link
@simonychoy simonychoy left a comment

Choose a reason for hiding this comment

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

The changes LGTM, just had a question about the pinned dependencies.

@twistedpair twistedpair changed the title Update Moment and Additional Improvements [MABL-6856] Update Moment and Additional Improvements Apr 12, 2022
@twistedpair twistedpair merged commit 7cd8e8a into main Apr 12, 2022
@twistedpair twistedpair deleted the jrl-moment-update branch April 12, 2022 19:33
@twistedpair twistedpair removed the request for review from gcooney April 12, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0