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

fix: bring back --up flag #255

Closed
wants to merge 4 commits into from
Closed

Conversation

marco-m
Copy link
Contributor

@marco-m marco-m commented Dec 16, 2024

Desired Outcome

Fix #254 (flag --up is not working any more).

Implemented Changes

Describe how the desired outcome above has been achieved with this PR. In
particular, consider:

  • What's changed? Why were these changes made?

Added back the handling of --up flag, which has been removed by mistake (I think).

  • How should the reviewer approach this PR, especially if manual tests are required?

Best reviewed commit-per-commit, considering the commit messages.

No manual tests are required; the PR adds an integration test to protect from this regression. See the comments I added in #254 for details.

Connected Issue/Story

Resolves #254

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be
merged.

Changelog

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a
    CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code
    changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR
  • A follow-up issue to update official docs has been filed here: [insert issue ID]
  • This PR does not require updating any documentation

Behavior

  • This PR changes product behavior and has been reviewed by a PO, or
  • These changes are part of a larger initiative that will be reviewed later, or
  • No behavior was changed with this PR

Security

  • Security architect has reviewed the changes in this PR,
  • These changes are part of a larger initiative with a separate security review, or
  • There are no security aspects to these changes

@SpectreVert
Copy link

LGTM. The integration test is a good addition.

@marco-m-pix4d
Copy link

Hello @imheresamir @apruszynski @szh who could I ask to have a look at this PR when they have time? Thanks!

@szh
Copy link
Contributor

szh commented Jan 6, 2025

@marco-m I'll bring this up to my team. Thanks!

Copy link
Contributor

@doodlesbykumbi doodlesbykumbi left a comment

Choose a reason for hiding this comment

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

Brilliant work @marco-m! Thank you for finding the root cause and addressing the issue comprehensively. I was responsible for the commit that introduced the issue so I doubly appreciate the addition of the high level test case to validate the feature!

@@ -45,6 +45,14 @@ func RunSubprocess(sc *SubprocessConfig) (int, error) {

subs := convertSubsToMap(sc.Subs)

if sc.RecurseUp {
currentDir, err := os.Getwd()

Choose a reason for hiding this comment

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

Sigh I am missing checking the err returned by Getwd :-(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just force pushed a fix. Ready for review.

@szh szh assigned doodlesbykumbi and unassigned szh Jan 7, 2025
@szh
Copy link
Contributor

szh commented Jan 8, 2025

I'm going to try to get this merged on Friday.

@szh szh self-assigned this Jan 8, 2025
@szh
Copy link
Contributor

szh commented Jan 10, 2025

Can you please send a signed copy of the CLA to [email protected]?

This is the original test when I introduced the --up flag

Signed-off-by: Marco Molteni <[email protected]>
This simplifies the code

Signed-off-by: Marco Molteni <[email protected]>
This time we add an integration test, to make it sure that a test will catch it.

Signed-off-by: Marco Molteni <[email protected]>
Signed-off-by: Marco Molteni <[email protected]>
@marco-m
Copy link
Contributor Author

marco-m commented Jan 10, 2025

@szh I could not find a mention of having to sign a CLA in the CONTRIBUTING.md for this repo (summon). Reading https://github.com/cyberark/community/blob/main/CONTRIBUTING.md#when-the-repo-does-not-include-the-cla, I saw that in this case you are OK with a --signoff trailer. Since I am also OK with a signoff, I just pushed the 4 commits with the signoff trailer.

@szh
Copy link
Contributor

szh commented Jan 10, 2025

Perfect. This is all ready to merge internally, just waiting for one more layer of code review.

@szh
Copy link
Contributor

szh commented Jan 14, 2025

Merged in the latest version! Thank you so much for your contribution!
https://github.com/cyberark/summon/releases/tag/v0.10.2

@szh szh closed this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--up is broken: open secrets.yml: no such file or directory
5 participants