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

♻️ Refactor the Malformed YAML Shared GitHub Action #4287

Closed
9 of 10 tasks
jasonBirchall opened this issue Mar 11, 2024 · 2 comments
Closed
9 of 10 tasks

♻️ Refactor the Malformed YAML Shared GitHub Action #4287

jasonBirchall opened this issue Mar 11, 2024 · 2 comments
Assignees

Comments

@jasonBirchall
Copy link
Member

jasonBirchall commented Mar 11, 2024

User Need

As an administrator of the GitHub-actions shared repository,
I want to rewrite the malformed-yaml action in Python
so that I can fix the current bug with the image type and ensure the action is maintainable by the Operations Engineering team going forward.

Value

Rewriting the malformed-yaml action in Python will address the immediate issue of the image type bug and, more importantly, transform the action into a language that our team is more comfortable with. This transition will facilitate easier maintenance, faster updates, and the ability to address future bugs or add new features quickly.

Functional Requirements:

  • Analyse the existing Ruby implementation of the malformed-yaml action to understand its functionality and the bug's nature.
  • Redesign the architecture of the action for Python, ensuring it provides the same functionality.
  • Develop a comprehensive test suite for the Python version of the action to ensure it meets all operational requirements without regressions.

Non-Functional Requirements:

  • The action must be fully compatible with existing workflows that previously relied on the Ruby version, ensuring a seamless transition.
  • If breaking changes are required then the new action should be in a new release and comms made to alert people they can upgrade to use it and what changes they may need to make.
  • Documentation must be thoroughly updated to reflect the change in language and any new procedures for using the action.

Acceptance Criteria:

  • The new Python version of the malformed-yaml action is fully functional and resolves the image type bug.
  • Automated tests confirm that all functionalities work as expected without introducing new issues.
  • New release and comms with details on any changes required to workflows.
  • The Python version of the action is reviewed and approved by at least one other team member.

Notes:

The decision to transition the malformed-yaml action to Python stems from our team's expertise in this language and the challenges we've faced maintaining the Ruby version. This rewrite is not just a bug fix but a strategic move to align the action with our team's skills and future-proofing our infrastructure.

@jasonBirchall jasonBirchall moved this from 👀 Todo to 🚀 In Progress in ⚙️ Operations Engineering Mar 11, 2024
@jasonBirchall jasonBirchall self-assigned this Mar 11, 2024
@jasonBirchall jasonBirchall removed their assignment Mar 18, 2024
@jasonBirchall jasonBirchall moved this from 🚀 In Progress to 👀 Todo in ⚙️ Operations Engineering Mar 18, 2024
@tamsinforbes tamsinforbes self-assigned this Apr 15, 2024
@tamsinforbes tamsinforbes moved this from 👀 Todo to 🚀 In Progress in ⚙️ Operations Engineering Apr 15, 2024
@tamsinforbes
Copy link
Contributor

tamsinforbes commented Apr 15, 2024

Dual testing in test repo to compare output from Ruby 💎 version and new 🐍 Python version.

Using task branch mal-yaml-to-python in ministryofjutstice/github-actions repo

Refs

https://jacobtomlinson.dev/posts/2019/creating-github-actions-in-python/
https://github.com/jacobtomlinson/python-container-action

The above examples are adapted from GitHub's https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action

To do

  • create a dual action python-malformed-yaml alongside malformed-yaml to check they both perform the same functionality and require no changes by the user.
  • dockerfile - what docker image?
  • tests
  • workflow to run tests, including different kinds of bad yaml files
  • update readme for python-malformed-yaml on github-actions
  • fix so action fails if there are any malformed yamls - and prints out filename and exception
  • malformed-yaml action name is not pythonic (- vs _) can't import function for tests 🙄 fix
  • leave a change request to fix the malformed yaml files under the PR conversation tab
  • delete malformed-yaml action and rename python-malformed-action to malformed-action
  • create new release

@AntonyBishop AntonyBishop moved this from 🚀 In Progress to 🚫 Blocked in ⚙️ Operations Engineering Apr 29, 2024
@tamsinforbes tamsinforbes moved this from 🚫 Blocked to ✅ Done in ⚙️ Operations Engineering May 1, 2024
@tamsinforbes
Copy link
Contributor

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

Successfully merging a pull request may close this issue.

2 participants