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

3.15.1 cherry picks #1597

Merged
merged 2 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-2-gadc06df
2021.08.26-6-g59765c8
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jobs:
shell: bash

- name: Install Ruby client
if: ${{ env.TEST == 'bindings' || env.TEST == 'generate-bindings' }}

run: .github/workflows/scripts/install_ruby_client.sh
shell: bash

Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
- name: Download Ruby client
uses: actions/download-artifact@v2
with:
name: python-client.tar
name: ruby-client.tar

- name: Untar Ruby client packages
run: tar -xvf ruby-client.tar
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,10 @@ jobs:
author: pulpbot <pulp-infra@redhat.com>
branch: changelog/${{ github.event.inputs.release }}
base: master
title: 'Building changelog for ${{ github.event.inputs.release }}'
title: 'Cherry pick ${{ github.event.inputs.release }} changelog'
body: '[noissue]'
commit-message: |
Building changelog for ${{ github.event.inputs.release }}
${{ github.event.inputs.release }} changelog

[noissue]
delete-branch: true
2 changes: 1 addition & 1 deletion .github/workflows/scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def create_release_commits(repo, release_version, plugin_path):
git = repo.git
git.add("CHANGES.rst")
git.add("CHANGES/*")
git.commit("-m", f"Building changelog for {release_version}\n\n[noissue]")
git.commit("-m", f"{release_version} changelog\n\n[noissue]")

# Second commit: release version
os.system("bump2version release --allow-dirty")
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if [[ "$TEST" == "upgrade" ]]; then
sed -i "/require_pulp_plugins(/d" pulpcore/tests/functional/utils.py

# Running pre upgrade tests:
pytest -v -r sx --color=yes --pyargs -capture=no pulpcore.tests.upgrade.pre
pytest -v -r sx --color=yes --pyargs --capture=no pulpcore.tests.upgrade.pre

# Checking out ci_upgrade_test branch and upgrading plugins
cmd_prefix bash -c "cd pulpcore; git checkout -f ci_upgrade_test; pip install --upgrade --force-reinstall ."
Expand Down Expand Up @@ -159,7 +159,7 @@ if [[ "$TEST" == "upgrade" ]]; then

# Running post upgrade tests
git checkout ci_upgrade_test -- pulpcore/tests/
pytest -v -r sx --color=yes --pyargs -capture=no pulpcore.tests.upgrade.post
pytest -v -r sx --color=yes --pyargs --capture=no pulpcore.tests.upgrade.post
exit
fi

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/stage-changelog-for-master.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
changelog_commit = None
# Look for a commit with the requested release version
for commit in repo.iter_commits():
if f"Building changelog for {release_version_arg}\n" in commit.message:
if f"{release_version_arg} changelog" == commit.message.split("\n")[0]:
changelog_commit = commit
break

Expand Down
3 changes: 3 additions & 0 deletions CHANGES/plugin_api/9324.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Set the default widget type to ``JSONWidget`` for ``JSONFields`` for Model Resources to fix
django-import-export bug where ``django.db.models.JSONFields`` weren't properly handled.
(backported from #9307)
6 changes: 6 additions & 0 deletions pulpcore/plugin/importexport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from import_export import resources
from import_export.resources import widgets


class QueryModelResource(resources.ModelResource):
Expand All @@ -19,6 +20,11 @@ class QueryModelResource(resources.ModelResource):
(driven by repo_version)
"""

# TODO: remove this when https://git.io/JEgMp is released
# This forces JSONField to map to JSONWidget as django-import-export does not properly handle
# JSONField from django.db.models in django-import-export 2.5.0
WIDGETS_MAP = {**resources.ModelResource.WIDGETS_MAP, **{"JSONField": widgets.JSONWidget}}

def set_up_queryset(self):
return None

Expand Down