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

Expand on the recognised fluxd flags #279

Merged
merged 6 commits into from
Jun 11, 2019
Merged

Expand on the recognised fluxd flags #279

merged 6 commits into from
Jun 11, 2019

Conversation

squaremo
Copy link
Contributor

@squaremo squaremo commented Jun 4, 2019

This adds to the list of fluxd flags that the agent will recognise and include in launch-generator URLs.

Since there are now more than four, and they don't all appear together necessarily, I've changed how the URL is constructed.

Fixes #277. (And needs a compensating change in the service being polled for configs.)

agent/main.go Outdated Show resolved Hide resolved
agent/flux.go Outdated Show resolved Hide resolved
@foot
Copy link
Contributor

foot commented Jun 6, 2019

Okey doke, as there are old-school git-ci-skip=true usages in the wild we should be able to parse those.. this newer flag parsing lib might have a "relaxed" mode, otherwise we could use the https://github.com/spf13/pflag one flux uses. Investigating..

@foot foot force-pushed the more-flux-args branch from e59d7ec to 234e4c7 Compare June 6, 2019 15:38
Gopkg.lock Outdated Show resolved Hide resolved
@foot foot force-pushed the more-flux-args branch from 234e4c7 to 0df1e4e Compare June 7, 2019 07:31
squaremo and others added 4 commits June 7, 2019 10:10
This adds to the list of fluxd flags that the agent will recognise and
include in URLs.

Since there are now more than four, and they don't all appear together
necessarily, I've changed how the URL is constructed.
- More tests
- Don't need struct flag parse annotations
@foot foot force-pushed the more-flux-args branch from 0df1e4e to 22175a0 Compare June 7, 2019 08:10
@foot
Copy link
Contributor

foot commented Jun 10, 2019

@squaremo I’m happy to merge this it seems to work alright! The code I added is a bit rough wdyt?

agent/flux.go Outdated Show resolved Hide resolved
@squaremo squaremo force-pushed the more-flux-args branch 2 times, most recently from 3f618d5 to 3b30570 Compare June 10, 2019 17:10
We can save the clean-up phase, which reset things to `nil` if they
weren't passed as flags, by checking with the flag parser
directly. This makes it trickier to construct a config (since it needs
the flags parser state), but that's what `ParseFluxArgs` is for.

The code that uses ParseFluxArgs is sensitive to whether it gets a
`nil`, a value, or an error, so that behaviour must be preserved.
@foot
Copy link
Contributor

foot commented Jun 11, 2019

Awesome stuff, thanks @squaremo

@foot foot merged commit c93bb35 into master Jun 11, 2019
@foot foot deleted the more-flux-args branch June 11, 2019 10:17
@bricef
Copy link

bricef commented Jun 11, 2019

Where are the usage docs for this?

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.

Include more fluxd flags in the requested launch configuration
4 participants