Skip to content
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

Release 11.1.0 #4333

Closed
4 tasks done
hudochenkov opened this issue Oct 8, 2019 · 21 comments
Closed
4 tasks done

Release 11.1.0 #4333

hudochenkov opened this issue Oct 8, 2019 · 21 comments

Comments

@hudochenkov
Copy link
Member

hudochenkov commented Oct 8, 2019

Going to release tomorrow.

  • stylelint release
  • stylelint-demo update
  • stylelint.io update
  • tweet
@hudochenkov hudochenkov added status: wip is being worked on by someone and removed status: wip is being worked on by someone labels Oct 9, 2019
@hudochenkov
Copy link
Member Author

No release for now. Out of blue 17 failed tests on Windows.

I the common theme:

    expect(received).toBe(expected) // Object.is equality

    Expected: "D:\\a\\stylelint\\stylelint\\lib\\__tests__\\fixtures\\empty-block-with-disables.css"
    Received: "d:\\a\\stylelint\\stylelint\\lib\\__tests__\\fixtures\\empty-block-with-disables.css"

Looks like path that known to stylelint and path which we get from Node.js path in tests, are different.

Maybe one of our dependencies had release in the past 5 hours and it broke something. 5 hours ago we had green CI.

@hudochenkov
Copy link
Member Author

I wish we had package-lock.json to confirm this :(

@alexander-akait
Copy link
Member

@hudochenkov maybe it is time to lock file? I have been proposing to do this for a long time 😄

@vankop
Copy link
Member

vankop commented Oct 9, 2019

It is dep of one of out dep as I see =) because I can not find any released one

@vankop
Copy link
Member

vankop commented Oct 9, 2019

As I understand current 11.0.0 also affected

@hudochenkov
Copy link
Member Author

Does anyone has local stylelint repository with node_modules installed at least 7 hours ago? Could you remove .npmrc and run npm i --package-lock-only to create package-lock and then share it with me?

@vankop
Copy link
Member

vankop commented Oct 9, 2019

@vankop
Copy link
Member

vankop commented Oct 9, 2019

oh sorry it is not master =( but you can compare

@vankop
Copy link
Member

vankop commented Oct 9, 2019

latest changes for me
Снимок экрана 2019-10-09 в 16 06 36

@hudochenkov
Copy link
Member Author

It might be Github Actions fault. Failing are inconsistent. Sometimes they happen, sometimes — not. No restart for master latest commit fix the build. But restarts in #4334 fixed the build once.

What I noticed between successful runs and failed, that Github Actions setup environment with different paths!

On success it uses D:\, on fails it uses d:\.

Fail
Run actions/checkout@v1

remote: Counting objects:   9% (16/175)        
Run actions/checkout@v1
Added matchers: 'checkout-git'. Problem matchers scan action output for known warning or error strings and report these inline.
##[add-matcher]d:\a\_temp\git_794fe967-2362-44f8-b1e3-29892fc485ec.json
Syncing repository: stylelint/stylelint
git version
git version 2.23.0.windows.1
git lfs version
git-lfs/2.8.0 (GitHub; windows amd64; go 1.12.2; git 30af66bb)
git init "d:\a\stylelint\stylelint"
Initialized empty Git repository in d:/a/stylelint/stylelint/.git/

-----------------

Use Node.js 10

##[add-matcher]d:\a\_actions\actions\setup-node\v1\.github\eslint-compact.json
Run actions/setup-node@v1
##[add-path]C:\hostedtoolcache\windows\node\10.16.3\x64
Added matchers: 'tsc'. Problem matchers scan action output for known warning or error strings and report these inline.
##[add-matcher]d:\a\_actions\actions\setup-node\v1\.github\tsc.json
Added matchers: 'eslint-stylish'. Problem matchers scan action output for known warning or error strings and report these inline.
##[add-matcher]d:\a\_actions\actions\setup-node\v1\.github\eslint-stylish.json
Added matchers: 'eslint-compact'. Problem matchers scan action output for known warning or error strings and report these inline.
##[add-matcher]d:\a\_actions\actions\setup-node\v1\.github\eslint-compact.json

-------------

Install latest npm

added 430 packages from 839 contributors in 41.564s
Run npm install --global npm@latest
C:\npm\prefix\npm -> C:\npm\prefix\node_modules\npm\bin\npm-cli.js
C:\npm\prefix\npx -> C:\npm\prefix\node_modules\npm\bin\npx-cli.js
Success
Run actions/checkout@v1

##[remove-matcher owner=checkout-git]
Run actions/checkout@v1
Added matchers: 'checkout-git'. Problem matchers scan action output for known warning or error strings and report these inline.
##[add-matcher]D:\a\_temp\git_d099a675-108d-4641-a091-932d1275b73d.json
Syncing repository: stylelint/stylelint
git version
git version 2.23.0.windows.1
git lfs version
git-lfs/2.8.0 (GitHub; windows amd64; go 1.12.2; git 30af66bb)
git init "D:\a\stylelint\stylelint"
Initialized empty Git repository in D:/a/stylelint/stylelint/.git/

----------------------------

Use Node.js 10

##[add-matcher]D:\a\_actions\actions\setup-node\v1\.github\eslint-compact.json
Run actions/setup-node@v1
##[add-path]C:\hostedtoolcache\windows\node\10.16.3\x64
Added matchers: 'tsc'. Problem matchers scan action output for known warning or error strings and report these inline.
##[add-matcher]D:\a\_actions\actions\setup-node\v1\.github\tsc.json
Added matchers: 'eslint-stylish'. Problem matchers scan action output for known warning or error strings and report these inline.
##[add-matcher]D:\a\_actions\actions\setup-node\v1\.github\eslint-stylish.json
Added matchers: 'eslint-compact'. Problem matchers scan action output for known warning or error strings and report these inline.
##[add-matcher]D:\a\_actions\actions\setup-node\v1\.github\eslint-compact.json

---------------------

Install latest npm

added 430 packages from 839 contributors in 25.741s
Run npm install --global npm@latest
C:\npm\prefix\npx -> C:\npm\prefix\node_modules\npm\bin\npx-cli.js
C:\npm\prefix\npm -> C:\npm\prefix\node_modules\npm\bin\npm-cli.js

@vankop
Copy link
Member

vankop commented Oct 9, 2019

you mean Node.js itself returns D:\, however real disk is d:\ ?

@hudochenkov
Copy link
Member Author

Yeah. Real disk is different between jobs runs. And also Node.js doesn't match disk sometimes.

@vankop
Copy link
Member

vankop commented Oct 9, 2019

I can not find this code in JS https://github.com/nodejs/node/blob/master/lib/fs.js#L1418 , but it possible that C/C++ already returns path with different cases

@vankop
Copy link
Member

vankop commented Oct 9, 2019

Looks like path that known to stylelint and path which we get from Node.js path in tests, are different.

I have checked tests, this is very strange behavior. I think exact behavior is that:

  • our code always path same absolute path
  • Node.js/OS interprets path as correct, because in Windows path are case insensitive (normally).
  • in expect case we check path as case sensitive (somehow we get correct path with lowercased d)

@hudochenkov
Copy link
Member Author

I did a lot of investigation and the problem lies in two places.

First, Github Actions randomly use d: or D: as drive letter, at the same time they always have Node.js installed on C: drive.

Second, Node.js butchering file path:

console.log(process.cwd());
// 'd:\\a\\stylelint\\stylelint'

console.log(__dirname);
// 'D:\\a\\stylelint\\stylelint\\lib\\__tests__'

console.log({ path.join(__dirname, 'fixtures'));
// 'D:\\a\\stylelint\\stylelint\\lib\\__tests__\\fixtures'

What solution I see is to contact Github support and to ask make drive letter always uppercase. It's probably a bug, that it's sometimes lowercased. I'm going to contact them tomorrow.

@vankop
Copy link
Member

vankop commented Oct 9, 2019

As I mentioned above it does not make sense for Windows, because all paths in Windows are case insensitive (so it is our problem, if we check it as case sensitive or one of our dependency returns different path). Anyway it will be great, if github support will clarify this.

@vankop
Copy link
Member

vankop commented Oct 9, 2019

Second, Node.js butchering file path:

console.log(process.cwd());
// 'd:\\a\\stylelint\\stylelint'

console.log(__dirname);
// 'D:\\a\\stylelint\\stylelint\\lib\\__tests__'

console.log({ path.join(__dirname, 'fixtures'));
// 'D:\\a\\stylelint\\stylelint\\lib\\__tests__\\fixtures'

process.cwd making system call each time, so there is no Node.js stuff behind. As process.env and other os functionality

@hudochenkov
Copy link
Member Author

I contacted Github support. Hoping for the fast resolution.

@hudochenkov hudochenkov added the status: wip is being worked on by someone label Oct 10, 2019
@hudochenkov
Copy link
Member Author

Because tests are actually ok, and things are breaking because of inconsistent Github Actions environment. I'm going to release stylelint.

@hudochenkov
Copy link
Member Author

New version released, but I'm not going to tweet yet. Looks like I messed up a little bit (stylelint/stylelint-demo#177 (comment)).

@hudochenkov
Copy link
Member Author

Thank you everyone for the release!

@hudochenkov hudochenkov removed the status: wip is being worked on by someone label Oct 10, 2019
This was referenced Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants