SlideShare a Scribd company logo
Understanding Pseudo-Versions
Moving to Go 1.13
What is in Go 1.14+ for Modules
By Mitali Bisht
WHO AM I ?
Mitali Bisht
Software Engineer @JFrog
GoCenter.io Developer
@EngrMitaliB
#gocenter
●
●
●
https://bit.ly/GolangDCJFrog
BY THE END OF THIS TALK YOU WILL KNOW
▪ About pseudo-versions
▪ Go 1.13 pseudo-version verification
▪ Fixing Incorrect pseudo-versions for Go Modules
▪ What is Go 1.14+ bringing for modules
WHAT IS A GO MODULE?
module github.com/containers/common
go 1.12
require (
github.com/BurntSushi/toml v0.3.1
github.com/containers/image/v5 v5.4.3
github.com/containers/storage v1.19.1
github.com/opencontainers/runc v1.0.0-rc9
github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 //
indirect
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775
….
)
Release versions (Semantic Versions)
• A module is a collection of Go packages stored in a file tree with a go.mod file at its root. The
go.mod file defines the module’s module path, which is also the import path used for the root
directory, and its dependency requirements, which are the other modules needed for a
successful build. Each dependency requirement is written as a module path and a specific
semantic version
•
•Go command uses Semantic version vX.Y.Z as the standard form to describe Module version
X- MAJOR- Incompatible changes
Y- Minor- Backward compatible functionality added
Z - PATH- Backwards compatible bug fixes
•
•Normal releases are being preferred by Go
•Module version is introduced by tagging a revision in source repo
WHAT IS A GO MODULE?
module github.com/containers/common
go 1.12
require (
github.com/BurntSushi/toml v0.3.1
github.com/containers/image/v5 v5.4.3
github.com/containers/storage v1.19.1
github.com/opencontainers/runc v1.0.0-rc9 Pre-release version
github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 //
indirect
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775
….
)
WHAT IS A GO MODULE?
module github.com/containers/common
go 1.12
require (
github.com/BurntSushi/toml v0.3.1
github.com/containers/image/v5 v5.4.3
github.com/containers/storage v1.19.1
github.com/opencontainers/runc v1.0.0-rc9
github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 //
indirect
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 Pseudo-versions
….
)
USING PSEUDO-VERSIONS
▪ Untagged revision
▪ Dependent project has not published any semantic version tags
▪ Develop against a commit which has not been tagged yet
•The go command will accept the plain commit hash and translate it into a pseudo-version (or
a tagged version if available) automatically. It also helps to compare the revisions based on
generated timestamp. This is an example of gomodule query
•There are pseudo-versions that are edited by hand or generated by third party tools
•Through Go 1.12, Pseudo-version with arbitrary combination of version string and date, would
resolve to the underlying revision (typically a Git commit hash) as long as that revision existed
by Go
DON’T UPDATE PSEUDO-VERSIONS MANUALLY
● The pseudo-version participates in minimal version selection.
● The commit date within the pseudo-version provides a total order among
pseudo-versions.
The pseudo-version participates in minimal version selection. If its version prefix is inaccurate,
the pseudo-version may appear to have higher precedence that the releases that follow it,
effectively “pinning” the module to that commit.
BEFORE GO 1.13 AFTER GO 1.13
-> go version
go version go1.13.5 darwin/amd64
-> go get
golang.org/x/sys@v0.0.0-20190726091023-fde4d
b37ae7a
go: finding golang.org
v0.0.0-20190726091023-fde4db37ae7a
go: finding golang.org/x
v0.0.0-20190726091023-fde4db37ae7a
go: finding golang.org/x/sys
v0.0.0-20190726091023-fde4db37ae7a
go: finding golang.org/x/sys
v0.0.0-20190726091023-fde4db37ae7a
go get
golang.org/x/sys@v0.0.0-20190726091023-fde4d
b37ae7a:
golang.org/x/sys@v0.0.0-20190726091023-fde4d
b37ae7a: invalid pseudo-version: does not
match version-control timestamp
(2019-08-13T06:44:41Z)
-> go version
go version go1.12.14 darwin/amd64
-> go get
golang.org/x/sys@v0.0.0-20190726091023-fde4d
b37ae7a
go: finding golang.org/x/sys
v0.0.0-20190726091023-fde4db37ae7a
go: downloading golang.org/x/sys
v0.0.0-20190726091023-fde4db37ae7a
go: extracting golang.org/x/sys
v0.0.0-20190726091023-fde4db37ae7a
go: finding golang.org/x/sys latest
-> cat go.mod
module demo/go12
go 1.12
require golang.org/x/sys
v0.0.0-20190726091023-fde4db37ae7a //
indirect
GO 1.13 PSEUDO-VERSIONS VALIDATION
module github.com/containers/common
go 1.12
require (
github.com/BurntSushi/toml v0.3.1
github.com/containers/image/v5 v5.4.3
github.com/containers/storage v1.19.1
github.com/opencontainers/runc v1.0.0-rc9
github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 //
indirect
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775
…..
)
1. 3.2.
1. The tag from which the pseudo-version derives points to the named revision or one of
its ancestors as reported by the underlying VCS tool, or the pseudo-version is not
derived from any tag i.e. has a "vX.0.0-" prefix before the date string and uses the
lowest major version appropriate to the module path).
2. The date string within the pseudo-version matches the UTC timestamp of the revision
as reported by the underlying VCS tool.
3. The short name of the revision within the pseudo-version is the same as the short
name generated by Go command. Specifically, if the short name is a SHA-1 prefix, it
must use the same number of hex digits (12)
GO 1.13 PSEUDO-VERSIONS VALIDATION
4. '+incompatible' suffix
5. Checksum server validation
4. The pseudo-version includes a '+incompatible' suffix only if it is needed for the
corresponding major version, and only if the underlying module does not have a go.mod file
5 . In each module's root, alongside go.mod, the go command maintains a file named go.sum
containing the cryptographic checksums of the module's dependencies. As of Go1.13, with go
get command it will validate module version against checksum server(which is a transparent
log of all public module checksums)
FIXING INCORRECT PSEUDO-VERSIONS
● Direct dependencies
● Transitive dependencies
replace golang.org/x/sys v0.0.0-20190726091711-fde4db37ae7a
=> golang.org/x/sys fde4db37ae7a
require {
golang.org/x/sys fde4db37ae7a
}
HOW GoCenter AS GOPROXY CAN HELP
▪ GoCenter changes the metadata in the .info with the correct version when the
module download was requested for incorrect pseudo-version.
BEFORE GO 1.13 AFTER GO 1.13
-> export GOPROXY=https://gocenter.io/
-> go version
go version go1.13.5 darwin/amd64
-> go get
golang.org/x/sys@v0.0.0-20190726091023-fde4d
b37ae7a
go: finding golang.org/x
v0.0.0-20190726091023-fde4db37ae7a
go: finding golang.org/x/sys
v0.0.0-20190726091023-fde4db37ae7a
go: finding golang.org
v0.0.0-20190726091023-fde4db37ae7a
go get
golang.org/x/sys@v0.0.0-20190726091023-fde4d
b37ae7a:
golang.org/x/sys@v0.0.0-20190726091023-fde4d
b37ae7a: proxy returned info for version
v0.0.0-20190813064441-fde4db37ae7a instead
of requested version
-> export GOPROXY=https://gocenter.io/
-> go version
go version go1.12.14 darwin/amd64
-> go get
golang.org/x/sys@v0.0.0-20190726091023-fde4d
b37ae7a
go: finding golang.org/x/sys
v0.0.0-20190726091023-fde4db37ae7a
go: finding golang.org/x/sys
v0.0.0-20200515095857-1151b9dac4a9
go: downloading golang.org/x/sys
v0.0.0-20200515095857-1151b9dac4a9
go: extracting golang.org/x/sys
v0.0.0-20200515095857-1151b9dac4a9
-> cat go.mod
module proxydemo/go12
go 1.12
require golang.org/x/sys
v0.0.0-20190813064441-fde4db37ae7a //
indirect
HOW GoCenter AS GOPROXY CAN HELP
▪ For Go 1.13 change in Go Command will automatically update correct
pseudo-version
go get <module_name>@<commit_hash>
WHAT IS IN GO 1.14+ FOR MODULES ?
● go get -modfile = /Documents/example1.mod
● go get -mod = readonly /path/to/module
● “go get” upgrade to an +incompatible major version automatically
● plain-text error messages from module proxies and other HTTP servers
● SVN
Questions?
@EngrMitaliB
#gocenter
https://bit.ly/GolangDCJFrog

