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

[SPIKE] "pepr build --version <version>" writes pepr version to stdout #1661

Closed
btlghrants opened this issue Jan 14, 2025 · 4 comments
Closed
Assignees
Milestone

Comments

@btlghrants
Copy link
Contributor

Background

While working #1654 I discovered that when trying to use the --version option we appear to just get the result of pepr --version (almost like Commander.js is interpreting the --version flag overly-eagerly & not letting the sub command parse it..?).

This should be investigated. Current behavior codified in (upcoming) integration test for the pepr build cli:

  • /integration/cli/build.version.test.ts : build > builds a module > using a specified pepr version > builds

Definition of Done

  1. figure out whether this is a "real" error or just a matter of test setup / config, and
  2. fix the error (if it is one).
@btlghrants btlghrants converted this from a draft issue Jan 14, 2025
@cmwylie19 cmwylie19 changed the title "pepr build --version <version>" writes pepr version to stdout [SPIKE] "pepr build --version <version>" writes pepr version to stdout Jan 15, 2025
@cmwylie19 cmwylie19 moved this from Questions to 📋 Backlog in Pepr Project Board Jan 15, 2025
@cmwylie19 cmwylie19 added this to the v0.43.0 milestone Jan 15, 2025
@samayer12 samayer12 self-assigned this Jan 15, 2025
@samayer12 samayer12 added the BLOCKED issue is blocked label Jan 15, 2025
@samayer12
Copy link
Contributor

samayer12 commented Jan 15, 2025

Blocked waiting on #1642 to merge with main since integration/cli does not exist on main.

@samayer12 samayer12 removed their assignment Jan 15, 2025
@samayer12 samayer12 removed the BLOCKED issue is blocked label Jan 15, 2025
@samayer12 samayer12 self-assigned this Jan 15, 2025
@samayer12 samayer12 added the BLOCKED issue is blocked label Jan 17, 2025
@samayer12
Copy link
Contributor

While working on this, I noticed some test flakes on my dev environment. I've created https://github.com/defenseunicorns/pepr/tree/hotfix-local-integration-failure to dig into the root cause here before I make progress on this issue.

@cmwylie19 cmwylie19 modified the milestones: v0.43.0, v0.44.0 Jan 21, 2025
@samayer12 samayer12 moved this from 📋 Backlog to 🏗 In progress in Pepr Project Board Jan 21, 2025
@samayer12 samayer12 removed the BLOCKED issue is blocked label Jan 22, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 22, 2025
## Description

In support of #1661, this PR fixes issues with test setup for
integration tests.

End to End Test:  <!-- if applicable -->  
(See [Pepr Excellent
Examples](https://github.com/defenseunicorns/pepr-excellent-examples))

## Related Issue

Relates to #1661

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging
- [x] Unit,
[Journey](https://github.com/defenseunicorns/pepr/tree/main/journey),
[E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples),
[docs](https://github.com/defenseunicorns/pepr/tree/main/docs),
[adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or
updated as needed
- [x] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Co-authored-by: Barrett <[email protected]>
@cmwylie19 cmwylie19 modified the milestones: v0.44.0, v0.45.0 Jan 24, 2025
@samayer12
Copy link
Contributor

It turns out --version is used in multiple locations and this indicates an issue with our CLI option parsing. See Pepr Docs.

 npx pepr --help

Options:
  -V, --version   output the version number

versus

npx pepr build --help

Options:
[...]
  -v, --version <version>  The version of the Pepr image to use in the deployment manifests. Example: '0.27.3'.

This internal slack thread discusses options, to include removing the flag if users don't use it.

@samayer12
Copy link
Contributor

Identified some specific follow-on work after taking a look at this issue. Closing and will get to the underlying issues in #1724 and #1725.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Pepr Project Board Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants