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

Fix: xblock ci workflow #412

Closed
wants to merge 3 commits into from

Conversation

Talha-Rizwan
Copy link

  • [ complete ] Changelog record added
  • [ not applicable ] Documentation updated (not only docstrings)
  • [ complete ] Fixup commits are squashed away
  • [ not applicable ] Unit tests added/updated
  • [ not applicable ] Manual testing instructions provided
  • [ not applicable ] Noted any: Concerns, dependencies, deadlines, tickets

The CI workflow was throughing errors on creating a new xblock. This commit eliminates and corrects the error generating steps.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 28, 2023
@openedx-webhooks
Copy link

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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

⚠️ We can't start reviewing your pull request until you've submitted a signed contributor agreement or indicated your institutional affiliation. Please see the CONTRIBUTING file for more information. If you've signed an agreement in the past, you may need to re-sign. See The New Home of the Open edX Codebase for details.

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 @openedx/cla-problems team in a comment on your PR for further assistance.

@Talha-Rizwan
Copy link
Author

This PR is for #412 issue and checkout this openedx discussion to understand the issue better.

@itsjeyd
Copy link

itsjeyd commented Nov 29, 2023

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.

@itsjeyd itsjeyd added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. needs test run Author's first PR to this repository, awaiting test authorization from Axim labels Nov 29, 2023
@Talha-Rizwan
Copy link
Author

I've indicated my institutional affiliation.

@e0d
Copy link
Contributor

e0d commented Nov 30, 2023

@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?

@Talha-Rizwan
Copy link
Author

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.

@mphilbrick211 mphilbrick211 added needs test run Author's first PR to this repository, awaiting test authorization from Axim and removed needs test run Author's first PR to this repository, awaiting test authorization from Axim labels Nov 30, 2023
Copy link
Contributor

@rgraber rgraber left a comment

Choose a reason for hiding this comment

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

A few questions

CHANGELOG.rst Outdated Show resolved Hide resolved
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
Copy link
Contributor

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?

Copy link
Author

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)

Copy link
Contributor

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'?

Copy link
Author

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
Copy link
Contributor

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

Copy link
Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Author

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.

@e0d
Copy link
Contributor

e0d commented Dec 5, 2023

cla check

Fix: replaced  package name in tox.ini
@itsjeyd itsjeyd added needs test run Author's first PR to this repository, awaiting test authorization from Axim and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Dec 7, 2023
@@ -48,4 +41,4 @@ jobs:
uses: codecov/codecov-action@v3
with:
flags: unittests
fail_ci_if_error: true
fail_ci_if_error: true
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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
Copy link
Contributor

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.

Copy link
Contributor

@rgraber rgraber left a 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]
Copy link
Contributor

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]
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch!

@rgraber rgraber added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Dec 13, 2023
@rgraber
Copy link
Contributor

rgraber commented Dec 15, 2023

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!

@rgraber rgraber closed this Dec 15, 2023
@itsjeyd itsjeyd added duplicate This issue or pull request already exists elsewhere and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. needs test run Author's first PR to this repository, awaiting test authorization from Axim labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists elsewhere open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants