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

config: sync local/CI Prettier and Restyled #2774

Merged
merged 10 commits into from
Sep 9, 2021
Merged

Conversation

jorgeorpinel
Copy link
Contributor

@jorgeorpinel jorgeorpinel commented Sep 1, 2021

for #2641

Should close #2641

@shcheklein shcheklein temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 1, 2021 00:03 Inactive
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Sep 1, 2021

☝️ Local format checks passed for the above commit (good change):

image

CI checks and Restyled also passed:

image

@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 1, 2021 00:06 Inactive
@jorgeorpinel jorgeorpinel changed the title [TEST] change content/docs/user-guide/contributing/blog.md config: sync local/CI Prettier and Restyled Sep 1, 2021
@jorgeorpinel jorgeorpinel added the dependencies Pull requests that update a dependency file (automatic) label Sep 1, 2021
@jorgeorpinel
Copy link
Contributor Author

☝️ I skipped local tests with the above commit (git commit -n) since I knew the formatting is wrong.

The CI tests failed but Restyled (which took a while BTW) is passing 🤔

@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 1, 2021 00:20 Inactive
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Sep 1, 2021

☝️ For some reason reverting #2624 (review) makes Restyled work again. Maybe it can't process that many files? Cc @casperdcl

@jorgeorpinel jorgeorpinel marked this pull request as ready for review September 1, 2021 00:22
@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 1, 2021 00:23 Inactive
@jorgeorpinel
Copy link
Contributor Author

Please review but don't merge (since checks are failing) @shcheklein. We need to revert the changes to content/docs/user-guide/contributing/blog.md once this is approved. Thanks

@shcheklein
Copy link
Member

Thanks @jorgeorpinel . What was the reason for the discrepancy?

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Sep 1, 2021

I don't think it's a discrepancy @shcheklein. My hypothesis is that Restyled isn't able to process that many files (see #2624 (review)). TBH I'm not sure what the problem is here but for now this seems to help.

If there's a discrepancy then there are 2 problems. I didn't investigate that aspect much ⏳

@shcheklein
Copy link
Member

Is there a link to logs / Restyled PR that we think it did wrong?

@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 1, 2021 00:42 Inactive
@jorgeorpinel
Copy link
Contributor Author

If there's a discrepancy

I sorted the Prettier settings in both config files in 36ae1cf to compare them easily and they seem to be the same. There could be a Prettier version discrepancy I guess but I doubt it or that it would cause a problem.

Is there a link to logs / Restyled PR that we think it did wrong?

There's https://restyled.io/gh/iterative/repos/dvc.org/jobs, let me see if I can find something in there... ⏳

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Sep 1, 2021

The logs are not super informative. They only output when it decided to format files, but doesn't show the output of Prettier itself.

image
Examlpe: https://restyled.io/gh/iterative/repos/dvc.org/jobs/1096523

@shcheklein
Copy link
Member

so, it does change blog.md .. but that's expected, right?

@jorgeorpinel
Copy link
Contributor Author

it does change blog.md

@shcheklein yeah sorry for the confusion. That log is from the current config (where it works as intended). For the previous config (when Restyled always passed) it doesn't say anything useful:

image
Example: https://restyled.io/gh/iterative/repos/dvc.org/jobs/1096496

@jorgeorpinel jorgeorpinel self-assigned this Sep 1, 2021
@casperdcl
Copy link
Contributor

casperdcl commented Sep 1, 2021

