Repository: feast-dev/feast

Issue:
Go SDK: go get by Version Tag Does Not Work
## Problem & Expected Behavour
`go get` to install the Feast Go SDK should work by version tag:
```
go get github.com/feast-dev/feast/sdk/go@v0.5.1
```
Returns: 
```
go get github.com/feast-dev/feast/sdk/go@v0.5.1: module github.com/feast-dev/feast@v0.5.1 found, but does not contain package github.com/feast-dev/feast/sdk/go
```
Instead of installing the Go SDK at release version tag v0.5.1.

## Proposed Solution
- Update [setup.py](https://github.com/feast-dev/feast/blob/89883d418b4935d595585689d63d246ad133cabe/sdk/python/setup.py#L86) to support non semver tags. (ie `sdk/go/v0.5.1`)
- Introduce additional tag `sdk/go/v<VERSION>` each release. This tag will allow us to pull the go module by a versioned tag. [Reference](https://github.com/golang/go/wiki/Modules#faqs--multi-module-repositories)


Discussion:
> Introduce additional tag sdk/go/v<VERSION> each release

Does this mean you have 2 tags on one commit?
>Does this mean you have 2 tags on one commit?

Yes two tags pointing to the tagged release commit.

As a side note, there are `go.mod` and `go.sum` files in project root. They appear to be used to track dependencies of `make compile-protos-go`. Whatever their purpose is, go will treat project root as a go module and the actual go SDK as another module, making it a [multiple module repository as described in this GO FAQ](https://github.com/golang/go/wiki/Modules#faqs--multi-module-repositories)
> > Does this mean you have 2 tags on one commit?
> 
> Yes two tags pointing to the tagged release commit.
> 
> As a side note, there are `go.mod` and `go.sum` files in project root. They appear to be used to track dependencies of `make compile-protos-go`. Whatever their purpose is, go will treat project root as a go module and the actual go SDK as another module, making it a [multiple module repository as described in this GO FAQ](https://github.com/golang/go/wiki/Modules#faqs--multi-module-repositories)

Would removing the `go.mod` and `go.sum` in the root be possible and lead to any benefit?
From my own testing, removing the root `go.mod` and `go.sum` would break `go get` ability of the Go SDK `sdk/go` go module entirely. 
So that is not an option.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.


Resolving patch:
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 import os
+import re
 import subprocess
 
 from setuptools import find_packages, setup
@@ -59,6 +60,13 @@
 with open(os.path.join(README_FILE), "r") as f:
     LONG_DESCRIPTION = f.read()
 
+# Add Support for parsing tags that have a prefix containing '/' (ie 'sdk/go') to setuptools_scm.
+# Regex modified from default tag regex in:
+# https://github.com/pypa/setuptools_scm/blob/2a1b46d38fb2b8aeac09853e660bcd0d7c1bc7be/src/setuptools_scm/config.py#L9
+TAG_REGEX = re.compile(
+    r"^(?:[\/\w-]+)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$"
+)
+
 setup(
     name=NAME,
     author=AUTHOR,
@@ -83,6 +91,6 @@
         "Programming Language :: Python :: 3.6",
     ],
     entry_points={"console_scripts": ["feast=feast.cli:cli"]},
-    use_scm_version={"root": "../..", "relative_to": __file__},
+    use_scm_version={"root": "../..", "relative_to": __file__, "tag_regex": TAG_REGEX},
     setup_requires=["setuptools_scm"],
 )


Test patch: