Comments (14)
Since most of go tools expects 'v' as prefix, i am favoring towards having all release tags to have 'v' as prefix. Instead of editing the existing tag, i am thinking about release new tag v1.0.0 and in future will have 'v' for all release tags. @dblock @henvic @stockholmux any objection?
from opensearch-go.
Sure, @stockholmux!
From Go Modules Reference: Version:
A version identifies an immutable snapshot of a module, which may be either a release or a pre-release. Each version starts with the letter v, followed by a semantic version. See Semantic Versioning 2.0.0 for details on how versions are formatted, interpreted, and compared.
If I want to use this released version, I'd need to use Pseudo-versions. Reading the docs, I see:
Pseudo-versions never need to be typed by hand. Many commands accept a commit hash or a branch name and will translate it into a pseudo-version (or tagged version if available) automatically. For example:
go get -d example.com/mod@master
go list -m -json example.com/mod@abcd1234
This means I'd have to execute the following command to update my go.mod with version 1.0.0:
$ go get -d github.com/opensearch-project/[email protected]
go get: added github.com/opensearch-project/opensearch-go v0.0.0-20210831032935-8b5df4936baa
If we look what ends up in the go.mod file, it doesn't look good:
$ cat go.mod
module github.com/hatch-studio/customer-service/internal/dao/x
go 1.17
require github.com/opensearch-project/opensearch-go v0.0.0-20210831032935-8b5df4936baa // indirect
instead of containing the expected
require github.com/opensearch-project/opensearch-go v1.0.0
Now, if I want to know what version I'm using, I'd have to browse this repository and find 8b5df4936baa, which will show that it's tagged as 1.0.0
.
I also wonder if it affects dependabot alerts in any way, but I don't think so.
from opensearch-go.
OK - makes sense. So, there is no real friction at the time of adding the module but when trying to determine the module version later it's obscured.
It's a bit annoying that semantic versioning explicitly doesn't want the v
but the official reference says to add it to semantic versioning. 🤦♂️
I think the bigger issue is any project wide tooling that is either in place or planned that will use things like a semver regexp. Let me dig.
from opensearch-go.
Oh, also I see that if you go to Go's package search (https://pkg.go.dev/github.com/opensearch-project/opensearch-go) it shows no tagged/stable version.
from opensearch-go.
Created new tag https://github.com/opensearch-project/opensearch-go/releases/tag/v1.0.0
from opensearch-go.
Thanks!
$ go get -d github.com/opensearch-project/opensearch-go@latest
go get: upgraded github.com/opensearch-project/opensearch-go v0.0.0-20211002184036-fb1709a85d8d => v1.0.0
from opensearch-go.
I'm a little mixed on this. All parts of OpenSearch uses semantic versioning that is X.Y.Z
. Using vX.Y.Z
introduces an inconsistency which makes my eye twitch. Seems like the linked context also has people with similar twitches.
I've only casually used golang, so can you help me understand the ramifications of using X.Y.Z
with go mod? Feel free to chime in @VijayanB.
from opensearch-go.
If you really want to keep using tags without the v
prefix here, maybe you could get away using a vanity import (https://github.com/GoogleCloudPlatform/govanityurls), and have it tagged as v1.0.0
outside of the repository, but I've a feeling this complicates things (and maybe doesn't solve it completely somehow?).
from opensearch-go.
I'd say there's some friction too for a set of users, though: whoever edits go.mod
manually + run go mod tidy
(what I usually do). I don't know what is the number of people that do this, though.
from opensearch-go.
and latest version: Version: v0.0.0-...-fb1709a :|
from opensearch-go.
Related, opensearch-project/.github#35
from opensearch-go.
I think it's perfectly OK if opensearch-go tags with v
if that's the convention of go rather than adopt convention of OpenSearch since this component doesn't release together with the complete distribution. It's the same in Ruby AFAIK.
from opensearch-go.
Sounds good to me.
from opensearch-go.
This would be the best solution for golang users
from opensearch-go.
Related Issues (20)
- [FEATURE] Add an Explanation field containing the document explain details to the SearchHit struct
- [BUG] Add missing global io usage field for nodes stats
- [FEATURE] Use pooled gzip writer for request body gzip compression
- [BUG] 429 error does not follow standard error format HOT 5
- [BUG] not reporting when failed index HOT 5
- [FEATURE] ML client for pipeline setup and neural search HOT 2
- [BUG] Request context cancellation is ignored when `retryBackoff` is configured
- [BUG] Error http: ContentLength=401 with Body length 0 HOT 9
- [FEATURE] Exploring similar functionality in Go as Python classes {Object, Nested, Text, Keyword}. HOT 3
- Cleanup unused branches HOT 1
- [BUG]Unable to install because of checksum error HOT 3
- ISM Plugin `Conditions` struct is invalid
- [BUG] MappingFieldResp struct is not parsed correctly. HOT 2
- [BUG] Tests are flaky HOT 1
- Add MatchedQueries field to opensearchapi.SearchHit HOT 3
- [BUG] Index name is added two times to a query when using SearchRequest HOT 1
- [BUG] opensearchapi.Client.Document.Delete bugged error handling (v4) HOT 13
- [FEATURE] Make all response structs their own type
- [FEATURE] Support `search_pipeline` query parameter for search API requests HOT 1
- [BUG] ISM Allocation action does not match Opensearch server expectation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensearch-go.