note there may also be issues with eslint (iterative/setup-dvc#22)

For me, doing this:

then

  • yarn lint-ts: finds 5 errors
  • yarn lint-css: succeeds
  • yarn format-all: 10 files changed, 57 insertions(+), 60 deletions(-)
  • npm update: updates 10 package versions in package.json

Opened a PR at #2779 for the above. Not sure if it's related to this (#2774) PR.

@shcheklein
Copy link
Member

Let's try to get run if { } in the config, but keep all the patterns:

    include: 
      - "**/*.md"
      - "**/*.jsx"
      - "**/*.tsx"
      - "**/*.js"
      - "**/*.ts"
      - "**/*.json"

@shcheklein
Copy link
Member

I would also create a ticket/ask in the resyled repo- it's open source, they can help.

@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 9, 2021 18:38 Inactive
@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 9, 2021 18:44 Inactive
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Sep 9, 2021

to make it consistent with the package.json settings

Right, the check does format-check indeed. I think originally Restyled intended to replace the local Git hook instead though, for people who don't install yarn locally (e.g. edit via Github) and that only runs format-staged. But anyway, it should be consistent with the GH action check indeed, I suppose.

Let's try to get run if { } in the config, but keep all the patterns

Done in 26fc2e3 (after master merge). Seems to be working for now 🤔 (see Restyled run).

@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 9, 2021 18:48 Inactive
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Sep 9, 2021

Seems to be working

I retested the previous config file and Restyled stopped failing again (unwanted behavior). So I guess it was just a config file formatting issue after all. Good catch @shcheklein ! I force pushed 26fc2e3 again now and it looks good:

image

I'm going to merge #2775 to fix the formatting here. Everything should pass after that. Please approve/merge 🙂

@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 9, 2021 18:57 Inactive
shcheklein
shcheklein previously approved these changes Sep 9, 2021
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Sep 9, 2021

Wait I still need to roll back the dummy content changes. I'll merge it...

Comment on lines 43 to 44
---

```
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shoot so now Restyled removed this line but prettier adds it back, so the check is failing... Looks like there's still a config discrepancy somewhere 😕

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm I reintroduced the line in a9b208e and Restyled left it alone this time 🤷

@jorgeorpinel jorgeorpinel dismissed shcheklein’s stale review September 9, 2021 19:07

Some more research is still needed.

@jorgeorpinel
Copy link
Contributor Author

OK everything is actually passing now. I think we can reapprove and merge this now @shcheklein. Sorry for the confusion. I'll keep an eye on it... 👀

.restyled.yaml Outdated
]
include: ['**/*.{js,json,md,yaml,yml}']
include:
Copy link
Member

Choose a reason for hiding this comment

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

I would put a comment here, btw

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in f61f8be.

@jorgeorpinel jorgeorpinel temporarily deployed to dvc-org-test-resyled-2qdj0rgnl September 9, 2021 22:29 Inactive
@jorgeorpinel jorgeorpinel merged commit c0ba287 into master Sep 9, 2021
@jorgeorpinel jorgeorpinel deleted the test-resyled branch September 9, 2021 22:30
karajan1001 pushed a commit to karajan1001/dvc.org that referenced this pull request Sep 29, 2021
* test: change content/docs/user-guide/contributing/blog.md
for iterative#2641

* test: bad change to .../contributing/blog.md

* test: try reverting iterative@2dd2e91#diff-eb41540235b5687201bb19ed968c284453eea68563f5908a6e15ed8cbfa959de

* format .restyled.yaml

* config: sort prettier settings by abc

* test: expanded Restyled config file
per iterative#2774 (comment)

* Restyled by prettier (iterative#2775)

Co-authored-by: Restyled.io <[email protected]>

* guide: roll back dummy changes (fixes formatting)

* resyled: add comment on matching path pattern
per iterative#2774 (review)

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <[email protected]>
rogermparent pushed a commit that referenced this pull request Sep 30, 2021
* test: change content/docs/user-guide/contributing/blog.md
for #2641

* test: bad change to .../contributing/blog.md

* test: try reverting 2dd2e91#diff-eb41540235b5687201bb19ed968c284453eea68563f5908a6e15ed8cbfa959de

* format .restyled.yaml

* config: sort prettier settings by abc

* test: expanded Restyled config file
per #2774 (comment)

* Restyled by prettier (#2775)

Co-authored-by: Restyled.io <[email protected]>

* guide: roll back dummy changes (fixes formatting)

* resyled: add comment on matching path pattern
per #2774 (review)

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <[email protected]>
rogermparent added a commit that referenced this pull request Oct 19, 2021
* Add tbd comment to pages/404.tsx

* Add comment to 404 page

* Update gatsby 2 to 3
* update needed dependencies to get gatsby 3 working
* add gatsby-plugin-image

* Update gatsby-source-github-api

* Take off tbd comment in 404.tsx

* Delete unneeded file in .github/workflows

* Fix attempted imported css warnings

* Add tbd comment to 404.tsx

* Rollback [email protected] to 3.6.0

* Remove comment in 404 page

* Move gatsby pkg back to 3.10.2

* Add tbd comment in 404 page

* Update outdated packages

* Delete tbd comment in 404 page

* Place console.log in DefaultSEO

* Run 'yarn upgrade'

* Delete comment in 404.tsx

* Upgrade @reach/portal

* Delete console.log in DefaultSeo

* Update @react/portal

* Upgrade some packages

* Update some packages

* Add tbd comment in 404.tsx

* Delete tbd comment

* Test static query

* Refactor useGlossary hook

* Move gatsby to 3.9.0

* Add tbd comment

* Update gatsby to 3.8.0

* Delete comment in 404 page

* Move gatsby to 3.6.0

* Add tbd comment

* Move gatsby to 3.4.0

* Delete comment in 404 page

* Move gatsby to 3.2.0

* Add tbd comment in 404 page

* Delete comment in 404 page

* Move gatsby to 3.0.0

* Add tbd comment in 404 page

* Update gatsby to 2.32.12

* Add tbd comment in 404 page

* Update gatsby to 3.14.0

* Move gatsby to 3.10.2

* Delete and recreate yarn.lock

* Delete tbd comment

* Update typescript to 4.4.2

* Update package.json and yarn.lock to match 1be35ce

* Add tbd comment

* Delete test query from siteMeta

* Delete console.log in siteMeta.ts

* Remove resolutions from package.json

* Delete tbd comment

* Upgrade gatsby

* Revert "Test static query"

This reverts commit 51a6012.

* Add PQR flag

* Upgrade gatsby-*-sharp and add lmdb-store

* Remove picture.small

* Update to node 16

* Add tbd comment

* Move gatsby to ^3.11.0

* Delete tbd comment

* Move gatsby to ^3.12.0

* Delete tbd comment

* Move gatsby to ^3.13.0

* Update some more packages

* Add dummy post

* Add ability to disable build retry in DEPLOY_OPTIONS

* Change content

* Change content

* Remove deprecated gatsby-image

* Try consecutive builds

* Undo consecutive builds experiment

* Log env

* Change content even more

* Remove dummy page

* Remove env display

* Add dummy page again

* Make an interim deploy script

* chmod +x

* Use vars and add test echos

* Remove echos and debug with which

* More debugging

* Even more debugging

* Remove debug stuff and mkdir that caused issues

* update content

* Remove dummy post

* Remove dummy blog post

* DVCLive User Guide updates (#2814)

* Updated top-level index. Refactored user-guide to top level

* Updated links

* Added dvclive-html.gif

* Explicit mention to automatic html update

* dvc 2.7.2 (#2813)

* dvc 2.7.2

* gha: update: delay by 2 hours

Co-authored-by: efiop <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>

* Fix broken dvc downlaod link check (#2820)

* config: sync local/CI Prettier and Restyled (#2774)

* test: change content/docs/user-guide/contributing/blog.md
for #2641

* test: bad change to .../contributing/blog.md

* test: try reverting 2dd2e91#diff-eb41540235b5687201bb19ed968c284453eea68563f5908a6e15ed8cbfa959de

* format .restyled.yaml

* config: sort prettier settings by abc

* test: expanded Restyled config file
per #2774 (comment)

* Restyled by prettier (#2775)

Co-authored-by: Restyled.io <[email protected]>

* guide: roll back dummy changes (fixes formatting)

* resyled: add comment on matching path pattern
per #2774 (review)

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <[email protected]>

* Added `Invalid authentication for Git Remote` to troubleshooting (#2731)

* Added note about [SSH Git URLs] in dvc exp commands

* Applied suggestions

* Updated warning

* Removed SSH from synopsis

* Added Invalid authentication for Git Remote to troubleshooting

* Added shorter title

* Applied P.R. suggestions

* Update content/docs/user-guide/troubleshooting.md

* Update content/docs/user-guide/troubleshooting.md

* Apply suggestions from code review

Co-authored-by: Jorge Orpinel <[email protected]>

* valid -> authenticated

* Format

* Update troubleshooting.md

* Removed authenticated

* Added note about git credentials

Co-authored-by: Jorge Orpinel <[email protected]>

* dvc 2.7.3 (#2829)

Co-authored-by: efiop <[email protected]>

* gha: update: run every day at 13:00 UTC

* adding sept heartbeat (#2825)

* adding sept heartbeat

* punctuation, links, code revisions

* Update content/blog/2021-09-14-september-21-dvc-heartbeat.md

* adding cover image

* corrections to description

* fix the uploaded file link

Co-authored-by: David de la Iglesia Castro <[email protected]>
Co-authored-by: rogermparent <[email protected]>
Co-authored-by: Ivan Shcheklein <[email protected]>

* Fix broken link to Azure authentication examples (#2830)

This link should point to: https://dvc.org/doc/command-reference/remote/modify#example-some-azure-authentication-methods

* gha: update download links at 18:00

* dvc 2.7.4 (#2837)

Co-authored-by: efiop <[email protected]>

* fix: correct argument order (#2842)

The order of arguments for `dvc remote rename` is reversed in the old version. 
According to the page @ `dvc remote rename -h`, the old remote `name` comes first followed by the `new` remote name argument.

* Rename all references to `get-started-experiments` to `example-dvc-experiments` (#2817)

Fixes #2784

* updating events page (#2847)

* Refactor post by Batuhan (#2835)

Co-authored-by: Batuhan Taskaya <[email protected]>
Co-authored-by: Casper da Costa-Luis <[email protected]>

* Add --show-csv flag to dvc exp show (#2740)

* Add --show-csv flag to dvc exp show

* Apply suggestions from code review

* Format problem

Co-authored-by: Jorge Orpinel <[email protected]>

* use folded block scalar type (#2871)

* Revert some unnecessary changes

* Some minor/patch package upgrades

* Add bug mitigation

* Disable PQR and bug mitigation

* Add USE_PRODUCTION_CACHE to deploy script for debugging

* Revert style import change and undo malformed comment

* Allow LayoutAlert to be false in typedef

* Remove nonstandard space and use width for spacing for lint-css

* Remove commented-out classnames

* Upgrade gatsby and some other minor/patch upgrades

* Add aptfile

* Revert "Remove commented-out classnames"

This reverts commit edae234.

* Gatsby 4 again

* Remove explicit typescript plugin and upgrade some packages

* Remove unused wrapper class

* Upgrade a bunch of packages

* upgrade plugin-feed, downgrade transformer-remark

* Update some more packages and try container stack

* Update some other packages to trigger a cache clear

* Revert stack change attempt, async setPageContext, remove Aptfile

* Upgrade CircleCI node and un-refactor glossary query

* Resolve ts-lint issues

* Prettier on content/docs/user-guide/contributing/blog.md

* Upgrade packages

* Remove composes from

* Remove source-github-api and other uses of deprecated runQuery

* Back to Gatsby 3

* Remove explicit webpack

* Use blur placeholder by default

* Fix misconfig on blur

* Upgrade some packages and remove unused lmdb-store

* yarn upgrade (lockfile only)

* Re-add typescript plugin definition (but not package.json)

* Re-add node_modules cacheDirectories

Co-authored-by: julieg18 <[email protected]>
Co-authored-by: Julie <[email protected]>
Co-authored-by: David de la Iglesia Castro <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: efiop <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>
Co-authored-by: Jorge Orpinel <[email protected]>
Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Jenifer De Figueiredo <[email protected]>
Co-authored-by: Ivan Shcheklein <[email protected]>
Co-authored-by: Jose Celano <[email protected]>
Co-authored-by: Gavin Masterson <[email protected]>
Co-authored-by: Emre Sahin <[email protected]>
Co-authored-by: Batuhan Taskaya <[email protected]>
Co-authored-by: Casper da Costa-Luis <[email protected]>
Co-authored-by: Gao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file (automatic)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

restyled: looks like there is a discrepancy between prettier and restyled
3 participants