Skip to content

Flagless spin up application source#1159

Closed
itowlson wants to merge 3 commits intospinframework:mainfrom
itowlson:flagless-app-source
Closed

Flagless spin up application source#1159
itowlson wants to merge 3 commits intospinframework:mainfrom
itowlson:flagless-app-source

Conversation

@itowlson
Copy link
Copy Markdown
Collaborator

@itowlson itowlson commented Feb 16, 2023

Fixes #1155.

@itowlson itowlson force-pushed the flagless-app-source branch from 1ae372c to 51368cf Compare February 16, 2023 05:30
@itowlson itowlson force-pushed the flagless-app-source branch from 51368cf to b840eed Compare February 16, 2023 21:14
Signed-off-by: itowlson <[email protected]>
Signed-off-by: itowlson <[email protected]>
@itowlson itowlson force-pushed the flagless-app-source branch from d537f16 to b711469 Compare February 16, 2023 22:46
@itowlson itowlson marked this pull request as ready for review February 16, 2023 22:46
@itowlson
Copy link
Copy Markdown
Collaborator Author

I'd particularly appreciate folks bringing their best edge cases (except Lann, his edge cases are too good). Thanks!

@itowlson
Copy link
Copy Markdown
Collaborator Author

Weird issue where spin up --bindle spin-headers-env-routes-test/1.0.0 --bindle-server http://127.0.0.1:35339/v1/ works but spin up --bindle spin-headers-env-routes-test/1.0.0 --bindle-server http://127.0.0.1:35339/v1/ --listen 127.0.0.1:39453 says you can't use --bindle with the positional arg. Investigating.

@itowlson
Copy link
Copy Markdown
Collaborator Author

Seems to happen when a trigger option is specified alongside a conflicty (source) flag.

If I remove the conflict I can see what's going on and CLAP IS INTERPRETING THE TRIGGER OPTION AS THE APP SOURCE AAAHH

@itowlson
Copy link
Copy Markdown
Collaborator Author

So the issue is that we already have the positional trigger_args collection, which picks up all arguments not matched by up arguments. But now we have a positional arg for the app source, which picks up the first positional arg. But that means that if the app source is omitted, and there are trigger args being interpreted positionally, the first trigger arg gets interpreted as the app source (because it's in the first positional, er, position).

I am... actually not sure how to get around this.

@itowlson
Copy link
Copy Markdown
Collaborator Author

At the moment the closest thing to a solution I can think of to this is to retain -f but allow it to take directories and registry references as well as plain files.

@itowlson
Copy link
Copy Markdown
Collaborator Author

Lann notes that we could pretend -f stood for --from if that helps sell anybody on the above proposition.

@calebschoepp
Copy link
Copy Markdown
Collaborator

Lann notes that we could pretend -f stood for --from if that helps sell anybody on the above proposition.

Commence massive disinformation campaign. In all seriousness though I like this solution.

@itowlson
Copy link
Copy Markdown
Collaborator Author

#1179 presents an alternative proposal that is not as beautiful but might be more workable.

@itowlson itowlson marked this pull request as draft February 20, 2023 00:57
@itowlson
Copy link
Copy Markdown
Collaborator Author

I think we are closing this in favour of #1179.

@itowlson itowlson closed this Feb 22, 2023
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.

Flagless spin up application source

3 participants