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

Scaffold Respository #1

Merged
merged 2 commits into from
Nov 23, 2022
Merged

Scaffold Respository #1

merged 2 commits into from
Nov 23, 2022

Conversation

terryyylim
Copy link
Contributor

@terryyylim terryyylim commented Nov 22, 2022

What this PR does / why we need it:
This PR scaffolds the repository with the following:

  • Go modules
    • Common module (Config reader etc.)
      • Unit tests
    • Observation Service module
      • Multiplexing server with CMux
      • Unit tests
  • OSS files (LICENSE, CONTRIBUTING etc.)
  • Pre-commit hooks
  • Github workflows
    • Unit tests
Screen.Recording.2022-11-22.at.1.24.54.PM.mov

Which issue(s) this PR fixes:

None

@terryyylim terryyylim added the enhancement New feature or request label Nov 22, 2022
@terryyylim terryyylim self-assigned this Nov 22, 2022
@terryyylim terryyylim requested review from krithika369 and pradithya and removed request for krithika369 and pradithya November 22, 2022 05:36
@terryyylim
Copy link
Contributor Author

cc: @pradithya

CONTRIBUTING.md Outdated
make setup
```

3. On push, the pre-commit hook will run. This runs `make format`, `make lint`, `UI linting` and `generation of helm docs`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is no UI linting / helm doc gen (at least, not yet). Shall we remove it?

return nil
}

func reflectViperConfig(prefix string, spec interface{}, v *viper.Viper) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

A docstring for the function describing what it does would be useful.

@@ -0,0 +1,95 @@
package config
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we have this common module already? Is it expected that this repo will contain the dataset service and other services later on as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

)

type Config struct {
HTTPPort int `envconfig:"CARAML_HTTP_PORT" default:"8081"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious, why the choice to prefix the envvar name with CARAML_ as opposed to something like APP_ which seems to be our convention in Turing at least (example).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No reason, I just thought perhaps we can consolidate the ports to be similar for all our services in CaraML ecosystem.


// Create gRPC server
srv := &Server{
observationClient: observationClient,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need the gRPC client in the server? Thought we'd instead be calling this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good point, we don't need it, removed!

@terryyylim terryyylim force-pushed the spike-observation-service branch from 5dbf098 to 1090e3d Compare November 23, 2022 02:40
Copy link
Collaborator

@krithika369 krithika369 left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -0,0 +1,30 @@
module github.com/caraml-dev/observation-service/common

go 1.18
Copy link
Member

Choose a reason for hiding this comment

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

Since the repository started with multi module implementation, can we evaluate using workspace ?

Copy link
Member

@pradithya pradithya left a comment

Choose a reason for hiding this comment

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

Left minor comment. LGTM!

@terryyylim terryyylim force-pushed the spike-observation-service branch from d64c148 to 1090e3d Compare November 23, 2022 09:35
@terryyylim terryyylim merged commit a3de7bc into main Nov 23, 2022
@terryyylim terryyylim deleted the spike-observation-service branch February 7, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants