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: add celery tasks for idnits2 and bibxml file generation #7204

Merged
merged 7 commits into from
Aug 7, 2024

Conversation

russhousley
Copy link
Collaborator

Add celery tasks for idnits2 and bibxml file generation. Fixes #7192

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.79%. Comparing base (187c2c5) to head (02c6b33).
Report is 317 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7204      +/-   ##
==========================================
- Coverage   88.98%   88.79%   -0.20%     
==========================================
  Files         291      296       +5     
  Lines       40717    41312     +595     
==========================================
+ Hits        36233    36682     +449     
- Misses       4484     4630     +146     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

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

One typo, one small change I think we should make.

write_bibxml_file_if_changed(ref_rev_file_name, bibxml)
except Exception as ee:
log.log('\n%s-%s: %s\n' % (e.doc.name, e.doc.rev, str(ee)))
raise ee
Copy link
Member

Choose a reason for hiding this comment

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

Here and in bibxml_for_recent_drafts(), the re-raise of the exception is a change from the management command. In those, the exception was written to stderr and the script continued. The change means that the task will stop after an error.

I think we want to keep the old behavior (i.e., remove the raise ee here and on line 1299). I hope this doesn't contradict something we discussed at the code sprint. @russhousley do you recall?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds fine to me.

content = f.read()
self.assertIn(draft.title, content)

def test_generate_bibxml_files_for_recent_drafts_task_with_bad_vakue(self):
Copy link
Member

Choose a reason for hiding this comment

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

typo: vakue -> value

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Goof catch. I read past it many times.

Fix typo: bad_vakue -> bad_value
Don't raise error inbibxml_for_all_drafts
@NGPixel NGPixel changed the title Add celery tasks for idnits2 and bibxml file generation fix: add celery tasks for idnits2 and bibxml file generation Mar 21, 2024
# Conflicts:
#	ietf/doc/tasks.py
#	ietf/doc/tests_tasks.py
@jennifer-richards
Copy link
Member

In the scramble to cut over to the new infrastructure, I lost track of this PR and wound up reimplementing it slightly differently. I'm merging that over so we can merge this.

@rjsparks rjsparks merged commit 1de4196 into ietf-tools:main Aug 7, 2024
9 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create tasks to replace generate_* management commands
3 participants