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

Release script milestone automation #409

Merged
merged 1 commit into from
Jul 8, 2020
Merged

Conversation

fao89
Copy link
Member

@fao89 fao89 commented Jul 2, 2020

[noissue]

@pulpbot
Copy link
Member

pulpbot commented Jul 2, 2020

WARNING!!! This PR is not attached to an issue. In most cases this is not advisable. Please see our PR docs for more information about how to attach this PR to an issue.

@fao89 fao89 force-pushed the milestone branch 3 times, most recently from 52cd811 to cd86b0e Compare July 3, 2020 14:41
@fao89
Copy link
Member Author

fao89 commented Jul 3, 2020

Currently validating milestone at release script:

pulp_file on  milestone [$] via 🐍 v3.8.0 (venv) 
❯ python .travis/release.py patch --lower 3.3 --upper 3.5


Redmine stats: {
  "project_file_support": [
    6653,
    5998,
    6885
  ],
  "without_milestone": [
    6653,
    5998
  ],
  "status_not_modified": [
    6885
  ],
  "milestone_1.0.1": [
    6885
  ]
}
Traceback (most recent call last):
  File ".travis/release.py", line 86, in <module>
    asyncio.run(validate_redmine_data(redmine_final_query, redmine_issues))
  File "/home/faguiar/.pyenv/versions/3.8.0/lib/python3.8/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/home/faguiar/.pyenv/versions/3.8.0/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
    return future.result()
  File ".travis/release.py", line 61, in validate_redmine_data
    raise RuntimeError("\n".join(error_messages))
RuntimeError: One or more issues are not MODIFIED [6885]
One or more issues are not associated with a milestone [6653, 5998]
Verify at https://pulp.plan.io/issues?set_filter=1&status_id=*&issue_id=6653,6885,5998

@fao89 fao89 force-pushed the milestone branch 3 times, most recently from 39cc7d4 to a2cebfd Compare July 3, 2020 18:01
@fao89 fao89 marked this pull request as ready for review July 3, 2020 18:01

from redminelib import Redmine

REDMINE_KEY = os.environ["REDMINE_KEY"]
Copy link
Member Author

Choose a reason for hiding this comment

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

Need to set this var on travis

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 change it to REDMINE_API_KEY. I think this is what we're calling it in pulp-ci.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure!

@daviddavis
Copy link
Contributor

This looks good overall.

RuntimeError: One or more issues are not MODIFIED [6885]

This brings up a good point: issue 6885 was released in 1.0.1 but we're not removing the changelog entries for changes cherry picked to z-releases. Perhaps we should? Or maybe we can just check that issues are at MODIFIED+?

@bmbouter @dkliban any thoughts? also, can we get a second review?


async def get_redmine_issue_data(url):
"""Get issue JSON from redmine."""
async with aiohttp.ClientSession() as session:
Copy link
Member

Choose a reason for hiding this comment

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

How would folks feel about using https://python-redmine.com/ instead of raw aiohttp requests?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't do it before because I thought it would require to use the token, as we run it locally it would not be cool. But now I tested it, and for fetching issues, it doesn't need the token. So I'm +1 to it, it will make the code simpler

@bmbouter
Copy link
Member

bmbouter commented Jul 6, 2020

This brings up a good point: issue 6885 was released in 1.0.1 but we're not removing the changelog entries for changes cherry picked to z-releases. Perhaps we should? Or maybe we can just check that issues are at MODIFIED+?

When things are cherrypicked, I would prefer that both the z-stream, e.g. 1.0.1 and the next y-stream 1.2.0 changelogs would show the same entry. My thinking is that not everyone received the z-stream release so when users skip 1.0.1 they wouldn't see the bugfix listed. I'm comfortable with also removing the changelog from the next y-stream changelog if folks think that is better.

In terms of the Redmine issue for a bugfix, it's milestone can be set to the "first one released". So if that's a z-stream then its milestone can show that z-stream number. If that's a y-release then it can show the y-release number.

Having the machinery ignore issues already at a CLOSED state I think is fine.

@fao89 fao89 force-pushed the milestone branch 2 times, most recently from 1c45c15 to e9da34f Compare July 6, 2020 21:39
Copy link
Member

@bmbouter bmbouter left a comment

Choose a reason for hiding this comment

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

Thanks @fao89 ! This looks good enough for us to give it a try!

@dkliban dkliban merged commit d514311 into pulp:master Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants