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

Add Dashboard Support: #72 Add dashboard related actions #73

Merged

Conversation

jpavlav
Copy link
Contributor

@jpavlav jpavlav commented Mar 15, 2024

I realize there are a lot of changes here, but each commit should represent a much more digestible bit of code changes for review.

  • Added create_dashboard action
  • Added add_gadget action. Allows the user to add a gadget to an
    existing dashboard.
  • Added update_dashboard action. It accepts parameters for the update,
    fetches the dashboard by id, runs the update method on the
    dashboard resource and returns it's raw result (json result from
    the API)
  • Added update_gadget action to allow a user to modify an existing
    gadget on a dashboard.
  • Added an action to delete dashboards by id. The jira library only
    returns the raw requests response in this case. The return is a
    dictionary containing the response status code and any text that was
    included with the response. The action fails if any status code other
    than 204 is produced.
  • Added remove_gadget action to allow users to delete gadgets from
    dashboards.
  • The get_gadgets action just pulls the available list of gadgets from
    the jira instance. This commit also includes a fix to the description
    of the remove_gadget yaml.
  • The get_dashboard_gadgets action differs from the
    get_available_gadgets action in that, it targets a specific dashboard
    and returns only the gadgets present on that dashboard.
  • Added the copy_dashboard action.
  • Updated some descriptions in update_dashboard and create_dashboard
    yaml files.
  • Added get_dashboard_item_property_keys. This returns a list of
    dashboard item property keys which are used to identify metadata stores
    on a given dashboard item (gadget).
  • Added get_dashboard_item_property_keys. This returns a list of
    dashboard item property keys which are used to identify metadata stores
    on a given dashboard item (gadget).
  • Allows the user to set the values of item properties on a given
    dashboard item (gadget). An example of this would be a configuration for
    a dashboard gadget that is configured with a Filter Result module.
  • Added delete_dashboard_item_property. Allows the user to delete a
    dashboard item property (like a config object on a filter module on a
    gadget).
  • Added update_dashboard_item_property action. This differs from
    set_dashboard_item_property in that, it updates the existing object
    attributes, instead of simply replacing them. Good for updating specific
    fields on gadget configuration items.
  • Added update_dashboard_automatic_refresh action. This let's the user
    set how often the dashboard refreshes in minutes.

Added tests for all of the new actions. Included some new fixtures as
well for those tests. The report is as follows:

(st2) root@e74c68fe6ffa:/opt/stackstorm/packs.dev/jira#
st2-run-pack-tests -j -t -c -p /opt/stackstorm/packs.dev/jira
Running tests for pack: jira
Activating virtualenv in /tmp/st2-pack-tests-virtualenvs/jira...
::/opt/stackstorm/packs.dev/jira/sensors/:/opt/stackstorm/packs.dev/jira/actions/:/opt/stackstorm/packs.dev/jira/actions/lib/:/opt/stackstorm/packs.dev/jira/etc/
WARNING: You are using pip version 20.3.3; however, version 24.0 is
available.
You should consider upgrading via the
'/tmp/st2-pack-tests-virtualenvs/jira/bin/python -m pip install
--upgrade pip' command.
Running tests...
test_add_gadget (tests.test_action_add_gadget.AddGadgetTests) ... passed
test_copy_dashboard
(tests.test_action_copy_dashboard.CopyDashboardTests) ... passed
test_create_dashboard
(tests.test_action_create_dashboard.CreateDashboardTests) ... passed
test_delete_dashboard
(tests.test_action_delete_dashboard.DeleteDashboardTests) ... passed
test_delete_dashboard_item_property
(tests.test_action_delete_dashboard_item_property.DeleteDashboardItemPropertyTest)
... passed
test_get_available_gadgets
(tests.test_action_get_available_gadgets.GetAvailableGadgetsTests) ...
passed
test_get_dashboard_gadgets
(tests.test_action_get_dashboard_gadgets.GetDashboardGadgetsTest) ...
passed
test_get_dashboard_item_property
(tests.test_action_get_dashboard_item_property.GetDashboardItemPropertyTests)
... passed
test_get_dashboard_item_property_keys
(tests.test_action_get_dashboard_item_property_keys.GetDashboardItemPropertyKeysTests)
... passed
test_remove_gadget (tests.test_action_remove_gadget.RemoveGadgetTests)
... passed
test_run_with_invalid_action (tests.test_action_run.RunTestCase) ...
passed
test_run_with_jira_exception (tests.test_action_run.RunTestCase) ...
passed
test_run_without_exception (tests.test_action_run.RunTestCase) ...
passed
test_transition_name_to_id (tests.test_action_run.RunTestCase) ...
passed
test_get_dashboard_item_property
(tests.test_action_set_dashboard_item_property.SetDashboardItemPropertyTests)
... passed
test_update_dashboard
(tests.test_action_update_dashboard.UpdateDashboardTests) ... passed
test_update_dashboard_automatic_refresh
(tests.test_action_update_dashboard_automatic_refresh.UpdateJiraDashboardAutomaticRefreshActionDashboardTests)
... passed
test_set_dashboard_item_property
(tests.test_action_update_dashboard_property.UpdateDashboardItemPropertyTests)
... passed
test_update_gadget (tests.test_action_update_gadget.UpdateGadgetTests)
... passed
test_poll (tests.test_sensor_jira_sensor.JIRASensorTestCase) ... passed
test_poll
(tests.test_sensor_jira_sensor_for_apiv2.JIRASensorForAPIv2TestCase) ...
passed

TEST RESULT OUTPUT:

Name                                            Stmts   Miss  Cover
-------------------------------------------------------------------
actions/add_field_value.py                          8      8     0%
actions/add_gadget.py                               8      0   100%
actions/attach_file_to_issue.py                    10     10     0%
actions/attach_files_to_issue.py                   11     11     0%
actions/bulk_link_issue.py                         27     27     0%
actions/comment_issue.py                            8      8     0%
actions/copy_dashboard.py                           8      0   100%
actions/create_dashboard.py                         8      0   100%
actions/create_issue.py                            14     14     0%
actions/delete_dashboard.py                         8      0   100%
actions/delete_dashboard_item_property.py           8      0   100%
actions/get_available_gadgets.py                    6      0   100%
actions/get_dashboard_gadgets.py                    6      0   100%
actions/get_dashboard_item_property.py              6      0   100%
actions/get_dashboard_item_property_keys.py         6      0   100%
actions/get_issue.py                                8      8     0%
actions/get_issue_attachments.py                   11     11     0%
actions/get_issue_comments.py                      11     11     0%
actions/get_issue_links.py                          8      8     0%
actions/lib/__init__.py                             0      0   100%
actions/lib/base.py                                41     21    49%
actions/lib/formatters.py                          57     57     0%
actions/lib/utils.py                                4      0   100%
actions/link_issue.py                               6      6     0%
actions/remove_gadget.py                            9      0   100%
actions/run.py                                     21      3    86%
actions/search_issues.py                           10     10     0%
actions/set_dashboard_item_property.py              6      0   100%
actions/transition_issue.py                         6      6     0%
actions/update_dashboard.py                         9      0   100%
actions/update_dashboard_automatic_refresh.py       7      0   100%
actions/update_dashboard_item_property.py           7      0   100%
actions/update_field_value.py                       8      8     0%
actions/update_gadget.py                           10      0   100%
sensors/jira_sensor.py                             97     45    54%
sensors/jira_sensor_for_apiv2.py                   96     45    53%
-------------------------------------------------------------------
TOTAL                                             574    317    45%
[success] 16.58%
tests.test_action_run.RunTestCase.test_run_without_exception: 0.0253s
[success] 6.88%
tests.test_action_add_gadget.AddGadgetTests.test_add_gadget: 0.0105s
[success] 5.61%
tests.test_action_delete_dashboard_item_property.DeleteDashboardItemPropertyTest.test_delete_dashboard_item_property:
0.0086s
[success] 5.45%
tests.test_action_update_gadget.UpdateGadgetTests.test_update_gadget:
0.0083s
[success] 5.38%
tests.test_action_create_dashboard.CreateDashboardTests.test_create_dashboard:
0.0082s
[success] 5.22%
tests.test_action_get_available_gadgets.GetAvailableGadgetsTests.test_get_available_gadgets:
0.0080s
[success] 5.22%
tests.test_action_copy_dashboard.CopyDashboardTests.test_copy_dashboard:
0.0080s
[success] 5.09%
tests.test_action_update_dashboard_property.UpdateDashboardItemPropertyTests.test_set_dashboard_item_property:
0.0078s
[success] 5.06%
tests.test_action_delete_dashboard.DeleteDashboardTests.test_delete_dashboard:
0.0077s
[success] 4.80%
tests.test_action_set_dashboard_item_property.SetDashboardItemPropertyTests.test_get_dashboard_item_property:
0.0073s
[success] 4.76%
tests.test_action_get_dashboard_gadgets.GetDashboardGadgetsTest.test_get_dashboard_gadgets:
0.0073s
[success] 4.68%
tests.test_action_get_dashboard_item_property.GetDashboardItemPropertyTests.test_get_dashboard_item_property:
0.0071s
[success] 4.66%
tests.test_action_remove_gadget.RemoveGadgetTests.test_remove_gadget:
0.0071s
[success] 4.64%
tests.test_action_update_dashboard_automatic_refresh.UpdateJiraDashboardAutomaticRefreshActionDashboardTests.test_update_dashboard_automatic_refresh:
0.0071s
[success] 4.45%
tests.test_action_update_dashboard.UpdateDashboardTests.test_update_dashboard:
0.0068s
[success] 4.09%
tests.test_action_get_dashboard_item_property_keys.GetDashboardItemPropertyKeysTests.test_get_dashboard_item_property_keys:
0.0063s
[success] 2.27%
tests.test_action_run.RunTestCase.test_transition_name_to_id: 0.0035s
[success] 2.25%
tests.test_action_run.RunTestCase.test_run_with_jira_exception: 0.0034s
[success] 1.90%
tests.test_action_run.RunTestCase.test_run_with_invalid_action: 0.0029s
[success] 0.51%
tests.test_sensor_jira_sensor_for_apiv2.JIRASensorForAPIv2TestCase.test_poll:
0.0008s
[success] 0.50%
tests.test_sensor_jira_sensor.JIRASensorTestCase.test_poll: 0.0008s
-----------------------------------------------------------------------------
21 tests run in 0.159 seconds (21 tests passed)

All changes are covered at 100%.

  • Updated CHANGES.md
  • Updated README.md
  • Bumped pack version.
  • Committed missed addition to test/lib/actions.py

* Added `add_gadget` action. Allows the user to add a gadget to an
existing dashboard.
…Action

* Added `update_dashboard` action. It accepts parameters for the update,
fetches the dashboard by `id`, runs the `update` method on the
`dashboard` resource and returns it's `raw` result (`json` result from
the API)
* Added `update_gadget` action to allow a user to modify an existing
gadget on a dashboard.
…Action

* Added an action to delete dashboards by `id`. The `jira` library only
returns the raw `requests` response in this case. The return is a
dictionary containing the response status code and any text that was
included with the response. The action fails if any status code other
than 204 is produced.
* Added `remove_gadget` action to allow users to delete gadgets from
dashboards.
* The `get_gadgets` action just pulls the available list of gadgets from
the `jira` instance. This commit also includes a fix to the description
of the `remove_gadget` yaml.
This is more in keeping with the API.
…ets` Action

* The `get_dashboard_gadgets` action differs from the
`get_available_gadgets` action in that, it targets a specific dashboard
and returns only the gadgets present on that dashboard.
…tion

* Added the `copy_dashboard` action.
* Updated some descriptions in `update_dashboard` and `create_dashboard`
yaml files.
* Added `get_dashboard_item_property_keys`. This returns a list of
dashboard item property keys which are used to identify metadata stores
on a given dashboard item (gadget).
…perty` Action

* Added `get_dashboard_item_property` action. This gets a dashboard item
(gadget) property by key. Typically these hold user specified metadata,
or in the case of some gadgets the `config` key can be sent a payload to
configure an otherwise unconfigured gadget.
…perty` Action

* Allows the user to set the values of item properties on a given
dashboard item (gadget). An example of this would be a configuration for
a dashboard gadget that is configured with a `Filter Result` module.
…property`

* Added `delete_dashboard_item_property`. Allows the user to delete a
dashboard item property (like a config object on a filter module on a
gadget).
…erty`

* Added `update_dashboard_item_property` action. This differs from
`set_dashboard_item_property` in that, it updates the existing object
attributes, instead of simply replacing them. Good for updating specific
fields on gadget configuration items.
…_refresh`

* Added `update_dashboard_automatic_refresh` action. This let's the user
set how often the dashboard refreshes in minutes.
Added tests for all of the new actions. Included some new fixtures as
well for those tests. The report is as follows:

```
(st2) root@e74c68fe6ffa:/opt/stackstorm/packs.dev/jira#
st2-run-pack-tests -j -t -c -p /opt/stackstorm/packs.dev/jira
Running tests for pack: jira
Activating virtualenv in /tmp/st2-pack-tests-virtualenvs/jira...
::/opt/stackstorm/packs.dev/jira/sensors/:/opt/stackstorm/packs.dev/jira/actions/:/opt/stackstorm/packs.dev/jira/actions/lib/:/opt/stackstorm/packs.dev/jira/etc/
WARNING: You are using pip version 20.3.3; however, version 24.0 is
available.
You should consider upgrading via the
'/tmp/st2-pack-tests-virtualenvs/jira/bin/python -m pip install
--upgrade pip' command.
Running tests...
test_add_gadget (tests.test_action_add_gadget.AddGadgetTests) ... passed
test_copy_dashboard
(tests.test_action_copy_dashboard.CopyDashboardTests) ... passed
test_create_dashboard
(tests.test_action_create_dashboard.CreateDashboardTests) ... passed
test_delete_dashboard
(tests.test_action_delete_dashboard.DeleteDashboardTests) ... passed
test_delete_dashboard_item_property
(tests.test_action_delete_dashboard_item_property.DeleteDashboardItemPropertyTest)
... passed
test_get_available_gadgets
(tests.test_action_get_available_gadgets.GetAvailableGadgetsTests) ...
passed
test_get_dashboard_gadgets
(tests.test_action_get_dashboard_gadgets.GetDashboardGadgetsTest) ...
passed
test_get_dashboard_item_property
(tests.test_action_get_dashboard_item_property.GetDashboardItemPropertyTests)
... passed
test_get_dashboard_item_property_keys
(tests.test_action_get_dashboard_item_property_keys.GetDashboardItemPropertyKeysTests)
... passed
test_remove_gadget (tests.test_action_remove_gadget.RemoveGadgetTests)
... passed
test_run_with_invalid_action (tests.test_action_run.RunTestCase) ...
passed
test_run_with_jira_exception (tests.test_action_run.RunTestCase) ...
passed
test_run_without_exception (tests.test_action_run.RunTestCase) ...
passed
test_transition_name_to_id (tests.test_action_run.RunTestCase) ...
passed
test_get_dashboard_item_property
(tests.test_action_set_dashboard_item_property.SetDashboardItemPropertyTests)
... passed
test_update_dashboard
(tests.test_action_update_dashboard.UpdateDashboardTests) ... passed
test_update_dashboard_automatic_refresh
(tests.test_action_update_dashboard_automatic_refresh.UpdateJiraDashboardAutomaticRefreshActionDashboardTests)
... passed
test_set_dashboard_item_property
(tests.test_action_update_dashboard_property.UpdateDashboardItemPropertyTests)
... passed
test_update_gadget (tests.test_action_update_gadget.UpdateGadgetTests)
... passed
test_poll (tests.test_sensor_jira_sensor.JIRASensorTestCase) ... passed
test_poll
(tests.test_sensor_jira_sensor_for_apiv2.JIRASensorForAPIv2TestCase) ...
passed

TEST RESULT OUTPUT:

Name                                            Stmts   Miss  Cover
-------------------------------------------------------------------
actions/add_field_value.py                          8      8     0%
actions/add_gadget.py                               8      0   100%
actions/attach_file_to_issue.py                    10     10     0%
actions/attach_files_to_issue.py                   11     11     0%
actions/bulk_link_issue.py                         27     27     0%
actions/comment_issue.py                            8      8     0%
actions/copy_dashboard.py                           8      0   100%
actions/create_dashboard.py                         8      0   100%
actions/create_issue.py                            14     14     0%
actions/delete_dashboard.py                         8      0   100%
actions/delete_dashboard_item_property.py           8      0   100%
actions/get_available_gadgets.py                    6      0   100%
actions/get_dashboard_gadgets.py                    6      0   100%
actions/get_dashboard_item_property.py              6      0   100%
actions/get_dashboard_item_property_keys.py         6      0   100%
actions/get_issue.py                                8      8     0%
actions/get_issue_attachments.py                   11     11     0%
actions/get_issue_comments.py                      11     11     0%
actions/get_issue_links.py                          8      8     0%
actions/lib/__init__.py                             0      0   100%
actions/lib/base.py                                41     21    49%
actions/lib/formatters.py                          57     57     0%
actions/lib/utils.py                                4      0   100%
actions/link_issue.py                               6      6     0%
actions/remove_gadget.py                            9      0   100%
actions/run.py                                     21      3    86%
actions/search_issues.py                           10     10     0%
actions/set_dashboard_item_property.py              6      0   100%
actions/transition_issue.py                         6      6     0%
actions/update_dashboard.py                         9      0   100%
actions/update_dashboard_automatic_refresh.py       7      0   100%
actions/update_dashboard_item_property.py           7      0   100%
actions/update_field_value.py                       8      8     0%
actions/update_gadget.py                           10      0   100%
sensors/jira_sensor.py                             97     45    54%
sensors/jira_sensor_for_apiv2.py                   96     45    53%
-------------------------------------------------------------------
TOTAL                                             574    317    45%
[success] 16.58%
tests.test_action_run.RunTestCase.test_run_without_exception: 0.0253s
[success] 6.88%
tests.test_action_add_gadget.AddGadgetTests.test_add_gadget: 0.0105s
[success] 5.61%
tests.test_action_delete_dashboard_item_property.DeleteDashboardItemPropertyTest.test_delete_dashboard_item_property:
0.0086s
[success] 5.45%
tests.test_action_update_gadget.UpdateGadgetTests.test_update_gadget:
0.0083s
[success] 5.38%
tests.test_action_create_dashboard.CreateDashboardTests.test_create_dashboard:
0.0082s
[success] 5.22%
tests.test_action_get_available_gadgets.GetAvailableGadgetsTests.test_get_available_gadgets:
0.0080s
[success] 5.22%
tests.test_action_copy_dashboard.CopyDashboardTests.test_copy_dashboard:
0.0080s
[success] 5.09%
tests.test_action_update_dashboard_property.UpdateDashboardItemPropertyTests.test_set_dashboard_item_property:
0.0078s
[success] 5.06%
tests.test_action_delete_dashboard.DeleteDashboardTests.test_delete_dashboard:
0.0077s
[success] 4.80%
tests.test_action_set_dashboard_item_property.SetDashboardItemPropertyTests.test_get_dashboard_item_property:
0.0073s
[success] 4.76%
tests.test_action_get_dashboard_gadgets.GetDashboardGadgetsTest.test_get_dashboard_gadgets:
0.0073s
[success] 4.68%
tests.test_action_get_dashboard_item_property.GetDashboardItemPropertyTests.test_get_dashboard_item_property:
0.0071s
[success] 4.66%
tests.test_action_remove_gadget.RemoveGadgetTests.test_remove_gadget:
0.0071s
[success] 4.64%
tests.test_action_update_dashboard_automatic_refresh.UpdateJiraDashboardAutomaticRefreshActionDashboardTests.test_update_dashboard_automatic_refresh:
0.0071s
[success] 4.45%
tests.test_action_update_dashboard.UpdateDashboardTests.test_update_dashboard:
0.0068s
[success] 4.09%
tests.test_action_get_dashboard_item_property_keys.GetDashboardItemPropertyKeysTests.test_get_dashboard_item_property_keys:
0.0063s
[success] 2.27%
tests.test_action_run.RunTestCase.test_transition_name_to_id: 0.0035s
[success] 2.25%
tests.test_action_run.RunTestCase.test_run_with_jira_exception: 0.0034s
[success] 1.90%
tests.test_action_run.RunTestCase.test_run_with_invalid_action: 0.0029s
[success] 0.51%
tests.test_sensor_jira_sensor_for_apiv2.JIRASensorForAPIv2TestCase.test_poll:
0.0008s
[success] 0.50%
tests.test_sensor_jira_sensor.JIRASensorTestCase.test_poll: 0.0008s
-----------------------------------------------------------------------------
21 tests run in 0.159 seconds (21 tests passed)
```

All changes are covered at 100%.
* Updated `CHANGES.md`
* Updated `README.md`
* Bumped `pack` version.
* Committed missed addition to `test/lib/actions.py`
@jpavlav jpavlav requested review from floatingstatic and a team as code owners March 15, 2024 22:03
@jpavlav jpavlav requested review from rush-skills and removed request for a team March 15, 2024 22:03
@CLAassistant
Copy link

CLAassistant commented Mar 15, 2024

CLA assistant check
All committers have signed the CLA.

requirements.txt Outdated Show resolved Hide resolved
The changes necessary for these pack updates have been merged into the
`jira` package and that package has had a release to `pypi`.
@jpavlav
Copy link
Contributor Author

jpavlav commented Mar 25, 2024

@floatingstatic Hey there! The changes I made were pulled into the jira package. I've updated the requirements.txt for this repo to reflect that. If you could take a peek and approve this, it would be much appreciated.

@floatingstatic
Copy link
Collaborator

@jpavlav Looks good. It seems CI is stuck. Let me see if I can figure out how to fix that so we can merge. Thanks!

@floatingstatic
Copy link
Collaborator

@jpavlav i think the github action workflow was disabled. I enabled it but wondering if you might be able to try a force-push to see if it will run after the next push.

@jpavlav
Copy link
Contributor Author

