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

Remove API duplicates of nomad/structs and remove the compose api. #329

Closed
dadgar opened this issue Oct 23, 2015 · 9 comments
Closed

Remove API duplicates of nomad/structs and remove the compose api. #329

dadgar opened this issue Oct 23, 2015 · 9 comments

Comments

@dadgar
Copy link
Contributor

dadgar commented Oct 23, 2015

The api package has copies of the nomad structs used everywhere else. We should just remove them (example

type Job struct {
) and also the compose helpers (https://github.com/hashicorp/nomad/blob/master/api/compose_test.go)

@Raffo
Copy link
Contributor

Raffo commented Nov 30, 2015

@dadgar Can you explain what needs to be done here? It's not really clear to me.

@dadgar
Copy link
Contributor Author

dadgar commented Nov 30, 2015

You will notice that the two packages duplicate all structs returned by the HTTP API. I linked an example. So the task is really to make the API layer return structs defined in nomad/structs

nomad/structs package
api package

@Raffo
Copy link
Contributor

Raffo commented Dec 26, 2015

@dadgar Could this be what you want? Raffo@65aaad3
If so, I could update my fork with the newer commits from master and submit a PR.

@dadgar
Copy link
Contributor Author

dadgar commented Jan 4, 2016

@Raffo: Yes that is exactly what I wanted! I left a few comments on your commit. The command (cli) package would probably have to be updated too!

@Raffo
Copy link
Contributor

Raffo commented Jan 4, 2016

@dadgar I'll have a look at your comments tomorrow and I'll try to address them. After that, should I update my fork from upstream? I guess there are many new commits and I have no idea if the merge will be painful... tell me what you prefer.

@dadgar
Copy link
Contributor Author

dadgar commented Jan 6, 2016

@Raffo: Yeah exactly, I would rebase your branch and then create a PR.

@dadgar
Copy link
Contributor Author

dadgar commented Jan 7, 2016

@Raffo: we actually decided to keep the duplicates as a compatibility layer in case the two ever diverge. I really appreciate the effort!

@dadgar dadgar closed this as completed Jan 7, 2016
@Raffo
Copy link
Contributor

Raffo commented Jan 7, 2016

Well, it was fun anyways :-)

benbuzbee pushed a commit to benbuzbee/nomad that referenced this issue Jul 21, 2022
* Refactor recoverCluster into private functions

* added lastSnapIndex and some is
benbuzbee pushed a commit to benbuzbee/nomad that referenced this issue Jul 21, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants