-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix: xblock ci workflow #412
Conversation
Thanks for the pull request, @Talha-Rizwan! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. Once you've signed the CLA, please allow 1 business day for it to be processed. After this time, you can re-run the CLA check by adding a comment here that you have signed it. If the problem persists, you can tag the |
This PR is for #412 issue and checkout this openedx discussion to understand the issue better. |
Hey @Talha-Rizwan, thank you for this contribution! As the bot says, the next step will be for you to submit a signed CLA. Once that's done and the build is green, we can line this PR up for engineering review. |
I've indicated my institutional affiliation. |
@Talha-Rizwan should you be covered under the Arbisoft CLA? If so, can you ask the HR team to ask that you are added to the CRM? |
Yes, I should be covered under the Arbisoft CLA. I've talked to HR team and they confirmed me that i've been added. Waiting for them to add me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions
DJANGO_SETTINGS_MODULE = translation_settings | ||
addopts = --cov {{ cookiecutter.package_name }} --cov-report term-missing --cov-report xml | ||
DJANGO_SETTINGS_MODULE = myxblock.settings.test | ||
addopts = --cov myxblock --cov-report term-missing --cov-report xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we hardcoding this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It automatically hardcodes the name of xblock and replaces {{ cookiecutter.package_name }}
which in my case is myxblock
, once you use this xblock template to create a new xblock. (This is one of the initial steps)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand why it does that when creating a new xblock, but doesn't this remove that from the template? won't this mean any new tox.ini files will be created with 'myxblock'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you're right, i must have mistakenly changed it. replaced it back to original.
- name: Run Tests | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} | ||
run: tox | ||
|
||
- name: Run coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand taking out the build, but taking out codecov seems wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right about this but the workflow also needs to pass which in that case won't. So, we can add the codecov in such a way to make sure that the workflow still works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put this bit back? We've filed #417 as a separate issue to look at why it fails. We should still remove the other one you took out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if you have any more details on how the codecov test fails, please add to the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, i'll do it.
cla check |
Fix: replaced package name in tox.ini
69ce950
to
69c6946
Compare
@@ -48,4 +41,4 @@ jobs: | |||
uses: codecov/codecov-action@v3 | |||
with: | |||
flags: unittests | |||
fail_ci_if_error: true | |||
fail_ci_if_error: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use .editorconfig files to make editor settings the same among collaborators. If you enable editorconfig support in your editor or IDE, these kinds of accidental changes won't happen. https://editorconfig.org/
@@ -4,6 +4,13 @@ Change Log | |||
.. | |||
This file loosely adheres to the structure of https://keepachangelog.com/, | |||
but in reStructuredText instead of Markdown. | |||
2023-11-28 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2023-11-28 | |
2023-11-28 |
@@ -27,29 +27,21 @@ max-line-length = 120 | |||
; D412 = No blank lines allowed between a section header and its content (numpy style) | |||
; D413 = Missing blank line after last section (numpy style) | |||
; D414 = Section has no content (numpy style) | |||
ignore = D101,D200,D203,D212,D215,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414 | |||
ignore = D101,D200,D203,D212,D215,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D401,D205 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the pydocstyle checks are failing because of imperative mood and blank lines, we can fix that by correcting the docstrings in the generated repo, which I think would be a better fix.
BTW, when adding to exclusions like this, keep the numbers in sorted order, and include the comments above that explain the ignored rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the multiple rounds of reviews ><
In general, it's easier to review pull requests that address one problem at a time and that have specific details of the problems we want to fix.
For this PR, I understand that we should take out the Create Build step, but everything else seems like removing tests that we do want to run. If these tests are not passing, we should update the cookie cutter so they do pass. Maybe this PR should just be about removing the Create Build step?
@@ -16,7 +16,7 @@ jobs: | |||
matrix: | |||
os: [ubuntu-20.04] | |||
python-version: ['3.8'] | |||
toxenv: [quality, docs, pii_check, django32, django40] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain a little more about why you are removing these? What errors were you seeing? In general, we'd prefer to correct the errors in the templates rather than remove the checks.
match-dir = (?!migrations) | ||
|
||
[pytest] | ||
DJANGO_SETTINGS_MODULE = translation_settings | ||
addopts = --cov {{ cookiecutter.package_name }} --cov-report term-missing --cov-report xml | ||
norecursedirs = .* docs requirements site-packages | ||
|
||
[testenv] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar question, why are we removing these? What errors are they causing? Is it something we can fix rather than remove?
@@ -31,13 +31,6 @@ jobs: | |||
- name: Install Dependencies | |||
run: pip install -r requirements/ci.txt | |||
|
|||
- name: Create Build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
This work ended up dovetailing with some of my own so I took care of removing the build and the PII checks in #424 and #423. I'm going to close this PR, but thank you @Talha-Rizwan for catching that build thing and for all your work! |
The CI workflow was throughing errors on creating a new xblock. This commit eliminates and corrects the error generating steps.