More Related Content

What's hot

Git training with Devaamo
Git training with DevaamoGit training with Devaamo
Git training with Devaamo
Otto Kekäläinen
 
Let's Contribute
Let's ContributeLet's Contribute
Let's Contribute
Anoop Thomas Mathew
 
Helios in Action: Git at Eclipse
Helios in Action: Git at EclipseHelios in Action: Git at Eclipse
Helios in Action: Git at Eclipse
Chris Aniszczyk
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
Martin Jinoch
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot public
SeongJae Park
 
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
Codemotion
 
Essential Git and Github commands
Essential Git and Github commandsEssential Git and Github commands
Essential Git and Github commands
Isham Rashik
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Juanma Orta
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshare
Cavelle Benjamin
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
HannahMoss14
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
Opersys inc.
 
I docstools
I docstoolsI docstools
I docstools
Eva Dominguez
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCS
SeongJae Park
 
Version Control With GitHub & RStudio
Version Control With GitHub & RStudioVersion Control With GitHub & RStudio
Version Control With GitHub & RStudio
Rsquared Academy
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
Ignacio Martín
 
Best practices-for-production-environments
Best practices-for-production-environmentsBest practices-for-production-environments
Best practices-for-production-environmentsArtem Kovardin
 
Git and Testing
Git and TestingGit and Testing
Git and Testing
Christian Couder
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 

What's hot (19)

Git training with Devaamo
Git training with DevaamoGit training with Devaamo
Git training with Devaamo
 
Let's Contribute
Let's ContributeLet's Contribute
Let's Contribute
 
Helios in Action: Git at Eclipse
Helios in Action: Git at EclipseHelios in Action: Git at Eclipse
Helios in Action: Git at Eclipse
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot public
 
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
 
Essential Git and Github commands
Essential Git and Github commandsEssential Git and Github commands
Essential Git and Github commands
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshare
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
 
I docstools
I docstoolsI docstools
I docstools
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCS
 
Version Control With GitHub & RStudio
Version Control With GitHub & RStudioVersion Control With GitHub & RStudio
Version Control With GitHub & RStudio
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
 
Best practices-for-production-environments
Best practices-for-production-environmentsBest practices-for-production-environments
Best practices-for-production-environments
 
Git and Testing
Git and TestingGit and Testing
Git and Testing
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 

Similar to Understanding pseudo-version and Go1.14+ with notes

Security of Go Modules - SF Meetup
Security of Go Modules - SF MeetupSecurity of Go Modules - SF Meetup
Security of Go Modules - SF Meetup
Deep Datta
 
Security of go modules and vulnerability scanning in GoCenter
Security of go modules and vulnerability scanning in GoCenterSecurity of go modules and vulnerability scanning in GoCenter
Security of go modules and vulnerability scanning in GoCenter
Deep Datta
 
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCodeSecurity of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Deep Datta
 
Security of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Security of Go Modules and Vulnerability Scanning in GoCenter and VS CodeSecurity of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Security of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Deep Datta
 
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCodeSecurity of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Deep Datta
 
Security of Go Modules and Vulnerability Scanning in VSCode
Security of Go Modules and Vulnerability Scanning in VSCodeSecurity of Go Modules and Vulnerability Scanning in VSCode
Security of Go Modules and Vulnerability Scanning in VSCode
Deep Datta
 
New Security of Go modules and vulnerability scanning in GoCenter
New Security of Go modules and vulnerability scanning in GoCenterNew Security of Go modules and vulnerability scanning in GoCenter
New Security of Go modules and vulnerability scanning in GoCenter
Deep Datta
 
GTG30: Introduction vgo
GTG30: Introduction vgoGTG30: Introduction vgo
GTG30: Introduction vgo
Evan Lin
 
Security of go modules and vulnerability scanning in go center (1)
Security of go modules and vulnerability scanning in go center (1)Security of go modules and vulnerability scanning in go center (1)
Security of go modules and vulnerability scanning in go center (1)
Deep Datta
 
Security of Go Modules and Vulnerability Scanning in Go center and VSCodee
Security of Go Modules and Vulnerability Scanning in Go center and VSCodeeSecurity of Go Modules and Vulnerability Scanning in Go center and VSCodee
Security of Go Modules and Vulnerability Scanning in Go center and VSCodee
Deep Datta
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
Ramit Surana
 
Security of Go Modules and Vulnerability Scanning in Go Center
Security of Go Modules and Vulnerability Scanning in Go CenterSecurity of Go Modules and Vulnerability Scanning in Go Center
Security of Go Modules and Vulnerability Scanning in Go Center
Deep Datta
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
Simon Hewitt
 
Git Basics
Git BasicsGit Basics
Git Basics
Ryan Condron
 
Mono Repo
Mono RepoMono Repo
Mono Repo
Zacky Pickholz
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
Bo-Yi Wu
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
AbelPhilipJoseph
 
You can git
You can gitYou can git
You can git
Yu GUAN
 
Comparing C and Go
Comparing C and GoComparing C and Go
Comparing C and Go
Marcin Pasinski
 
Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016
Codemotion
 

Similar to Understanding pseudo-version and Go1.14+ with notes (20)

Security of Go Modules - SF Meetup
Security of Go Modules - SF MeetupSecurity of Go Modules - SF Meetup
Security of Go Modules - SF Meetup
 
Security of go modules and vulnerability scanning in GoCenter
Security of go modules and vulnerability scanning in GoCenterSecurity of go modules and vulnerability scanning in GoCenter
Security of go modules and vulnerability scanning in GoCenter
 
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCodeSecurity of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCode
 
Security of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Security of Go Modules and Vulnerability Scanning in GoCenter and VS CodeSecurity of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Security of Go Modules and Vulnerability Scanning in GoCenter and VS Code
 
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCodeSecurity of Go Modules and Vulnerability Scanning in GoCenter and VSCode
Security of Go Modules and Vulnerability Scanning in GoCenter and VSCode
 
Security of Go Modules and Vulnerability Scanning in VSCode
Security of Go Modules and Vulnerability Scanning in VSCodeSecurity of Go Modules and Vulnerability Scanning in VSCode
Security of Go Modules and Vulnerability Scanning in VSCode
 
New Security of Go modules and vulnerability scanning in GoCenter
New Security of Go modules and vulnerability scanning in GoCenterNew Security of Go modules and vulnerability scanning in GoCenter
New Security of Go modules and vulnerability scanning in GoCenter
 
GTG30: Introduction vgo
GTG30: Introduction vgoGTG30: Introduction vgo
GTG30: Introduction vgo
 
Security of go modules and vulnerability scanning in go center (1)
Security of go modules and vulnerability scanning in go center (1)Security of go modules and vulnerability scanning in go center (1)
Security of go modules and vulnerability scanning in go center (1)
 
Security of Go Modules and Vulnerability Scanning in Go center and VSCodee
Security of Go Modules and Vulnerability Scanning in Go center and VSCodeeSecurity of Go Modules and Vulnerability Scanning in Go center and VSCodee
Security of Go Modules and Vulnerability Scanning in Go center and VSCodee
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
 
Security of Go Modules and Vulnerability Scanning in Go Center
Security of Go Modules and Vulnerability Scanning in Go CenterSecurity of Go Modules and Vulnerability Scanning in Go Center
Security of Go Modules and Vulnerability Scanning in Go Center
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Mono Repo
Mono RepoMono Repo
Mono Repo
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
You can git
You can gitYou can git
You can git
 
Comparing C and Go
Comparing C and GoComparing C and Go
Comparing C and Go
 
Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 

Understanding pseudo-version and Go1.14+ with notes

  • 1. Understanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for Modules By Mitali Bisht
  • 2. WHO AM I ? Mitali Bisht Software Engineer @JFrog GoCenter.io Developer @EngrMitaliB #gocenter
  • 4. BY THE END OF THIS TALK YOU WILL KNOW ▪ About pseudo-versions ▪ Go 1.13 pseudo-version verification ▪ Fixing Incorrect pseudo-versions for Go Modules ▪ What is Go 1.14+ bringing for modules
  • 5. WHAT IS A GO MODULE? module github.com/containers/common go 1.12 require ( github.com/BurntSushi/toml v0.3.1 github.com/containers/image/v5 v5.4.3 github.com/containers/storage v1.19.1 github.com/opencontainers/runc v1.0.0-rc9 github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 // indirect github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 …. ) Release versions (Semantic Versions) • A module is a collection of Go packages stored in a file tree with a go.mod file at its root. The go.mod file defines the module’s module path, which is also the import path used for the root directory, and its dependency requirements, which are the other modules needed for a successful build. Each dependency requirement is written as a module path and a specific semantic version • •Go command uses Semantic version vX.Y.Z as the standard form to describe Module version X- MAJOR- Incompatible changes Y- Minor- Backward compatible functionality added Z - PATH- Backwards compatible bug fixes • •Normal releases are being preferred by Go •Module version is introduced by tagging a revision in source repo
  • 6. WHAT IS A GO MODULE? module github.com/containers/common go 1.12 require ( github.com/BurntSushi/toml v0.3.1 github.com/containers/image/v5 v5.4.3 github.com/containers/storage v1.19.1 github.com/opencontainers/runc v1.0.0-rc9 Pre-release version github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 // indirect github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 …. )
  • 7. WHAT IS A GO MODULE? module github.com/containers/common go 1.12 require ( github.com/BurntSushi/toml v0.3.1 github.com/containers/image/v5 v5.4.3 github.com/containers/storage v1.19.1 github.com/opencontainers/runc v1.0.0-rc9 github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 // indirect github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 Pseudo-versions …. )
  • 8. USING PSEUDO-VERSIONS ▪ Untagged revision ▪ Dependent project has not published any semantic version tags ▪ Develop against a commit which has not been tagged yet •The go command will accept the plain commit hash and translate it into a pseudo-version (or a tagged version if available) automatically. It also helps to compare the revisions based on generated timestamp. This is an example of gomodule query •There are pseudo-versions that are edited by hand or generated by third party tools •Through Go 1.12, Pseudo-version with arbitrary combination of version string and date, would resolve to the underlying revision (typically a Git commit hash) as long as that revision existed by Go
  • 9. DON’T UPDATE PSEUDO-VERSIONS MANUALLY ● The pseudo-version participates in minimal version selection. ● The commit date within the pseudo-version provides a total order among pseudo-versions. The pseudo-version participates in minimal version selection. If its version prefix is inaccurate, the pseudo-version may appear to have higher precedence that the releases that follow it, effectively “pinning” the module to that commit.
  • 10. BEFORE GO 1.13 AFTER GO 1.13 -> go version go version go1.13.5 darwin/amd64 -> go get golang.org/x/sys@v0.0.0-20190726091023-fde4d b37ae7a go: finding golang.org v0.0.0-20190726091023-fde4db37ae7a go: finding golang.org/x v0.0.0-20190726091023-fde4db37ae7a go: finding golang.org/x/sys v0.0.0-20190726091023-fde4db37ae7a go: finding golang.org/x/sys v0.0.0-20190726091023-fde4db37ae7a go get golang.org/x/sys@v0.0.0-20190726091023-fde4d b37ae7a: golang.org/x/sys@v0.0.0-20190726091023-fde4d b37ae7a: invalid pseudo-version: does not match version-control timestamp (2019-08-13T06:44:41Z) -> go version go version go1.12.14 darwin/amd64 -> go get golang.org/x/sys@v0.0.0-20190726091023-fde4d b37ae7a go: finding golang.org/x/sys v0.0.0-20190726091023-fde4db37ae7a go: downloading golang.org/x/sys v0.0.0-20190726091023-fde4db37ae7a go: extracting golang.org/x/sys v0.0.0-20190726091023-fde4db37ae7a go: finding golang.org/x/sys latest -> cat go.mod module demo/go12 go 1.12 require golang.org/x/sys v0.0.0-20190726091023-fde4db37ae7a // indirect
  • 11. GO 1.13 PSEUDO-VERSIONS VALIDATION module github.com/containers/common go 1.12 require ( github.com/BurntSushi/toml v0.3.1 github.com/containers/image/v5 v5.4.3 github.com/containers/storage v1.19.1 github.com/opencontainers/runc v1.0.0-rc9 github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 // indirect github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 ….. ) 1. 3.2. 1. The tag from which the pseudo-version derives points to the named revision or one of its ancestors as reported by the underlying VCS tool, or the pseudo-version is not derived from any tag i.e. has a "vX.0.0-" prefix before the date string and uses the lowest major version appropriate to the module path). 2. The date string within the pseudo-version matches the UTC timestamp of the revision as reported by the underlying VCS tool. 3. The short name of the revision within the pseudo-version is the same as the short name generated by Go command. Specifically, if the short name is a SHA-1 prefix, it must use the same number of hex digits (12)
  • 12. GO 1.13 PSEUDO-VERSIONS VALIDATION 4. '+incompatible' suffix 5. Checksum server validation 4. The pseudo-version includes a '+incompatible' suffix only if it is needed for the corresponding major version, and only if the underlying module does not have a go.mod file 5 . In each module's root, alongside go.mod, the go command maintains a file named go.sum containing the cryptographic checksums of the module's dependencies. As of Go1.13, with go get command it will validate module version against checksum server(which is a transparent log of all public module checksums)
  • 13. FIXING INCORRECT PSEUDO-VERSIONS ● Direct dependencies ● Transitive dependencies replace golang.org/x/sys v0.0.0-20190726091711-fde4db37ae7a => golang.org/x/sys fde4db37ae7a require { golang.org/x/sys fde4db37ae7a }
  • 14. HOW GoCenter AS GOPROXY CAN HELP ▪ GoCenter changes the metadata in the .info with the correct version when the module download was requested for incorrect pseudo-version.
  • 15. BEFORE GO 1.13 AFTER GO 1.13 -> export GOPROXY=https://gocenter.io/ -> go version go version go1.13.5 darwin/amd64 -> go get golang.org/x/sys@v0.0.0-20190726091023-fde4d b37ae7a go: finding golang.org/x v0.0.0-20190726091023-fde4db37ae7a go: finding golang.org/x/sys v0.0.0-20190726091023-fde4db37ae7a go: finding golang.org v0.0.0-20190726091023-fde4db37ae7a go get golang.org/x/sys@v0.0.0-20190726091023-fde4d b37ae7a: golang.org/x/sys@v0.0.0-20190726091023-fde4d b37ae7a: proxy returned info for version v0.0.0-20190813064441-fde4db37ae7a instead of requested version -> export GOPROXY=https://gocenter.io/ -> go version go version go1.12.14 darwin/amd64 -> go get golang.org/x/sys@v0.0.0-20190726091023-fde4d b37ae7a go: finding golang.org/x/sys v0.0.0-20190726091023-fde4db37ae7a go: finding golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 go: downloading golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 go: extracting golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 -> cat go.mod module proxydemo/go12 go 1.12 require golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // indirect
  • 16. HOW GoCenter AS GOPROXY CAN HELP ▪ For Go 1.13 change in Go Command will automatically update correct pseudo-version go get <module_name>@<commit_hash>
  • 17. WHAT IS IN GO 1.14+ FOR MODULES ? ● go get -modfile = /Documents/example1.mod ● go get -mod = readonly /path/to/module ● “go get” upgrade to an +incompatible major version automatically ● plain-text error messages from module proxies and other HTTP servers ● SVN