You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fly set-pipeline shows unneccessary diffs for large numbers #1952
The fly cli incorrectly renders diffs for large numbers when invoking fly set-pipeline, even though the numbers didn't change in the pipeline .yml definition.
I thought I'd share some of my notes on this while trying to debug through this. Note that this was tested against master. It seems like the threshold that changes the number to a float is now a uint64. For example:
jobs:
- name: Test Large Numbers
plan:
- task: Echo Large Number
config:
platform: linux
image_resource:
type: docker-image
source: { repository: alpine, tag: latest }
params:
LARGE_NUM: 18446744073709551616 # 2^64 + 1
run:
path: sh
args:
- -exc
- echo ${LARGE_NUM}
As the new config is being parsed in atc_config.h within resolveTemplates(), tpl.Evaluate() is called. (tpl is a Template from the bosh-cli project.) These lines in tpl.Evaluate() seem to make the LARGE_NUM to be treated like a float:
var obj interface{}
err := yaml.Unmarshal(t.bytes, &obj)
I could not reproduce this issue for numbers smaller than 2^64 as in the original example.
Activity
[-]Fly CLI diffs for large numbers[/-][+]fly set-pipeline shows unneccessary diffs for large numbers[/+]petergtz commentedon Jun 12, 2018
This is a duplicate of #1407.
edtan commentedon Jul 27, 2018
I thought I'd share some of my notes on this while trying to debug through this. Note that this was tested against
master. It seems like the threshold that changes the number to a float is now a uint64. For example:renders this diff:
As the new config is being parsed in atc_config.h within resolveTemplates(), tpl.Evaluate() is called. (tpl is a Template from the bosh-cli project.) These lines in tpl.Evaluate() seem to make the LARGE_NUM to be treated like a float:
I could not reproduce this issue for numbers smaller than 2^64 as in the original example.
bump etree tsa handlers mux clockwork goxmldsig genproto grpc
drahnr commentedon Jan 26, 2019
Still existing in current 4.2.2
marco-m commentedon Mar 19, 2019
As already mentioned, this is a duplicate of #1407 and should be closed.