jpavlav commented Mar 25, 2024

@floatingstatic These are failing because these tests are attempting to run on python3.6. That should not be the case since it is deprecated. I realize it uses the upstream workflow. I don't know if it would help but I can run the tests locally either later today or tomorrow and provide a report.

@jpavlav
Copy link
Contributor Author

jpavlav commented Mar 25, 2024

Looks like there is a PR open to address this:

https://github.com/StackStorm-Exchange/ci/pull/147/files

@floatingstatic
Copy link
Collaborator

Thanks, yeah I asked someone from TSC to have a look. Unfortunately my access is somewhat limited as maintainer.

@nzlosh
Copy link

nzlosh commented Mar 25, 2024

  ERROR: Could not find a version that satisfies the requirement jira==3.8.0
  ERROR: No matching distribution found for jira==3.8.0

It looks like the jira requirement is too high for python3.6.

@jpavlav
Copy link
Contributor Author

jpavlav commented Mar 25, 2024

@nzlosh Yeah, but as python3.6 is completely unsupported at this time, it makes sense to remove. It's unnecessarily blocking this PR from being merged. This PR StackStorm-Exchange/ci#147 addresses the issue of removing python3.6 from the reusable workflow that runs these tests upstream.

@jpavlav
Copy link
Contributor Author

jpavlav commented Mar 25, 2024

Oh heh, looks like you're the one who authored that change @nzlosh 😄

@nzlosh
Copy link

nzlosh commented Mar 25, 2024

Yes, Python 3.6 is currently a sore point. We're dropping support in St2 v3.9, but for now St2 3.8.1 (current stable) supports py3.6 / 3.8 instances running in the wild. You can pull py3.6 now but it may cause some users to be unable to upgrade the pack until they move onto a new version of St2. I'd recommend bumping the pack version to 4.0 to signal break changes for some users.

@jpavlav
Copy link
Contributor Author

jpavlav commented Mar 25, 2024

@floatingstatic I'll go ahead and bump the pack version and then maybe push that up with a change to point the workflow at the branch that kicks 3.6 out. Does that sound alright?

Had to update some tests/class references/method calls to match the
final interface over in the `jira` lib.

* `Gadget` renamed to `DashboardGadget`.
* `gadgets` method renamed to `all_dashboard_gadgets`.
* Update
`%s/update_dashboard_automatic_refresh_seconds/update_dashboard/automatic_refresh_minutes`
@floatingstatic
Copy link
Collaborator

@jpavlav sounds good. We can bump the pack to 3.0.0.

The latest versions of the `jira` library require `python >= 3.8`. In
light of the fact that `StackStorm` is going to shed support for
`python3.6` (which is EOL
https://www.python.org/downloads/release/python-360/) this pack is
updating to stop testing `3.6` and bumping the pack to the next major
version to signal a potentially breaking change.
Cutting this down to the lowest common denominator in terms of working
tests for `StackStorm`. `3.11` is breaking on installing some dev
dependencies:

```
    ERROR: Command errored out with exit status 1:
command: /home/runner/virtualenv/bin/python
/home/runner/virtualenv/lib/python3.11/site-packages/pip/_vendor/pep517/_in_process.py
get_requires_for_build_wheel /tmp/tmp_5anenlq
cwd:
/tmp/pip-install-mj_5c6wi/pyyaml_3973c6602d81416aa8ada0b8d43f48a5
    Complete output (54 lines):
    running egg_info
    writing lib3/PyYAML.egg-info/PKG-INFO
writing dependency_links to
lib3/PyYAML.egg-info/dependency_links.txt
    writing top-level names to lib3/PyYAML.egg-info/top_level.txt
    Traceback (most recent call last):
File
"/home/runner/virtualenv/lib/python3.11/site-packages/pip/_vendor/pep517/_in_process.py",
line 280, in <module>
        main()
File
"/home/runner/virtualenv/lib/python3.11/site-packages/pip/_vendor/pep517/_in_process.py",
line 263, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/runner/virtualenv/lib/python3.11/site-packages/pip/_vendor/pep517/_in_process.py",
line 114, in get_requires_for_build_wheel
        return hook(config_settings)
               ^^^^^^^^^^^^^^^^^^^^^
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py",
line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings,
requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py",
line 295, in _get_build_requires
        self.run_setup()
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py",
line 311, in run_setup
        exec(code, locals())
      File "<string>", line 271, in <module>
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/__init__.py",
line 104, in setup
        return distutils.core.setup(**attrs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py",
line 185, in setup
        return run_commands(dist)
               ^^^^^^^^^^^^^^^^^^
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py",
line 201, in run_commands
        dist.run_commands()
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py",
line 969, in run_commands
        self.run_command(cmd)
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/dist.py",
line 967, in run_command
        super().run_command(command)
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py",
line 988, in run_command
        cmd_obj.run()
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py",
line 321, in run
        self.find_sources()
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py",
line 329, in find_sources
        mm.run()
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py",
line 550, in run
        self.add_defaults()
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py",
line 588, in add_defaults
        sdist.add_defaults(self)
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py",
line 102, in add_defaults
        super().add_defaults()
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py",
line 251, in add_defaults
        self._add_defaults_ext()
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py",
line 336, in _add_defaults_ext
        self.filelist.extend(build_ext.get_source_files())
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<string>", line 201, in get_source_files
File
"/tmp/pip-build-env-e17od6z2/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py",
line 107, in __getattr__
        raise AttributeError(attr)
    AttributeError: cython_sources
    ----------------------------------------
ERROR: Command errored out with exit status 1:
/home/runner/virtualenv/bin/python
/home/runner/virtualenv/lib/python3.11/site-packages/pip/_vendor/pep517/_in_process.py
get_requires_for_build_wheel /tmp/tmp_5anenlq Check the logs for full
command output.
WARNING: You are using pip version 20.3.3; however, version 24.0 is
available.
You should consider upgrading via the
'/home/runner/virtualenv/bin/python -m pip install --upgrade pip'
command.
```
…rt Paths

This PR updates the CHANGES.md to include the deprecation of `python
3.6`. Further, it updates the paths to the `utils` function
`remove_empty_attributes`. The test set up puts the
Turns out the `.gitignore` ignores the `lib/` dir. This applies to the
`lib` dir within the `actions` dir. Caused me to miss the fact that I
didn't actually commit the `utils.py` file.
@floatingstatic
Copy link
Collaborator

@nzlosh I do not have access to the repo settings page to remove python 3.6 status check as a requirement for merging. Can you assist? Thanks!

I just realized the `release.yaml` GHA also uses the upstream
`pack-build_and_test` workflow. It would have failed when an attempt was
released because of our now deprecating `python 3.6`. Updating this to
mirror the `build_and_test.yaml` workflow.
@nzlosh
Copy link

nzlosh commented Mar 26, 2024

@floatingstatic I've bumped the test requirement from 3.6 to 3.8. You're clear to merge

@floatingstatic floatingstatic merged commit a45a2e5 into StackStorm-Exchange:master Mar 26, 2024
3 checks passed
@jpavlav
Copy link
Contributor Author

jpavlav commented Mar 26, 2024

Thanks @floatingstatic and @nzlosh !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants