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

[Bug] Step "Run markdown lint" ends with en error #44

Open
ricardojfc opened this issue Oct 2, 2023 · 7 comments · May be fixed by #76
Open

[Bug] Step "Run markdown lint" ends with en error #44

ricardojfc opened this issue Oct 2, 2023 · 7 comments · May be fixed by #76
Labels
bug Something isn't working needs engineering Requires engineering-specific changes only.

Comments

@ricardojfc
Copy link

ricardojfc commented Oct 2, 2023

Summary

Step "Run markdown lint" ends with en error and the README.md isn't updated

How to reproduce

  1. Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab

  2. Go to the Actions tab.

  3. Click New workflow.

  4. Search for "Simple workflow" and click Configure.

  5. Name your workflow ci.yml.

  6. Update the workflow to remove all steps other than the "checkout" step.

  7. Add the following step to your workflow:

    - name: Run markdown lint
      run: |
        npm install remark-cli remark-preset-lint-consistent
        npx remark . --use remark-preset-lint-consistent --frail

    Even after the code is indented properly in ci.yml, you will see a build error in GitHub Actions. We'll fix this in the next step.

  8. Click Start commit, and choose to make a new branch named ci.

  9. Click Propose a new file.

  10. Click Create pull request.

  11. Wait about 20 seconds then refresh this page (the one you're following instructions from). GitHub Actions will automatically update to the next step.

Image

@ricardojfc ricardojfc added the bug Something isn't working label Oct 2, 2023
@ricardojfc ricardojfc changed the title [Bug] Step "run markdown lint" ends with en error [Bug] Step "Run markdown lint" ends with en error Oct 2, 2023
@Gabor12321
Copy link

the task: "Update the code in the ci branch to get the test to pass." Clue: on line 18 there is a file. the issue has something to do with markdown syntax. i personally asked chat gpt, and thats how i reached to the solution after a long time.. good luck!

@cmwilson21 cmwilson21 added the needs engineering Requires engineering-specific changes only. label Nov 8, 2023
@javeedambu
Copy link

javeedambu commented Nov 19, 2023

The following line is causing the warning and error

npx remark . --use remark-preset-lint-consistent --frail

The "." is asking to check all files for markdown syntax and its warning that "resume.md" is not following the syntax.

You can use "" or "*" to markdown as italics font.
However when you use "consisent" as in the code above, then you should only use either "
" or "" throughout the file.
"resume.md" started using "_" and then later it also used "
", hence the warning.
(ref:https://www.npmjs.com/package/remark-lint-emphasis-marker/v/3.1.0)

The "--frail" will exits as failed when there is a warnings.
(ref: Search for "--frail" in the URL:https://github.com/remarkjs/remark-lint)

In short if you where to replace *Git* with _Git_ in the "resume.md" then you will not have any errors.

But then we don't get to do the LAB as per the instructions provided.

Also the error Screenshots mentioned in Step2 - "Review required" and "Merging is blocked" never occurs, as there were no Branch rules already to cause this error.

If at the beginning of the Step1, we add a step to create a branch rule requiring one reviewer approval then we get this error when attempting to perform the pull request after creating the ci.yml.

@cmwilson21
Copy link
Contributor

Linking issue #48

@skills/technical-reviewers Would ya'll mind taking a look at this one? 👀 👍

@sinsukehlab
Copy link
Contributor

This error is intentional.

Even after the code is indented properly in ci.yml, you will see a build error in GitHub Actions. We'll fix this in the next step.

@hectorsector
Copy link

@sinsukehlab is right, but I agree that the instructions expect the learner to do a lot of heavy lifting with reading so I'll leave this open but it's feedback about the course structure mostly.

@gradybarrett
Copy link

gradybarrett commented Sep 16, 2024

@sinsukehlab is right, but I agree that the instructions expect the learner to do a lot of heavy lifting with reading so I'll leave this open but it's feedback about the course structure mostly.

This error is intentional.

I don't think this is the issue. The main issue is that the Step 2 guide is written with a frame a reference that speaks to unit (or other tests), not linting. So the person trying to follow along is left wondering where the tests are - spoiler, there are none.

I'm guessing this tutorial was originally written using test failures/fixes, but then ported to linting at some point? If so, step 2 was never updated to talk about linting instead of testing - including the workflow failure screenshots, which still show a matrix run and test failures, which causes even more confusion.

@Arry-eng
Copy link

Arry-eng commented Jan 6, 2025

@gradybarrett is right in pointing out that for a new learner it is difficult to find and fix errors by just looking at few lines of error message. There were no instructions to run the job in "debug mode" either.
Looking for "remake" run script errors is not the intention of this particular skills project.

The other relevant Bug for this issue that has not been discussed/included in above issue list is that the "Step 2: Fix the test" manual (see screen shot included below) does not specifically mention that the learner has to make changes in either file README.md or resume.md file of the "ci" branch. Only a change in these two files is factually/actually needed by the Step-2-workflow's (2-fix-the-test.yml) job trigger condition through push (commit in this case) user action/activity. Please refer to the screenshots for clarity.

image
For Bug report_2  skills_test-with-actions_issues44 screenshot-1736166362300
For Bug report_3 skills_test-with-actions_issues44 Screenshot_6-1-2025_18440_github com
For Bug report_4 skills_test-with-actions_issues44 screenshot-1736167110357

@Arry-eng Arry-eng mentioned this issue Jan 6, 2025
2 tasks
Arry-eng added a commit to Arry-eng/test-with-actions that referenced this issue Jan 7, 2025
This fixes the bug skills#44 in the issues.
1- Updated the documentation to include an additional step (step-3) of changing and committing README.md file. A push to this fie would automatically trigger Step-2 workflow. 
2- Added additional, (step-2) of activity, to include instructions required for resolving an intentional issue/error (introduced in Step-1 workflow) leading to workflow failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs engineering Requires engineering-specific changes only.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants