-
Notifications
You must be signed in to change notification settings - Fork 237
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
PIPE-3873 Code architectural cleanup #884
Conversation
55a2498
to
c080e6d
Compare
cad17cc
to
547cdcc
Compare
01718df
to
a44b456
Compare
64b1475
to
47e835b
Compare
5983fbe
to
39ac218
Compare
…ewline characters
0c14f3f
to
670cd2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Ryan William O'Hara <[email protected]>
@elliotforbes are you strongly tied to the format here (with tabs and no newlines) vs. the one I introduced in #861 to resolve #860? The changes here make the output pretty messy / hard to parse... current:
Would you accept a PR to switch back to the other format (see #896) (I also see "No org id or slug has been provided" even when no private orbs are used, and the way of specifying slugs seems to have changed; I can open separate issues for those if someone can take a look)( |
Reintroduces the output style introduced in CircleCI-Public#861 to resolve CircleCI-Public#860, but reverted in CircleCI-Public#884
@wyardley - no, I'm not strongly tied, let's get the improvements merged in and we can cut a new release - I thought I'd carried forward your changes but there were a lot of other moving parts in that PR. |
Generally improves the architectural design of the config commands to make them more easily testable.
I've extracted out the config commands into a separate package which is purely responsible for config validation and processing. It delegates all handling of various flag parsing to the
cmd
package which then passes them in as options.This provides a better separation of concerns between the two packages and also means it's far easier to unit test the code and set up test cases as can be seen in the expanded unit test coverage.
There are still a few more optimisations that can be done, such as consolidating the
loadYaml
function into a separate package and refactoring the orb commands to use a single definition for this, but I've opted to focus purely on the config domain for now and improving that.This takes coverage of the config package up from 0% to a far healthier:
Checklist
=========
Internal Checklist
Changes
=======
Validation
=======