profile
viewpoint
Daniel Morsing DanielMorsing London

DanielMorsing/suss 38

A property-based testing library

DanielMorsing/go 23

My sandbox for go experiments

DanielMorsing/rocksdb 19

levigo is a Go wrapper for LevelDB

DanielMorsing/gonzbee 16

Nzb downloader written in go

DanielMorsing/spdy 15

A simple spdy server I wrote.

DanielMorsing/stackcheck 10

A callgraph path checker.

DanielMorsing/ao 5

An acme tool for using the go oracle.

DanielMorsing/Brain 4

Arduino library for reading Neurosky EEG brainwave data. (Tested with the MindFlex and Force Trainer toys.)

DanielMorsing/acmescripts 2

Various small shell scripts to make working with acme easier

create barnchDanielMorsing/Brain

branch : daniel-mods

created branch time in 2 months

PR opened kitschpatrol/Brain

Fix warnings

The construction

a = b[++i] << 8 | c[++i];

has an undefined result. The compiler is free to reorder the pre-increment however it sees fit.

Fix by making the order explicit

Also remove unused variable that emitted a warning.

+8 -4

0 comment

1 changed file

pr created time in 2 months

create barnchDanielMorsing/Brain

branch : fix-warnings

created branch time in 2 months

fork DanielMorsing/Brain

Arduino library for reading Neurosky EEG brainwave data. (Tested with the MindFlex and Force Trainer toys.)

http://frontiernerds.com/brain-hack

fork in 2 months

created tagpusher/faros

tagv0.7.0

Faros is a CRD based GitOps controller

created time in 3 months

release pusher/faros

v0.7.0

released time in 3 months

push eventpusher/faros

Daniel Morsing

commit sha dd328a5dc3eb335321dd559517e9b3dbfc4d26db

add mention of clustergittracks

view details

Daniel Morsing

commit sha 1398a2c3f166307bd44dc3325d51ef3483d84aa9

change namespace restriction section

view details

Daniel Morsing

commit sha 0afa83a0cd2090b2d3061d3d4d9484248d7c0884

use clustergittrack for quickstart

view details

Daniel Morsing

commit sha 65849d918a3aad1e3a5470fa59399f132087575f

add docs folder

view details

Daniel Morsing

commit sha 06e307e4f2d47a5dc7a6fe2bef084ba1cdb6294d

rewrite readme to point to docs site and put info there

view details

Daniel Morsing

commit sha 21d2e12abe39f8fcd10cd3e4eff6a01c91d92da4

add migration guide

view details

Daniel Morsing

commit sha afab51e04531d73ad269d929c5e0234bf20f9e81

fix formatting

view details

Daniel Morsing

commit sha 361ee4ec7311b9c211ddb2c0dc34a538e4df438b

add namespace check tool and refer to it in migration plan

view details

Daniel Morsing

commit sha 90d77b6bd442e70bb88afc4c686bd79800391b6d

gofmt namespacechecker

view details

Daniel Morsing

commit sha 49f493ce97d34fd1104f77bbce927822d26cd410

move advanced concepts

view details

Daniel Morsing

commit sha eab32152f092b8daa37d81cf65f4da70056e1979

wrap migration plan

view details

Daniel Morsing

commit sha 0179582e932014b3de4508f41002f1576dbd57cc

make migration into a top level page

view details

Daniel Morsing

commit sha b3078b4fa005fc7c0a88b30f657ceb775e9e9544

change pronoun of group

view details

Daniel Morsing

commit sha e42ba954f4901473be52e4106093b037a2dbf5ac

use --all-namespaces

view details

Daniel Morsing

commit sha 5ed8927893122cf099f8f6f2789f3f1a33eebe78

change flags for namespacecheck

view details

Daniel Morsing

commit sha f4871937cc84be11f2af84b67be06c1942fc4702

fix escaping issue with markdown

view details

Daniel Morsing

commit sha 9fa84fdf2cf30d40cd0b7b5c1740df48a70ad4fa

change version

view details

Daniel Morsing

commit sha bae6906fdfae6d29ae20f43ede2f59a74130db01

spell out flags in config docs

view details

Daniel Morsing

commit sha 76b177f24a6f876e6ff2a5d7310cf61e66cc04e2

make it more obvious which flags is being referred to

view details

Daniel Morsing

commit sha 3ec6151510e4e1d742eb96e3dd86ab64cedb57af

make clustergittrack restrictions more obvious

view details

push time in 3 months

PR merged pusher/faros

Updatedocs size/XXL

This PR moves the documentation to read-the-docs based jekyll site and adds the migration plan for v0.7 changes

+1089 -385

1 comment

17 changed files

DanielMorsing

pr closed time in 3 months

push eventpusher/faros

Daniel Morsing

commit sha fb2d10a049d494c9cbf52b28cf9c1b99230e6119

disallow GTMEnabled with namespace and CGTM set to any kind of enabled Fixes #182

view details

Daniel Morsing

commit sha 5f46206411ab8baaf5675f15334245e632309b1f

disallow GTMDisabled with namespace

view details

Daniel Morsing

commit sha 9a2d84731c2bbb55e34259408bce966d65f7a6e1

Merge pull request #183 from pusher/disallowflags Disallow GTMEnabled with namespace and CGTM set to any kind of enabled

view details

Daniel Morsing

commit sha dd328a5dc3eb335321dd559517e9b3dbfc4d26db

add mention of clustergittracks

view details

Daniel Morsing

commit sha 1398a2c3f166307bd44dc3325d51ef3483d84aa9

change namespace restriction section

view details

Daniel Morsing

commit sha 0afa83a0cd2090b2d3061d3d4d9484248d7c0884

use clustergittrack for quickstart

view details

Daniel Morsing

commit sha 65849d918a3aad1e3a5470fa59399f132087575f

add docs folder

view details

Daniel Morsing

commit sha 06e307e4f2d47a5dc7a6fe2bef084ba1cdb6294d

rewrite readme to point to docs site and put info there

view details

Daniel Morsing

commit sha 21d2e12abe39f8fcd10cd3e4eff6a01c91d92da4

add migration guide

view details

Daniel Morsing

commit sha afab51e04531d73ad269d929c5e0234bf20f9e81

fix formatting

view details

Daniel Morsing

commit sha 361ee4ec7311b9c211ddb2c0dc34a538e4df438b

add namespace check tool and refer to it in migration plan

view details

Daniel Morsing

commit sha 90d77b6bd442e70bb88afc4c686bd79800391b6d

gofmt namespacechecker

view details

Daniel Morsing

commit sha 49f493ce97d34fd1104f77bbce927822d26cd410

move advanced concepts

view details

Daniel Morsing

commit sha eab32152f092b8daa37d81cf65f4da70056e1979

wrap migration plan

view details

Daniel Morsing

commit sha 0179582e932014b3de4508f41002f1576dbd57cc

make migration into a top level page

view details

Daniel Morsing

commit sha b3078b4fa005fc7c0a88b30f657ceb775e9e9544

change pronoun of group

view details

Daniel Morsing

commit sha e42ba954f4901473be52e4106093b037a2dbf5ac

use --all-namespaces

view details

Daniel Morsing

commit sha 5ed8927893122cf099f8f6f2789f3f1a33eebe78

change flags for namespacecheck

view details

Daniel Morsing

commit sha f4871937cc84be11f2af84b67be06c1942fc4702

fix escaping issue with markdown

view details

Daniel Morsing

commit sha 9fa84fdf2cf30d40cd0b7b5c1740df48a70ad4fa

change version

view details

push time in 3 months

push eventpusher/faros

Daniel Morsing

commit sha 2145078a55be132a15f94dcb47828e6cdaa60a13

fix naming nit

view details

Daniel Morsing

commit sha 2badaf08e7ca9b2a0c116451af5e11f94da4638b

add reference to migration docs in namespacechecker readme

view details

Daniel Morsing

commit sha a5b8d38120f97fbe7e7f835108c7b0bd081ceff8

expand regular gittrack section

view details

push time in 3 months

push eventpusher/faros

Daniel Morsing

commit sha f3ca452b800661dc1f1006f12cf807e0c72363d7

add mention of output from namespacecheck

view details

Daniel Morsing

commit sha f5585e4e487b22df57f46aadf5d6845c857624b2

refer to folder instead of file to point directly to documentation

view details

Daniel Morsing

commit sha 0cf7dba9860b63fdab0fc02890b1400b47c09a27

use go run for better user experience

view details

Daniel Morsing

commit sha 5836d345ebb546ae88129af74be698c6e5d368ea

add jq magic to explanation

view details

push time in 3 months

push eventpusher/faros

Daniel Morsing

commit sha f6bcd8c67a472c9583dba9461e647fbf0cb9fb05

add step for applying the crds

view details

Daniel Morsing

commit sha 5f1ee225c92f142811237089316beaf6d9628955

remove comment from namespacecheck, it is now in the readme

view details

push time in 3 months

push eventpusher/faros

Daniel Morsing

commit sha fc201cd65b76dd280dbe8470ebeaf87d791ad1e7

move namespacecheck docs into readme

view details

push time in 3 months

push eventpusher/faros

Daniel Morsing

commit sha 9fbbf309d40932397f6b86e37ac65893ad207f65

make clustergittrack restrictions more obvious

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha 8a219ba988e838943bd2758547732d31eb8cb83f

make it more obvious which flags is being referred to

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha 255ded98ce38a2bc3f44f168c00d21075614e2d2

fix escaping issue with markdown

view details

Daniel Morsing

commit sha 74538cf3fbcbb30754bb4ebfc1b465a3db24c185

change version

view details

Daniel Morsing

commit sha c228f5e98091d67aa2f82859d9881f512b1479a9

spell out flags in config docs

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha ede1c3ca74eed9cbe648313dcd39700af1615791

move advanced concepts

view details

Daniel Morsing

commit sha ed651f5fb2923df3485078f4473dc58e8afb91ae

wrap migration plan

view details

Daniel Morsing

commit sha 13b5e75cfbaf8cbb98d88b49ce99f9dd58b854d1

make migration into a top level page

view details

Daniel Morsing

commit sha 5c025bd0c7d50ca2e1d08d55b6dec2748485c252

change pronoun of group

view details

Daniel Morsing

commit sha b80952f3de04a86c6cf0a3ca2e1085e12f70b54d

use --all-namespaces

view details

Daniel Morsing

commit sha d2383682e132ce739196aa30276373a272123f78

change flags for namespacecheck

view details

push time in 4 months

Pull request review commentpusher/faros

Updatedocs

+/*+Copyright 2019 Pusher Ltd.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++    http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+*/++// namespacecheck checks whether a given Faros setup+// is valid within the ownership rules added in v0.7.+//+// To run the tool, grab 3 files off your kubernetes cluster+//+// # kubectl get gittracks -A -o json > gt.json+// # kubectl get gittrackobjects -A -o json > gto.json+// # kubectl get clustergittrackobjects -A -o json > cgto.json+//+// Then run+// ./namespacecheck gt.json gto.json cgto.json+//+// The tool will report back if you have any cross namespace ownership+// and write a file containing any new clustergittracks that will need to+// be created+package main++import (+	"encoding/json"+	"flag"+	"fmt"+	"io/ioutil"+	"os"++	faros "github.com/pusher/faros/pkg/apis/faros/v1alpha1"+)++func main() {+	flag.Parse()+	if flag.NArg() < 2 || flag.NArg() > 3 {+		fmt.Fprintf(os.Stderr, "wrong number of flags, expected 2 or 3; got %d\n", flag.NArg())+		usage()+	}+	gtfile, err := ioutil.ReadFile(flag.Arg(0))+	if err != nil {+		fmt.Fprintln(os.Stderr, err)+		usage()+	}+	gtofile, err := ioutil.ReadFile(flag.Arg(1))+	if err != nil {+		fmt.Fprintln(os.Stderr, err)+		usage()+	}+	var gtjson faros.GitTrackList+	err = json.Unmarshal(gtfile, &gtjson)+	if err != nil {+		panic(err)+	}++	var gtojson faros.GitTrackObjectList+	err = json.Unmarshal(gtofile, &gtojson)+	if err != nil {+		panic(err)+	}++	uidToNs := make(map[string]string)+	for _, i := range gtjson.Items {+		uidToNs[string(i.GetUID())] = i.GetNamespace()+	}++	var foundOne bool+	for _, i := range gtojson.Items {+		for _, owner := range i.GetOwnerReferences() {

It should give an empty ownerNs and never match on what came out of GetNamespace()

DanielMorsing

comment created time in 4 months

Pull request review commentpusher/faros

Updatedocs

+---+layout: default+title: Migration to v0.7+permalink: /migrate+parent: Advanced concepts+nav_order: 1+---++This document is only applicable if you are upgrading from a version before v0.6.1 to a later version. You can safely ignore this document if this is not the case for you.++## ClusterGitTrack migration plan+Kubernetes disallows having owner relationships that go from one namespace into another or from a namespaced object to a cluster-scoped one. Previously, Faros has been able to create these, and because of limitations in the Kubernetes garbage collector, it hasn’t been immediately obvious that this shouldn’t have worked.++This document sets out how to check whether you might be vulnerable to this issue and how to mitigate it when upgrading to Faros version 0.7.0++## Checking if you’re impacted++If you have any ClusterGitTrackObjects in your cluster, you are impacted. You can check this by running `kubectl get clustergittrackobjects`++If you don’t have any ClusterGitTrackObjects, you might still be impacted. Run the tool [here](https://github.com/pusher/faros/blob/master/hack/namespacecheck/namespacechecker.go) to check if you have any GitTrackObjects owned by GitTracks in a different namespace++If neither of these are applicable to your setup, you are not impacted. The only change required is to add the `--gittrack-mode=Enabled` flag to your Faros deployment when upgrading to version 0.7.0 or greater.++The rest of this document sets out how to migrate in the case that you are impacted.++## Migrating ClusterGitTrackObjects++If you have ClusterGitTrackObjects in your setup, then you will have to migrate those to being managed by ClusterGitTracks+++1. Scale down your Faros deployments so that there are no active Faros pods running+2. Remove all `ownerReferences` from ClusterGitTrackObjects+3. For every `GitTrack` which previously owned a `ClusterGitTrackObject`, create a `ClusterGitTrack` that matches its target.+4. Create a new deployment of Faros with the flags `--gittrack-mode=Disabled` and `--clustergittrack-mode=ExcludeNamespaced`+5. Check that ClusterGitTrackObjects are now owned by ClusterGitTracks

This was done manually when I did it on kari

DanielMorsing

comment created time in 4 months

Pull request review commentpusher/faros

Updatedocs

+---+layout: default+title: Migration to v0.7+permalink: /migrate+parent: Advanced concepts+nav_order: 1+---++This document is only applicable if you are upgrading from a version before v0.6.1 to a later version. You can safely ignore this document if this is not the case for you.++## ClusterGitTrack migration plan+Kubernetes disallows having owner relationships that go from one namespace into another or from a namespaced object to a cluster-scoped one. Previously, Faros has been able to create these, and because of limitations in the Kubernetes garbage collector, it hasn’t been immediately obvious that this shouldn’t have worked.++This document sets out how to check whether you might be vulnerable to this issue and how to mitigate it when upgrading to Faros version 0.7.0++## Checking if you’re impacted++If you have any ClusterGitTrackObjects in your cluster, you are impacted. You can check this by running `kubectl get clustergittrackobjects`++If you don’t have any ClusterGitTrackObjects, you might still be impacted. Run the tool [here](https://github.com/pusher/faros/blob/master/hack/namespacecheck/namespacechecker.go) to check if you have any GitTrackObjects owned by GitTracks in a different namespace++If neither of these are applicable to your setup, you are not impacted. The only change required is to add the `--gittrack-mode=Enabled` flag to your Faros deployment when upgrading to version 0.7.0 or greater.++The rest of this document sets out how to migrate in the case that you are impacted.++## Migrating ClusterGitTrackObjects++If you have ClusterGitTrackObjects in your setup, then you will have to migrate those to being managed by ClusterGitTracks+++1. Scale down your Faros deployments so that there are no active Faros pods running+2. Remove all `ownerReferences` from ClusterGitTrackObjects+3. For every `GitTrack` which previously owned a `ClusterGitTrackObject`, create a `ClusterGitTrack` that matches its target.

The tool should output a file that you can just apply and you should be good. I'll add some text about this here

DanielMorsing

comment created time in 4 months

Pull request review commentpusher/faros

Updatedocs

+---+layout: default+title: Migration to v0.7+permalink: /migrate+parent: Advanced concepts+nav_order: 1+---++This document is only applicable if you are upgrading from a version before v0.6.1 to a later version. You can safely ignore this document if this is not the case for you.++## ClusterGitTrack migration plan+Kubernetes disallows having owner relationships that go from one namespace into another or from a namespaced object to a cluster-scoped one. Previously, Faros has been able to create these, and because of limitations in the Kubernetes garbage collector, it hasn’t been immediately obvious that this shouldn’t have worked.++This document sets out how to check whether you might be vulnerable to this issue and how to mitigate it when upgrading to Faros version 0.7.0++## Checking if you’re impacted++If you have any ClusterGitTrackObjects in your cluster, you are impacted. You can check this by running `kubectl get clustergittrackobjects`++If you don’t have any ClusterGitTrackObjects, you might still be impacted. Run the tool [here](https://github.com/pusher/faros/blob/master/hack/namespacecheck/namespacechecker.go) to check if you have any GitTrackObjects owned by GitTracks in a different namespace++If neither of these are applicable to your setup, you are not impacted. The only change required is to add the `--gittrack-mode=Enabled` flag to your Faros deployment when upgrading to version 0.7.0 or greater.++The rest of this document sets out how to migrate in the case that you are impacted.++## Migrating ClusterGitTrackObjects++If you have ClusterGitTrackObjects in your setup, then you will have to migrate those to being managed by ClusterGitTracks+++1. Scale down your Faros deployments so that there are no active Faros pods running+2. Remove all `ownerReferences` from ClusterGitTrackObjects
kubectl get -a clustergittrackobjects -o json > /tmp/cgtos.json
jq '.items[].metadata.ownerReferences = null' /tmp/cgtos.json > /tmp/newcgtos.json
kubectl apply -f /tmp/newcgtos.json

It's a bit hacky. Still want it in the docs?

DanielMorsing

comment created time in 4 months

Pull request review commentpusher/faros

Updatedocs

+---+layout: default+title: Migration to v0.7+permalink: /migrate+parent: Advanced concepts+nav_order: 1+---++This document is only applicable if you are upgrading from a version before v0.6.1 to a later version. You can safely ignore this document if this is not the case for you.++## ClusterGitTrack migration plan+Kubernetes disallows having owner relationships that go from one namespace into another or from a namespaced object to a cluster-scoped one. Previously, Faros has been able to create these, and because of limitations in the Kubernetes garbage collector, it hasn’t been immediately obvious that this shouldn’t have worked.++This document sets out how to check whether you might be vulnerable to this issue and how to mitigate it when upgrading to Faros version 0.7.0++## Checking if you’re impacted++If you have any ClusterGitTrackObjects in your cluster, you are impacted. You can check this by running `kubectl get clustergittrackobjects`++If you don’t have any ClusterGitTrackObjects, you might still be impacted. Run the tool [here](https://github.com/pusher/faros/blob/master/hack/namespacecheck/namespacechecker.go) to check if you have any GitTrackObjects owned by GitTracks in a different namespace

The file includes a comment on how to run it

DanielMorsing

comment created time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha fb2d10a049d494c9cbf52b28cf9c1b99230e6119

disallow GTMEnabled with namespace and CGTM set to any kind of enabled Fixes #182

view details

Daniel Morsing

commit sha 5f46206411ab8baaf5675f15334245e632309b1f

disallow GTMDisabled with namespace

view details

Daniel Morsing

commit sha 9a2d84731c2bbb55e34259408bce966d65f7a6e1

Merge pull request #183 from pusher/disallowflags Disallow GTMEnabled with namespace and CGTM set to any kind of enabled

view details

push time in 4 months

PR merged pusher/faros

Disallow GTMEnabled with namespace and CGTM set to any kind of enabled size/XS

Fixes #182

+6 -2

0 comment

1 changed file

DanielMorsing

pr closed time in 4 months

issue closedpusher/faros

Disable namespaced flag when using ClusterGitTracks

I tried to use the controller with --gittrack-mode=Enabled, --clustergittrack-mode=ExcludeNamespaced and --namespace=kube-system, expecting the controller to be able to process ClusterGitTracks normally, however the informers were limited to the kube-system namespace and as such it exhibited weird behaviour.

I would like to propose that the --namespace flag be mutually exclusive from ClusterGitTracks being enabled.

CC @DanielMorsing

closed time in 4 months

JoelSpeed

push eventpusher/faros

Daniel Morsing

commit sha 82c51408f07590e4543b53dd077057fa17cbb2d9

gofmt namespacechecker

view details

push time in 4 months

pull request commentpusher/faros

Updatedocs

/retest

DanielMorsing

comment created time in 4 months

push eventpusher/faros

Steveis

commit sha 101bf0665f78b89b4022b069e664cdd0fe1aea34

Correct typo Replace s̨ with s Subtle I know :-)

view details

Joel Speed

commit sha 741f46b329a17d9f4e6c737794eb11e58cf5dac1

Merge pull request #181 from SteveAmor/patch-1 Correct typo

view details

Daniel Morsing

commit sha 77df51f9fe201259a407d2a952dbfd238ae58c26

add mention of clustergittracks

view details

Daniel Morsing

commit sha d9a5ea525e9eee6e72226f3edf9d8a0ff05a360f

change namespace restriction section

view details

Daniel Morsing

commit sha f2728b9789e5e943baba483a41d299a598167831

use clustergittrack for quickstart

view details

Daniel Morsing

commit sha 70524eb2fd3fddb1d1eaf221b277b682546d0a0a

add docs folder

view details

Daniel Morsing

commit sha cc4fbe44b7105bbe7be33c7cc4ae8516b92bb917

rewrite readme to point to docs site and put info there

view details

Daniel Morsing

commit sha 7940466bd14211404ffc858d75a81f34d7bcc642

add migration guide

view details

Daniel Morsing

commit sha f3356d1d7d5e5a911170f1cbcfc0bf41cd8e77a3

fix formatting

view details

Daniel Morsing

commit sha 1b63c8ed7a59449456f0cfe6a3cdb49680bab8b1

add namespace check tool and refer to it in migration plan

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha dace6f39bbbf6a9b2503286766edd578109910c2

add migration guide

view details

Daniel Morsing

commit sha 92b7c003103046ce942c8f721cb29cc648a05960

fix formatting

view details

Daniel Morsing

commit sha c79e8e4762720fb6351955acf54f4de301365f52

add namespace check tool and refer to it in migration plan

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha 8f7b0a91b6f526f2b58058c2b876686e54dab02b

rewrite readme to point to docs site and put info there

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha b4ecaa6c13dfee98752e56da5d89df2782460e8e

rewrite readme to point to docs site and put info there

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha 5f46206411ab8baaf5675f15334245e632309b1f

disallow GTMDisabled with namespace

view details

push time in 4 months

Pull request review commentpusher/faros

Disallow GTMEnabled with namespace and CGTM set to any kind of enabled

 func ValidateFlags() error { 		return fmt.Errorf("ValidateFlags called on unparsed flags") 	} -	if GitTrack == GTMEnabled && Namespace != "" && ClusterGitTrack == CGTMIncludeNamespaced {-		return fmt.Errorf("Cannot use gittrack-mode enabled with namespace %q and clustergittrack-mode set to IncludeNamespaced", Namespace)+	if GitTrack == GTMEnabled && Namespace != "" && ClusterGitTrack != CGTMDisabled {

I think we technically allow namespace and GTMDisabled to be set at the same time, although I'm unsure what the behavior of that would be

Should we disallow that as well?

DanielMorsing

comment created time in 4 months

PR opened pusher/faros

Disallow GTMEnabled with namespace and CGTM set to any kind of enabled

Fixes #182

+2 -2

0 comment

1 changed file

pr created time in 4 months

create barnchpusher/faros

branch : disallowflags

created branch time in 4 months

issue commentpusher/faros

Disable namespaced flag when using ClusterGitTracks

Specifically, this will mess up on the namespace of secrets, requiring ClusterGitTracks to all have the same namespace for their secrets as their namespace limiting.

This is an unusual mode of operation and explaining the counter-intuitive behavior would be hard, so I'm inclined to agree on the mutually exclusive nature of these flags

JoelSpeed

comment created time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha 9d9253f181c7e034cb3281ca524b652268994346

add docs folder

view details

push time in 4 months

PR opened pusher/faros

Updatedocs

PR for tracking docs updates

+22 -26

0 comment

1 changed file

pr created time in 4 months

create barnchpusher/faros

branch : updatedocs

created branch time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha 7ad1eeb39d44e4c06cfb0702b3c64f29a7adbc66

implement clustergittrackmode disabled in GTOs

view details

Daniel Morsing

commit sha cdbfe94243a68a10d943e2cf88619005b6689926

error out if invalid flag combination has been set

view details

Daniel Morsing

commit sha ee21f2f997d86279a654554daa1c3c83e82c8191

implement new behavior for {,cluster}gittrackobjects

view details

Daniel Morsing

commit sha 0d423c82268778caa74769a46ba18ae885f6ff91

add scaffolding for clustergittrackmode tests

view details

Daniel Morsing

commit sha 39c5716e89387e7a95fab18da5f8d936bc0b7309

add initial tests for disabled clustergittracks

view details

Daniel Morsing

commit sha e0a897d7da6c851b9dbabc2b46264c16cd0a19fc

add tests for CGTM exclude namespaced

view details

Daniel Morsing

commit sha eb0bd1e4b32e93ddbcaf64363975a3bf0a96bac8

actually create the objects

view details

Daniel Morsing

commit sha 1a78d2241471d6ced98f0fdc799519501af8f646

fix responsibility predicate

view details

Daniel Morsing

commit sha 8f9007ba03d474c9c01eaa889a75538a61593251

fix predicate on gittrackobjects The logic on clustergittrackobjects vs gittrackobject was broken.

view details

Daniel Morsing

commit sha b8d4204ffc4d28cf81e785a799426bb03a398fd0

disable invalid test

view details

Daniel Morsing

commit sha 7d66c77b59f36778dabe9a1eeaa927f6026e69c4

don't bother watching if we would never pass the predicates

view details

Daniel Morsing

commit sha 8c9f46c88b4bd5b596c68f22f0ae5ddc36dc000d

remove unused predicates, add comments for new ones

view details

Daniel Morsing

commit sha 7b564a8173e26ab7f0f0844bec43fec5806346fe

add tests for when GTMDisabled and CGTMIncludeNamespaced

view details

Daniel Morsing

commit sha 3a7bacc0ea3c783304d9aa729065139ddce2e27e

change predicate function names to match their use

view details

Daniel Morsing

commit sha cdf48df46fad34bc6d28b3a96f10aab9d3ed0c1f

Use positive logic for gittrackobject Watches This prevents a bug for when gittracks exist, but has no owners. This is an important step for when doing the migration plan

view details

Daniel Morsing

commit sha 988f46139e0b6de3a8cd8b61fae51f90efe93df8

add tests that makes sure gittrackobject owned by no one doesn't get reconciled

view details

Daniel Morsing

commit sha cdfc0f6d27a5e66346c043d522d375338a83698d

change name of certain tests that were copy-pasta mangled

view details

Daniel Morsing

commit sha 10f8b325c126c977606c8a8dc710d96d4797f2cf

remove invalid test

view details

Daniel Morsing

commit sha 2353c0f3679398755f6cd103de0b29256413ebc0

merge beforeeach functions

view details

Daniel Morsing

commit sha 3fd5d156bfed7677698f684d2598aaa321fcfa1b

rename validatesettings to validateflags

view details

push time in 4 months

PR merged pusher/faros

implement not reconciling gittrackobjects size/XXL

This makes it so that gittrackobjects and clustergittrackobjects that are not our responsibility according to the flags doesn't get reconciled by us

+739 -387

7 comments

10 changed files

DanielMorsing

pr closed time in 4 months

pull request commentpusher/faros

implement not reconciling gittrackobjects

/retest

DanielMorsing

comment created time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha b256393ea2f32c97f30418692eb50713f9126274

change flag parse check correct set FlagSet.AddFlagSet does not set the Parsed attribute on the added flagset when the containing one is parsed

view details

Daniel Morsing

commit sha cdf528044d178e85ca4afe041d2f9377d4248cb8

update comment wording to be more readable

view details

push time in 4 months

push eventpusher/testing

Daniel Morsing

commit sha 20aca6b4200070958de056d20d5713581731c56f

add DanielMorsing to rerun test config

view details

Daniel Morsing

commit sha 0e9058508466a79de5e5e7677c10ed855cd0b066

Merge pull request #75 from pusher/add-daniel add DanielMorsing to rerun test config

view details

push time in 4 months

PR merged pusher/testing

add DanielMorsing to rerun test config size/XS
+2 -0

0 comment

2 changed files

DanielMorsing

pr closed time in 4 months

push eventpusher/testing

Daniel Morsing

commit sha 20aca6b4200070958de056d20d5713581731c56f

add DanielMorsing to rerun test config

view details

push time in 4 months

push eventpusher/testing

Joel Speed

commit sha d9100874af180d9e95dd30de96996406d7a83957

Use Go Modules for installing Checkconfig

view details

Joel Speed

commit sha 2bd6c5d335b0d581d96dd89a472f567a94831268

Use a GOPROXY for downloading modules

view details

Joel Speed

commit sha 7c272ba776f44fc87e21bb303c1d9ae1bb1a0da4

Make a temporary directory for installing checkconfig

view details

Joel Speed

commit sha de76d6fc3a64c2acad8a16c7baa955b0ce277683

Merge pull request #76 from pusher/fix-checkconfig Use Go Modules for installing Checkconfig

view details

Joel Speed

commit sha 9ba509aaba84ba641a69a242fdd1b6c4a77dd393

Initialise promoter external plugin

view details

Joel Speed

commit sha 5917366a14793bc1f002680950dadf5e238a3ccc

Add parameters to configure source and target for promotion

view details

Joel Speed

commit sha a3e8711b0e200ee7a700ab44141140c98dc375c8

Add version output to promoter

view details

Joel Speed

commit sha 400ce7a426de19c5d5687d0710bdedd26a8679ce

Add Dockerfile for building image for promoter

view details

Joel Speed

commit sha d783b7e42cc740ef2af603a4d19688c04572cb4d

Set up test suite for promoter

view details

Joel Speed

commit sha f4ac8c4b8154d7e1f406507814d74e41a7fdb63c

Set up initial tests for promoter

view details

Joel Speed

commit sha ece4ef613fe31a1af577229daf0b1b279e7d2b61

Add test for creating promotion branch

view details

Joel Speed

commit sha 8d510df47c94d79001424e1f6a1f239644910119

Implement createPromotionBranch

view details

Joel Speed

commit sha 38f52692314cf140548cf57f0c9e4b5d49808c2b

Add waitgroup to ensure in-flight events are handled

view details

Joel Speed

commit sha 031f7e50530357313573155ac98a52a18e5ac31b

Add tests for creating a PR

view details

Joel Speed

commit sha 891227406985cd6b9f330e80923776e980a5b646

Implement creating promotion PRs

view details

Joel Speed

commit sha ce35c4c7eead74f61a506db657358581776ed0cd

Add presubmits/postsubmits for promoter

view details

Joel Speed

commit sha 177e26954ed16505359d2b336fe37c9b3e9153b7

Make config

view details

Joel Speed

commit sha 9489af90cc6d6494771e8eac0e94e3729b907b5a

Push to origin not fork

view details

Joel Speed

commit sha 8cacf48f664e08de213da3d34b58019fc2566a5a

Handle comment errors separately

view details

Joel Speed

commit sha 293635734b5623c4b12f86f2e28694903291c740

Remove unused email field

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha 87da4bc823f1a39f6cdf012c8e1c728d6b0615fa

update wrong comments

view details

push time in 4 months

push eventpusher/faros

Daniel Morsing

commit sha bf6da4427db6a8a3ea1b60dfe597ff86dead2dd1

add comment about CGTO shortcut

view details

push time in 4 months

pull request commentpusher/faros

implement not reconciling gittrackobjects

/retest

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha cdc01b0e62ea0fb66b7ab1d5863e360f642e30f5

reconfigure the predicates so they are easier to read

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha d89e3215e353c45857b846c73c985abf701110a0

reconfigure the predicates so they are easier to read

view details

push time in 5 months

pull request commentpusher/faros

implement not reconciling gittrackobjects

/retest

DanielMorsing

comment created time in 5 months

pull request commentpusher/faros

implement not reconciling gittrackobjects

/retest

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 3c6f1dc835d1b95d4c7c3d4c0e57e7e3337fd1fe

use create instead of update

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha c06a762183beb23aac62b5120ad014da25c9a5f3

fix copy-pasta typo

view details

Daniel Morsing

commit sha ab050d81d061c4acd92ef199df0962c961cb5db5

add comments for reconcileGitTrackOpts

view details

Daniel Morsing

commit sha 8100e70f0b27ade814aff76d65a4682ff50b4841

fix formatting nit

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha a463072ed20146ad84a15d98316667c17a3ff8c4

fix comment from renamed functions

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 3a7bacc0ea3c783304d9aa729065139ddce2e27e

change predicate function names to match their use

view details

Daniel Morsing

commit sha cdf48df46fad34bc6d28b3a96f10aab9d3ed0c1f

Use positive logic for gittrackobject Watches This prevents a bug for when gittracks exist, but has no owners. This is an important step for when doing the migration plan

view details

Daniel Morsing

commit sha 988f46139e0b6de3a8cd8b61fae51f90efe93df8

add tests that makes sure gittrackobject owned by no one doesn't get reconciled

view details

Daniel Morsing

commit sha cdfc0f6d27a5e66346c043d522d375338a83698d

change name of certain tests that were copy-pasta mangled

view details

Daniel Morsing

commit sha 10f8b325c126c977606c8a8dc710d96d4797f2cf

remove invalid test

view details

Daniel Morsing

commit sha 2353c0f3679398755f6cd103de0b29256413ebc0

merge beforeeach functions

view details

Daniel Morsing

commit sha 3fd5d156bfed7677698f684d2598aaa321fcfa1b

rename validatesettings to validateflags

view details

push time in 5 months

Pull request review commentpusher/faros

implement not reconciling gittrackobjects

 var _ = Describe("GitTrackObject Suite", func() { 		Context("with a ClusterGitTrackObject", func() { 			var gto *farosv1alpha1.ClusterGitTrackObject 			var child *rbacv1.ClusterRoleBinding+			var originalUID types.UID -			BeforeEach(func() {-				gto = testutils.ExampleClusterGitTrackObject.DeepCopy()-				gto.SetOwnerReferences([]metav1.OwnerReference{-					{-						APIVersion: "faros.pusher.com/v1alpha1",-						Kind:       "GitTrack",-						UID:        gitTrack.UID,-						Name:       gitTrack.Name,-					},+			Context("and ClusterGitTrackMode is set to Disabled", func() {+				BeforeEach(func() {+					SetupTest(farosflags.GTMEnabled, farosflags.CGTMDisabled)+				})+				BeforeEach(func() {+					gto = testutils.ExampleClusterGitTrackObject.DeepCopy()+					gto.SetOwnerReferences([]metav1.OwnerReference{+						{+							APIVersion: "faros.pusher.com/v1alpha1",+							Kind:       "ClusterGitTrack",+							UID:        clusterGitTrack.UID,+							Name:       clusterGitTrack.Name,+						},+					})+					child = testutils.ExampleClusterRoleBinding.DeepCopy()+					Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, child)).To(Succeed())+					m.Update(child).Should(Succeed())+					// get the most recent version so we can get the UID+					m.Get(child, timeout).Should(Succeed())+					originalUID = child.GetUID()++					// Create+					m.Create(gto).Should(Succeed())+				})++				It("should not get reconcile ClusterGitTrackObjects", func() {+					Consistently(requests, consistentlyTimeout).ShouldNot(Receive(Equal(expectedClusterRequest)))+				})+				It("should not update the child", func() {+					m.Consistently(child, consistentlyTimeout).ShouldNot(testutils.WithSubjects(BeEmpty()))+				})++				It("should not replace the child", func() {+					m.Consistently(child, consistentlyTimeout).Should(testutils.WithUID(Equal(originalUID))) 				})-				child = testutils.ExampleClusterRoleBinding.DeepCopy()-				Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, child)).To(Succeed()) 			}) -			Context("with valid data", func() {+			Context("and ClusterGitTrackMode is set to ExcludeNamespaced", func() {+				var gto *farosv1alpha1.GitTrackObject+				var namespacedChild *appsv1.Deployment+				var originalVersion string+ 				BeforeEach(func() {-					// Create and fetch the instance to make sure caches are synced+					SetupTest(farosflags.GTMEnabled, farosflags.CGTMExcludeNamespaced)+				})+				BeforeEach(func() {+					gto = testutils.ExampleGitTrackObject.DeepCopy()+					gto.SetOwnerReferences([]metav1.OwnerReference{+						{+							APIVersion: "faros.pusher.com/v1alpha1",+							Kind:       "ClusterGitTrack",+							UID:        clusterGitTrack.UID,+							Name:       clusterGitTrack.Name,+						},+					})+					namespacedChild = testutils.ExampleDeployment.DeepCopy()+					Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, namespacedChild)).To(Succeed())+					m.Create(namespacedChild).Should(Succeed())+					// get the most recent version so we can get the UID and version+					m.Get(namespacedChild, timeout).Should(Succeed())+					originalUID = namespacedChild.GetUID()+					originalVersion = namespacedChild.GetResourceVersion()++					// Create 					m.Create(gto).Should(Succeed())-					// Wait for the initial reconcile-					Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-					// And for the status one as well, probably-					Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-					// Fetch up-to-date objects if we're going to modify them-					m.Get(gto, timeout).Should(Succeed())-					m.Get(child, timeout).Should(Succeed()) 				}) -				It("should create the child resource", func() {-					m.Get(child, timeout).Should(Succeed())+				It("should not get reconcile namespaced GitTrackObjects owned by ClusterGitTracks", func() {+					Consistently(requests, consistentlyTimeout).ShouldNot(Receive(Equal(expectedRequest)))+				})+				It("should not update the child", func() {+					m.Consistently(namespacedChild, timeout).Should(testutils.WithResourceVersion(Equal(originalVersion))) 				}) -				It("should add an owner reference to the child", func() {-					m.Eventually(child, timeout).-						Should(testutils.WithOwnerReferences(ContainElement(testutils.GetClusterGitTrackObjectOwnerRef(gto))))+				It("should not replace the child", func() {+					m.Consistently(namespacedChild, consistentlyTimeout).Should(testutils.WithUID(Equal(originalUID))) 				})+			}) -				It("should add a last applied annotation to the child", func() {-					m.Eventually(child, timeout).-						Should(testutils.WithAnnotations(HaveKey(farosclient.LastAppliedAnnotation)))+			Context("and ClusterGitTrackMode set to IncludeNamespaced and GitTrackMode set to disabled", func() {+				var gto *farosv1alpha1.GitTrackObject+				var namespacedChild *appsv1.Deployment+				var originalVersion string++				BeforeEach(func() {+					SetupTest(farosflags.GTMDisabled, farosflags.CGTMIncludeNamespaced) 				})+				BeforeEach(func() {+					gto = testutils.ExampleGitTrackObject.DeepCopy()+					gto.SetOwnerReferences([]metav1.OwnerReference{+						{+							APIVersion: "faros.pusher.com/v1alpha1",+							Kind:       "ClusterGitTrack",+							UID:        clusterGitTrack.UID,+							Name:       clusterGitTrack.Name,+						},+					})+					namespacedChild = testutils.ExampleDeployment.DeepCopy()+					Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, namespacedChild)).To(Succeed())+					m.Create(namespacedChild).Should(Succeed())+					// get the most recent version so we can get the UID and version+					m.Get(namespacedChild, timeout).Should(Succeed())+					originalUID = namespacedChild.GetUID()+					originalVersion = namespacedChild.GetResourceVersion() -				Context("when the child has the update strategy", func() {-					var originalVersion string-					var originalUID types.UID+					// Create+					m.Create(gto).Should(Succeed())+				})++				It("should reconcile namespaced GitTrackObjects owned by ClusterGitTracks", func() {+					Eventually(requests, timeout).Should(Receive(Equal(expectedRequest)))+				})+				It("should update the child", func() {+					m.Eventually(namespacedChild, timeout).ShouldNot(testutils.WithResourceVersion(Equal(originalVersion)))+				})+			})++			Context("and ClusterGitTrackMode set to IncludeNamespaced", func() {+				BeforeEach(func() {+					SetupTest(farosflags.GTMEnabled, farosflags.CGTMIncludeNamespaced)+				}) +				BeforeEach(func() {+					gto = testutils.ExampleClusterGitTrackObject.DeepCopy()+					gto.SetOwnerReferences([]metav1.OwnerReference{+						{+							APIVersion: "faros.pusher.com/v1alpha1",+							Kind:       "ClusterGitTrack",+							UID:        clusterGitTrack.UID,+							Name:       clusterGitTrack.Name,+						},+					})+					child = testutils.ExampleClusterRoleBinding.DeepCopy()+					Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, child)).To(Succeed())+				})++				Context("with valid data", func() { 					BeforeEach(func() {-						child.SetAnnotations(map[string]string{"updated": "annotations"})-						child.SetOwnerReferences([]metav1.OwnerReference{testutils.GetClusterGitTrackObjectOwnerRef(gto)})-						m.Update(child).Should(Succeed())-						// Wait for the update reconcile+						// Create and fetch the instance to make sure caches are synced+						m.Create(gto).Should(Succeed())+						// Wait for the initial reconcile 						Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-						// And for the status update reconcile+						// And for the status one as well, probably 						Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-						// Get the latest version of the object+						// Fetch up-to-date objects if we're going to modify them+						m.Get(gto, timeout).Should(Succeed()) 						m.Get(child, timeout).Should(Succeed())+					}) -						originalVersion = child.GetResourceVersion()-						originalUID = child.GetUID()+					It("should create the child resource", func() {+						m.Get(child, timeout).Should(Succeed()) 					}) -					Context("update", func() {-						BeforeEach(func() {-							specData := testutils.ExampleClusterRoleBinding.DeepCopy()-							annotations := map[string]string{"faros.pusher.com/update-strategy": string(gittrackobjectutils.DefaultUpdateStrategy)}-							specData.SetAnnotations(annotations)-							Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, specData)).To(Succeed())+					It("should add an owner reference to the child", func() {+						m.Eventually(child, timeout).+							Should(testutils.WithOwnerReferences(ContainElement(testutils.GetClusterGitTrackObjectOwnerRef(gto))))+					}) -							m.Update(gto, timeout).Should(Succeed())+					It("should add a last applied annotation to the child", func() {+						m.Eventually(child, timeout).+							Should(testutils.WithAnnotations(HaveKey(farosclient.LastAppliedAnnotation)))+					})++					Context("when the child has the update strategy", func() {+						var originalVersion string+						var originalUID types.UID++						BeforeEach(func() {+							child.SetAnnotations(map[string]string{"updated": "annotations"})+							child.SetOwnerReferences([]metav1.OwnerReference{testutils.GetClusterGitTrackObjectOwnerRef(gto)})+							m.Update(child).Should(Succeed())+							// Wait for the update reconcile 							Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-						})+							// And for the status update reconcile+							Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+							// Get the latest version of the object+							m.Get(child, timeout).Should(Succeed()) -						It("should update the child", func() {-							m.Eventually(child, timeout).Should(testutils.WithResourceVersion(Not(Equal(originalVersion))))+							originalVersion = child.GetResourceVersion()+							originalUID = child.GetUID() 						}) -						It("should not replace the child", func() {-							m.Consistently(child, consistentlyTimeout).Should(testutils.WithUID(Equal(originalUID)))-						})-					})+						Context("update", func() {+							BeforeEach(func() {+								specData := testutils.ExampleClusterRoleBinding.DeepCopy()+								annotations := map[string]string{"faros.pusher.com/update-strategy": string(gittrackobjectutils.DefaultUpdateStrategy)}+								specData.SetAnnotations(annotations)+								Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, specData)).To(Succeed()) -					Context("never", func() {-						BeforeEach(func() {-							specData := testutils.ExampleClusterRoleBinding.DeepCopy()-							annotations := map[string]string{"faros.pusher.com/update-strategy": string(gittrackobjectutils.NeverUpdateStrategy)}-							specData.Subjects = []rbacv1.Subject{}-							specData.SetAnnotations(annotations)-							Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, specData)).To(Succeed())+								m.Update(gto, timeout).Should(Succeed())+								Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+							}) -							m.Update(gto, timeout).Should(Succeed())-							Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+							It("should update the child", func() {+								m.Eventually(child, timeout).Should(testutils.WithResourceVersion(Not(Equal(originalVersion))))+							})++							It("should not replace the child", func() {+								m.Consistently(child, consistentlyTimeout).Should(testutils.WithUID(Equal(originalUID)))+							}) 						}) -						It("should not update the child", func() {-							m.Consistently(child, consistentlyTimeout).ShouldNot(testutils.WithSubjects(BeEmpty()))+						Context("never", func() {+							BeforeEach(func() {+								specData := testutils.ExampleClusterRoleBinding.DeepCopy()+								annotations := map[string]string{"faros.pusher.com/update-strategy": string(gittrackobjectutils.NeverUpdateStrategy)}+								specData.Subjects = []rbacv1.Subject{}+								specData.SetAnnotations(annotations)+								Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, specData)).To(Succeed())++								m.Update(gto, timeout).Should(Succeed())+								Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+							})++							It("should not update the child", func() {+								m.Consistently(child, consistentlyTimeout).ShouldNot(testutils.WithSubjects(BeEmpty()))+							})++							It("should not replace the child", func() {+								m.Consistently(child, consistentlyTimeout).Should(testutils.WithUID(Equal(originalUID)))+							}) 						}) -						It("should not replace the child", func() {-							m.Consistently(child, consistentlyTimeout).Should(testutils.WithUID(Equal(originalUID)))+						Context("recreate", func() {+							Context("with conflicts", func() {+								var childCopy *rbacv1.ClusterRoleBinding++								BeforeEach(func() {+									m.Get(gto, timeout).Should(Succeed())+									specData := testutils.ExampleClusterRoleBinding.DeepCopy()+									// Create a conflict (this field is immutable)+									specData.RoleRef.Name = "changed"+									annotations := map[string]string{"faros.pusher.com/update-strategy": string(gittrackobjectutils.RecreateUpdateStrategy)}+									specData.SetAnnotations(annotations)+									Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, specData)).To(Succeed())+									m.Update(gto, timeout).Should(Succeed())++									// Keep a copy of the child, otherwise we'll run into data race issues+									childCopy = child.DeepCopy()++									go func() {+										defer GinkgoRecover()+										// We are expecting a delete but we have no GC so have to do it manually+										m.Eventually(childCopy, timeout).Should(testutils.WithFinalizers(ContainElement("foregroundDeletion")))+										childCopy.SetFinalizers([]string{})+										m.Update(childCopy).Should(Succeed())+										m.Get(childCopy, timeout).ShouldNot(Succeed())+									}()++									Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+								})++								It("should replace the child", func() {+									Eventually(func() error {+										m.Get(child, timeout).Should(Succeed())+										if child.GetUID() == originalUID {+											return fmt.Errorf("still the same object")+										}+										return nil+									}, timeout).Should(Succeed())+								})+							}) 						}) 					}) -					Context("recreate", func() {-						Context("with conflicts", func() {-							var childCopy *rbacv1.ClusterRoleBinding+					Context("when the ClusterGitTrackObject is updated", func() {+						BeforeEach(func() {+							// Make sure the first reconcile has happened+							m.Get(child, timeout).Should(Succeed())+							// Need to get the updated GTO as well+							m.Get(gto, timeout).Should(Succeed())+						}) +						Context("and the child spec is updated", func() { 							BeforeEach(func() {-								m.Get(gto, timeout).Should(Succeed())+								// Make an update to the spec 								specData := testutils.ExampleClusterRoleBinding.DeepCopy()-								// Create a conflict (this field is immutable)-								specData.RoleRef.Name = "changed"-								annotations := map[string]string{"faros.pusher.com/update-strategy": string(gittrackobjectutils.RecreateUpdateStrategy)}+								annotations := map[string]string{"updated": "annotations"} 								specData.SetAnnotations(annotations) 								Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, specData)).To(Succeed())+ 								m.Update(gto, timeout).Should(Succeed())+								Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+							}) -								// Keep a copy of the child, otherwise we'll run into data race issues-								childCopy = child.DeepCopy()+							It("should update the child resource", func() {+								m.Eventually(child, timeout).Should(testutils.WithAnnotations(HaveKeyWithValue("updated", "annotations")))+							})+						}) -								go func() {-									defer GinkgoRecover()-									// We are expecting a delete but we have no GC so have to do it manually-									m.Eventually(childCopy, timeout).Should(testutils.WithFinalizers(ContainElement("foregroundDeletion")))-									childCopy.SetFinalizers([]string{})-									m.Update(childCopy).Should(Succeed())-									m.Get(childCopy, timeout).ShouldNot(Succeed())-								}()+						Context("and the object metdata is updated", func() {+							var originalVersion string +							BeforeEach(func() {+								originalVersion = child.GetResourceVersion()++								// Make an update to the GTO metadata+								annotations := map[string]string{"updated": "annotations"}+								gto.SetAnnotations(annotations)++								m.Update(gto).Should(Succeed()) 								Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest))) 							}) -							It("should replace the child", func() {-								Eventually(func() error {-									m.Get(child, timeout).Should(Succeed())-									if child.GetUID() == originalUID {-										return fmt.Errorf("still the same object")-									}-									return nil-								}, timeout).Should(Succeed())+							It("should not update the child resource", func() {+								m.Consistently(child, consistentlyTimeout).Should(testutils.WithResourceVersion(Equal(originalVersion))) 							}) 						}) 					})-				}) -				Context("when the ClusterGitTrackObject is updated", func() {-					BeforeEach(func() {-						// Make sure the first reconcile has happened-						m.Get(child, timeout).Should(Succeed())-						// Need to get the updated GTO as well-						m.Get(gto, timeout).Should(Succeed())-					})+					Context("if a child resource is deleted", func() {+						var originalUID types.UID -					Context("and the child spec is updated", func() { 						BeforeEach(func() {-							// Make an update to the spec-							specData := testutils.ExampleClusterRoleBinding.DeepCopy()-							annotations := map[string]string{"updated": "annotations"}-							specData.SetAnnotations(annotations)-							Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, specData)).To(Succeed())--							m.Update(gto, timeout).Should(Succeed())+							originalUID = child.GetUID()+							m.Delete(child).Should(Succeed()) 							Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest))) 						}) -						It("should update the child resource", func() {-							m.Eventually(child, timeout).Should(testutils.WithAnnotations(HaveKeyWithValue("updated", "annotations")))+						It("should be recreated", func() {+							Eventually(func() error {+								key := types.NamespacedName{Namespace: child.GetNamespace(), Name: child.GetName()}+								err := c.Get(context.TODO(), key, child)+								if err != nil {+									return err+								}+								if child.GetUID() == originalUID {+									return fmt.Errorf("child not yet recreated")+								}+								return nil+							}, timeout).Should(Succeed()) 						}) 					}) -					Context("and the object metdata is updated", func() {-						var originalVersion string+					Context("should send events", func() {+						var events *corev1.EventList  						BeforeEach(func() {-							originalVersion = child.GetResourceVersion()--							// Make an update to the GTO metadata-							annotations := map[string]string{"updated": "annotations"}-							gto.SetAnnotations(annotations)--							m.Update(gto).Should(Succeed())-							Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+							events = &corev1.EventList{}+							m.Eventually(events, timeout).ShouldNot(testutils.WithItems(BeEmpty())) 						}) -						It("should not update the child resource", func() {-							m.Consistently(child, consistentlyTimeout).Should(testutils.WithResourceVersion(Equal(originalVersion)))+						It("for attempting to create the child", func() {+							m.Eventually(events, timeout).Should(testutils.WithItems(ContainElement(+								SatisfyAll(+									testutils.WithReason(Equal("CreateStarted")),+									testutils.WithInvolvedObjectKind(Equal(gto.GetObjectKind().GroupVersionKind().Kind)),+									testutils.WithInvolvedObjectName(Equal(gto.GetName())),+									testutils.WithEventType(Equal(string(corev1.EventTypeNormal))),+								),+							))) 						})-					})-				})--				Context("if a child resource is deleted", func() {-					var originalUID types.UID -					BeforeEach(func() {-						originalUID = child.GetUID()-						m.Delete(child).Should(Succeed())-						Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-					})+						It("for successfully to creating the child", func() {+							m.Eventually(events, timeout).Should(testutils.WithItems(ContainElement(+								SatisfyAll(+									testutils.WithReason(Equal("CreateSuccessful")),+									testutils.WithInvolvedObjectKind(Equal(gto.GetObjectKind().GroupVersionKind().Kind)),+									testutils.WithInvolvedObjectName(Equal(gto.GetName())),+									testutils.WithEventType(Equal(string(corev1.EventTypeNormal))),+								),+							)))+						}) -					It("should be recreated", func() {-						Eventually(func() error {-							key := types.NamespacedName{Namespace: child.GetNamespace(), Name: child.GetName()}-							err := c.Get(context.TODO(), key, child)-							if err != nil {-								return err+						PIt("to the namespace the controller is restricted to", func() {+							for range events.Items {+								event := <-testEvents+								Expect(event.Namespace).To(Equal(farosflags.Namespace)) 							}-							if child.GetUID() == originalUID {-								return fmt.Errorf("child not yet recreated")-							}-							return nil-						}, timeout).Should(Succeed())+						}) 					}) 				}) -				Context("should send events", func() {-					var events *corev1.EventList-+				Context("with invalid data", func() { 					BeforeEach(func() {-						events = &corev1.EventList{}-						m.Eventually(events, timeout).ShouldNot(testutils.WithItems(BeEmpty()))-					})+						// Break the JSON data+						gto.Spec.Data = gto.Spec.Data[10:] -					It("for attempting to create the child", func() {-						m.Eventually(events, timeout).Should(testutils.WithItems(ContainElement(-							SatisfyAll(-								testutils.WithReason(Equal("CreateStarted")),-								testutils.WithInvolvedObjectKind(Equal(gto.GetObjectKind().GroupVersionKind().Kind)),-								testutils.WithInvolvedObjectName(Equal(gto.GetName())),-								testutils.WithEventType(Equal(string(corev1.EventTypeNormal))),-							),-						)))-					})--					It("for successfully to creating the child", func() {-						m.Eventually(events, timeout).Should(testutils.WithItems(ContainElement(-							SatisfyAll(-								testutils.WithReason(Equal("CreateSuccessful")),-								testutils.WithInvolvedObjectKind(Equal(gto.GetObjectKind().GroupVersionKind().Kind)),-								testutils.WithInvolvedObjectName(Equal(gto.GetName())),-								testutils.WithEventType(Equal(string(corev1.EventTypeNormal))),-							),-						)))+						// Create and fetch the instance to make sure caches are synced+						m.Create(gto).Should(Succeed())+						// Wait twice for the extra reconcile for status updates+						Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+						Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))+						m.Get(gto, timeout).Should(Succeed()) 					}) -					PIt("to the namespace the controller is restricted to", func() {-						for range events.Items {-							event := <-testEvents-							Expect(event.Namespace).To(Equal(farosflags.Namespace))-						}+					Context("should update the status", func() {+						It("to represent the failure", func() {+							m.Eventually(gto, timeout).Should(+								testutils.WithGitTrackObjectStatusConditions(+									ContainElement(+										SatisfyAll(+											testutils.WithGitTrackObjectConditionType(Equal(farosv1alpha1.ObjectInSyncType)),+											testutils.WithGitTrackObjectConditionStatus(Equal(corev1.ConditionFalse)),+											testutils.WithGitTrackObjectConditionReason(Equal(string(gittrackobjectutils.ErrorUnmarshallingData))),+										),+									),+								),+							)+						}) 					})-				})-			})--			Context("with invalid data", func() {-				BeforeEach(func() {-					// Break the JSON data-					gto.Spec.Data = gto.Spec.Data[10:] -					// Create and fetch the instance to make sure caches are synced-					m.Create(gto).Should(Succeed())-					// Wait twice for the extra reconcile for status updates-					Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-					Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-					m.Get(gto, timeout).Should(Succeed())-				})+					Context("should send an event", func() {+						var events *corev1.EventList+						BeforeEach(func() {+							events = &corev1.EventList{}+							m.Eventually(events, timeout).ShouldNot(testutils.WithItems(BeEmpty()))+						}) -				Context("should update the status", func() {-					It("to represent the failure", func() {-						m.Eventually(gto, timeout).Should(-							testutils.WithGitTrackObjectStatusConditions(-								ContainElement(-									SatisfyAll(-										testutils.WithGitTrackObjectConditionType(Equal(farosv1alpha1.ObjectInSyncType)),-										testutils.WithGitTrackObjectConditionStatus(Equal(corev1.ConditionFalse)),-										testutils.WithGitTrackObjectConditionReason(Equal(string(gittrackobjectutils.ErrorUnmarshallingData))),-									),+						It("to represent the failure", func() {+							m.Eventually(events, timeout).Should(testutils.WithItems(ContainElement(+								SatisfyAll(+									testutils.WithReason(Equal("UnmarshalFailed")),+									testutils.WithInvolvedObjectKind(Equal(gto.GetObjectKind().GroupVersionKind().Kind)),+									testutils.WithInvolvedObjectName(Equal(gto.GetName())),+									testutils.WithEventType(Equal(string(corev1.EventTypeWarning))), 								),-							),-						)+							)))+						}) 					}) 				}) -				Context("should send an event", func() {-					var events *corev1.EventList+				// don't run these tests, since the cross-namespace ownership reference is

I've added a test for the latter. I kept the test around because while they don't "work", they can be used to figure out what exactly we do when we get invalid k8s data, but I'm gonna remove them anyway

DanielMorsing

comment created time in 5 months

Pull request review commentpusher/faros

implement not reconciling gittrackobjects

 var _ = Describe("GitTrackObject Suite", func() { 		Context("with a ClusterGitTrackObject", func() { 			var gto *farosv1alpha1.ClusterGitTrackObject 			var child *rbacv1.ClusterRoleBinding+			var originalUID types.UID -			BeforeEach(func() {-				gto = testutils.ExampleClusterGitTrackObject.DeepCopy()-				gto.SetOwnerReferences([]metav1.OwnerReference{-					{-						APIVersion: "faros.pusher.com/v1alpha1",-						Kind:       "GitTrack",-						UID:        gitTrack.UID,-						Name:       gitTrack.Name,-					},+			Context("and ClusterGitTrackMode is set to Disabled", func() {+				BeforeEach(func() {+					SetupTest(farosflags.GTMEnabled, farosflags.CGTMDisabled)+				})+				BeforeEach(func() {+					gto = testutils.ExampleClusterGitTrackObject.DeepCopy()+					gto.SetOwnerReferences([]metav1.OwnerReference{+						{+							APIVersion: "faros.pusher.com/v1alpha1",+							Kind:       "ClusterGitTrack",+							UID:        clusterGitTrack.UID,+							Name:       clusterGitTrack.Name,+						},+					})+					child = testutils.ExampleClusterRoleBinding.DeepCopy()+					Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, child)).To(Succeed())+					m.Update(child).Should(Succeed())+					// get the most recent version so we can get the UID+					m.Get(child, timeout).Should(Succeed())+					originalUID = child.GetUID()++					// Create+					m.Create(gto).Should(Succeed())+				})++				It("should not get reconcile ClusterGitTrackObjects", func() {+					Consistently(requests, consistentlyTimeout).ShouldNot(Receive(Equal(expectedClusterRequest)))+				})+				It("should not update the child", func() {+					m.Consistently(child, consistentlyTimeout).ShouldNot(testutils.WithSubjects(BeEmpty()))+				})++				It("should not replace the child", func() {+					m.Consistently(child, consistentlyTimeout).Should(testutils.WithUID(Equal(originalUID))) 				})-				child = testutils.ExampleClusterRoleBinding.DeepCopy()-				Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, child)).To(Succeed()) 			}) -			Context("with valid data", func() {+			Context("and ClusterGitTrackMode is set to ExcludeNamespaced", func() {+				var gto *farosv1alpha1.GitTrackObject+				var namespacedChild *appsv1.Deployment+				var originalVersion string+ 				BeforeEach(func() {-					// Create and fetch the instance to make sure caches are synced+					SetupTest(farosflags.GTMEnabled, farosflags.CGTMExcludeNamespaced)+				})+				BeforeEach(func() {+					gto = testutils.ExampleGitTrackObject.DeepCopy()+					gto.SetOwnerReferences([]metav1.OwnerReference{+						{+							APIVersion: "faros.pusher.com/v1alpha1",+							Kind:       "ClusterGitTrack",+							UID:        clusterGitTrack.UID,+							Name:       clusterGitTrack.Name,+						},+					})+					namespacedChild = testutils.ExampleDeployment.DeepCopy()+					Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, namespacedChild)).To(Succeed())+					m.Create(namespacedChild).Should(Succeed())+					// get the most recent version so we can get the UID and version+					m.Get(namespacedChild, timeout).Should(Succeed())+					originalUID = namespacedChild.GetUID()+					originalVersion = namespacedChild.GetResourceVersion()++					// Create 					m.Create(gto).Should(Succeed())-					// Wait for the initial reconcile-					Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-					// And for the status one as well, probably-					Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-					// Fetch up-to-date objects if we're going to modify them-					m.Get(gto, timeout).Should(Succeed())-					m.Get(child, timeout).Should(Succeed()) 				}) -				It("should create the child resource", func() {-					m.Get(child, timeout).Should(Succeed())+				It("should not get reconcile namespaced GitTrackObjects owned by ClusterGitTracks", func() {+					Consistently(requests, consistentlyTimeout).ShouldNot(Receive(Equal(expectedRequest)))+				})+				It("should not update the child", func() {+					m.Consistently(namespacedChild, timeout).Should(testutils.WithResourceVersion(Equal(originalVersion))) 				}) -				It("should add an owner reference to the child", func() {-					m.Eventually(child, timeout).-						Should(testutils.WithOwnerReferences(ContainElement(testutils.GetClusterGitTrackObjectOwnerRef(gto))))+				It("should not replace the child", func() {+					m.Consistently(namespacedChild, consistentlyTimeout).Should(testutils.WithUID(Equal(originalUID))) 				})+			}) -				It("should add a last applied annotation to the child", func() {-					m.Eventually(child, timeout).-						Should(testutils.WithAnnotations(HaveKey(farosclient.LastAppliedAnnotation)))+			Context("and ClusterGitTrackMode set to IncludeNamespaced and GitTrackMode set to disabled", func() {+				var gto *farosv1alpha1.GitTrackObject+				var namespacedChild *appsv1.Deployment+				var originalVersion string++				BeforeEach(func() {+					SetupTest(farosflags.GTMDisabled, farosflags.CGTMIncludeNamespaced) 				})+				BeforeEach(func() {+					gto = testutils.ExampleGitTrackObject.DeepCopy()+					gto.SetOwnerReferences([]metav1.OwnerReference{+						{+							APIVersion: "faros.pusher.com/v1alpha1",+							Kind:       "ClusterGitTrack",+							UID:        clusterGitTrack.UID,+							Name:       clusterGitTrack.Name,+						},+					})+					namespacedChild = testutils.ExampleDeployment.DeepCopy()+					Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, namespacedChild)).To(Succeed())+					m.Create(namespacedChild).Should(Succeed())+					// get the most recent version so we can get the UID and version+					m.Get(namespacedChild, timeout).Should(Succeed())+					originalUID = namespacedChild.GetUID()+					originalVersion = namespacedChild.GetResourceVersion() -				Context("when the child has the update strategy", func() {-					var originalVersion string-					var originalUID types.UID+					// Create+					m.Create(gto).Should(Succeed())+				})++				It("should reconcile namespaced GitTrackObjects owned by ClusterGitTracks", func() {+					Eventually(requests, timeout).Should(Receive(Equal(expectedRequest)))+				})+				It("should update the child", func() {+					m.Eventually(namespacedChild, timeout).ShouldNot(testutils.WithResourceVersion(Equal(originalVersion)))+				})+			})++			Context("and ClusterGitTrackMode set to IncludeNamespaced", func() {+				BeforeEach(func() {+					SetupTest(farosflags.GTMEnabled, farosflags.CGTMIncludeNamespaced)+				}) +				BeforeEach(func() {+					gto = testutils.ExampleClusterGitTrackObject.DeepCopy()+					gto.SetOwnerReferences([]metav1.OwnerReference{+						{+							APIVersion: "faros.pusher.com/v1alpha1",+							Kind:       "ClusterGitTrack",+							UID:        clusterGitTrack.UID,+							Name:       clusterGitTrack.Name,+						},+					})+					child = testutils.ExampleClusterRoleBinding.DeepCopy()+					Expect(testutils.SetGitTrackObjectInterfaceSpec(gto, child)).To(Succeed())+				})++				Context("with valid data", func() { 					BeforeEach(func() {-						child.SetAnnotations(map[string]string{"updated": "annotations"})-						child.SetOwnerReferences([]metav1.OwnerReference{testutils.GetClusterGitTrackObjectOwnerRef(gto)})-						m.Update(child).Should(Succeed())-						// Wait for the update reconcile+						// Create and fetch the instance to make sure caches are synced+						m.Create(gto).Should(Succeed())+						// Wait for the initial reconcile 						Eventually(requests, timeout).Should(Receive(Equal(expectedClusterRequest)))-						// And for the status update reconcile+						// And for the status one as well, probably

I am confused. I did not add this comment and I suspect that this is from the diff algorithm

DanielMorsing

comment created time in 5 months

PR opened pusher/faros

implement not reconciling gittrackobjects

This makes it so that gittrackobjects and clustergittrackobjects that are not our responsibility according to the flags doesn't get reconciled by us

+620 -380

0 comment

9 changed files

pr created time in 5 months

create barnchpusher/faros

branch : handleGittracks-flag

created branch time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 52640ba2fc614122b61c9ee0042f81cc581d50c6

Merge pull request #176 from pusher/handleGittracks-flag Handle gittracks flag

view details

Daniel Morsing

commit sha 7ad1eeb39d44e4c06cfb0702b3c64f29a7adbc66

implement clustergittrackmode disabled in GTOs

view details

Daniel Morsing

commit sha cdbfe94243a68a10d943e2cf88619005b6689926

error out if invalid flag combination has been set

view details

Daniel Morsing

commit sha ee21f2f997d86279a654554daa1c3c83e82c8191

implement new behavior for {,cluster}gittrackobjects

view details

Daniel Morsing

commit sha 0d423c82268778caa74769a46ba18ae885f6ff91

add scaffolding for clustergittrackmode tests

view details

Daniel Morsing

commit sha 39c5716e89387e7a95fab18da5f8d936bc0b7309

add initial tests for disabled clustergittracks

view details

Daniel Morsing

commit sha e0a897d7da6c851b9dbabc2b46264c16cd0a19fc

add tests for CGTM exclude namespaced

view details

Daniel Morsing

commit sha eb0bd1e4b32e93ddbcaf64363975a3bf0a96bac8

actually create the objects

view details

Daniel Morsing

commit sha 1a78d2241471d6ced98f0fdc799519501af8f646

fix responsibility predicate

view details

Daniel Morsing

commit sha 8f9007ba03d474c9c01eaa889a75538a61593251

fix predicate on gittrackobjects The logic on clustergittrackobjects vs gittrackobject was broken.

view details

Daniel Morsing

commit sha b8d4204ffc4d28cf81e785a799426bb03a398fd0

disable invalid test

view details

Daniel Morsing

commit sha 7d66c77b59f36778dabe9a1eeaa927f6026e69c4

don't bother watching if we would never pass the predicates

view details

Daniel Morsing

commit sha 8c9f46c88b4bd5b596c68f22f0ae5ddc36dc000d

remove unused predicates, add comments for new ones

view details

Daniel Morsing

commit sha 7b564a8173e26ab7f0f0844bec43fec5806346fe

add tests for when GTMDisabled and CGTMIncludeNamespaced

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 09e1b5f797f8e0d4e9d2106f45186ce5590ad894

add flag for handling (regular) gittracks

view details

Daniel Morsing

commit sha 94f4bcac820a7db4fec74efe9903607d8a2148bd

Make running the reconciler on a disabled type a panic Also remove a test that checked on running disabled CGT, since it is now a panic

view details

Daniel Morsing

commit sha 47c8e4ab2c9e4ea0188443b288216da6a4a3b4e9

Add empty tests to GitTrack test suite for handling watcher events

view details

Daniel Morsing

commit sha c1632bf5d5f0034de80f8116c3f0f8b9573802e7

implement rest of tests for watches on ClusterGitTracks

view details

Daniel Morsing

commit sha 35ae026d493fda0075293d271dbe121032598c94

add tests for gittrack handling disabled/enabled

view details

Daniel Morsing

commit sha efaa9448e69a2376fdda7b0ace1637b5ba0d7ff9

fix comment in test

view details

Daniel Morsing

commit sha 52640ba2fc614122b61c9ee0042f81cc581d50c6

Merge pull request #176 from pusher/handleGittracks-flag Handle gittracks flag

view details

push time in 5 months

PR merged pusher/faros

Handle gittracks flag size/XL

Due to thumbs for fingers, I managed to close the last PR by merging it into another branch

This PR adds the gittrack mode flag and adds tests for watches being disabled when handling them is disabled

+449 -196

5 comments

6 changed files

DanielMorsing

pr closed time in 5 months

pull request commentpusher/faros

Handle gittracks flag

/retest

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha efaa9448e69a2376fdda7b0ace1637b5ba0d7ff9

fix comment in test

view details

Daniel Morsing

commit sha eb30369388f1fce329003b6393bc9e18f3b72f04

implement clustergittrackmode disabled in GTOs

view details

Daniel Morsing

commit sha 64e04900fbc1f8133286c6e3453b90b291f8ef00

error out if invalid flag combination has been set

view details

Daniel Morsing

commit sha 2ce14ac38354903f77a429a4204268cff58dcedd

implement new behavior for {,cluster}gittrackobjects

view details

Daniel Morsing

commit sha 6031145f969daba660c530017e482d42748076ef

add scaffolding for clustergittrackmode tests

view details

Daniel Morsing

commit sha 1b973e5fad64be15723434ee46c030f560629291

add initial tests for disabled clustergittracks

view details

Daniel Morsing

commit sha 2b01b06022d56037b5ce71cf3c4ac5d0d9befc4d

add tests for CGTM exclude namespaced

view details

Daniel Morsing

commit sha 42f46b191f79d96c6a5a8fa86d84cd3d55510471

actually create the objects

view details

Daniel Morsing

commit sha a00d804b62fa4062d73984296178449a1ea543d1

fix responsibility predicate

view details

Daniel Morsing

commit sha 44be78c8eeaed6c4f58be97f73a2c779f6797303

fix predicate on gittrackobjects The logic on clustergittrackobjects vs gittrackobject was broken.

view details

Daniel Morsing

commit sha 370479e9310a2f7e017b8928c23db652be64256a

disable invalid test

view details

Daniel Morsing

commit sha cb3c8c82ef371e363757b93c0102b138c372654e

don't bother watching if we would never pass the predicates

view details

Daniel Morsing

commit sha f9129a7db7b668aab822d05664ae0a72b1d7872d

remove unused predicates, add comments for new ones

view details

Daniel Morsing

commit sha 946956a2aa28990f0062c0cf685c4c75fef498e8

add tests for when GTMDisabled and CGTMIncludeNamespaced

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha efaa9448e69a2376fdda7b0ace1637b5ba0d7ff9

fix comment in test

view details

push time in 5 months

push eventpusher/faros

Mathias Söderberg

commit sha 397efb980e47e646bf5fc68417bb2c8f5ae7f828

Reset metrics registry in tests The test output is currently littered with error messages like: ``` E0918 10:35:59.384112 79407 workqueue.go:37] controller-runtime/metrics "msg"="failed to register metric" "error"="duplicate metrics collector registration attempted" "name"="workqueue_retries_total" "queue"="gittrack-controller" ``` This gets rid of those messages.

view details

Mathias Söderberg

commit sha bdc2997791ac227e0fac1688709e68055f9ccbab

Merge pull request #177 from pusher/reset-metrics-registry-in-tests Reset metrics registry in tests

view details

Mathias Söderberg

commit sha b4263872ecf88c0af4e792f9b6b4880880f9b34f

Document behaviour of invalid YAML interleaved with valid Not entirely sure whether we actually want to return the valid objects, but maybe we do? We should probably mimic what `kubectl apply` does, and I think it fails if the file isn't valid YAML?

view details

Mathias Söderberg

commit sha 2fb8387ecfa9bb2d9f7bd6a58662c568c4c920ae

Return partial results from `YAMLToUnstructured{Slice,}` This is needed to be able to mimic the behaviour that `kubectl apply -f <path>` has where it will parse and apply resources in a file until it hits an error (and then continue with subsequent files if given a directory).

view details

Mathias Söderberg

commit sha ccfc2d09cbcb47f1b2dd98732212c3bd9d918ad2

Mimic `kubectl apply -f <path>` behaviour in GitTrack controller Previously if we encountered a file that we could partially parse we would discard everything in said file, and eventually we would clean up any "leftover" resources (which could be ones that we for some reason now couldn't parse, perhaps because someone introduce a syntax error or similar). Now we instead try to partially apply what we can parse, which is what `kubectl apply -f <path>` does as well. Hopefully this should be of least surprise to users.

view details

Mathias Söderberg

commit sha e6b00f0e9be01a8a0f1ec6e86ae28cbff71dfb47

Prefer `SatisfyAll` over `And`

view details

Mathias Söderberg

commit sha 59daa9776a75f83aac43e16c3ba979ecb3b3f926

Sprinkle some timeouts and `By` statements

view details

Mathias Söderberg

commit sha dfba959b7b19114f97db31021f09f9ebd2c5ff24

Simplify `YAMLToUnstructuredSlice` slightly Avoid named returns as they're not as explicit as explicitly created ones.

view details

Mathias Söderberg

commit sha 7a900bd4ea0dd60b745e23d525159f3f5d6628a9

Add test case for resources of invalid type We're still not properly testing the function passed to `EachListItem`, though I'm not sure if we actually can, I imagine it'll blow up somewhere in-between transforming between YAML and JSON. At least it covers one more error case.

view details

Mathias Söderberg

commit sha ab718e6f6c1d567dd19fc05e2e46504089a2c70b

Merge pull request #174 from pusher/invalid-yaml-interleaved Document behaviour of invalid YAML interleaved with valid

view details

Daniel Morsing

commit sha 09e1b5f797f8e0d4e9d2106f45186ce5590ad894

add flag for handling (regular) gittracks

view details

Daniel Morsing

commit sha 94f4bcac820a7db4fec74efe9903607d8a2148bd

Make running the reconciler on a disabled type a panic Also remove a test that checked on running disabled CGT, since it is now a panic

view details

Daniel Morsing

commit sha 47c8e4ab2c9e4ea0188443b288216da6a4a3b4e9

Add empty tests to GitTrack test suite for handling watcher events

view details

Daniel Morsing

commit sha c1632bf5d5f0034de80f8116c3f0f8b9573802e7

implement rest of tests for watches on ClusterGitTracks

view details

Daniel Morsing

commit sha 35ae026d493fda0075293d271dbe121032598c94

add tests for gittrack handling disabled/enabled

view details

Daniel Morsing

commit sha 1ff8d037d4c159cabd10259a69ce00bb77475e40

implement clustergittrackmode disabled in GTOs

view details

Daniel Morsing

commit sha c8edd7acb2c64ce95335a71fd69ab3f32c2e7148

error out if invalid flag combination has been set

view details

Daniel Morsing

commit sha 83987f211e84421a95eb2ce60d75e52f4e9ff9ed

implement new behavior for {,cluster}gittrackobjects

view details

Daniel Morsing

commit sha aa939495d74d2c3e9ee0769cc915c6f77424b596

add scaffolding for clustergittrackmode tests

view details

Daniel Morsing

commit sha 80bcb1c862afa357f6b117a69a01f08301e71298

add initial tests for disabled clustergittracks

view details

push time in 5 months

pull request commentpusher/faros

Handle gittracks flag

/retest

DanielMorsing

comment created time in 5 months

pull request commentpusher/faros

Disable disabled cgto

/retest

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha df151da3d24840c621d98f8bc611598822236eee

add tests for when GTMDisabled and CGTMIncludeNamespaced

view details

push time in 5 months

push eventpusher/faros

Mathias Söderberg

commit sha 397efb980e47e646bf5fc68417bb2c8f5ae7f828

Reset metrics registry in tests The test output is currently littered with error messages like: ``` E0918 10:35:59.384112 79407 workqueue.go:37] controller-runtime/metrics "msg"="failed to register metric" "error"="duplicate metrics collector registration attempted" "name"="workqueue_retries_total" "queue"="gittrack-controller" ``` This gets rid of those messages.

view details

Mathias Söderberg

commit sha bdc2997791ac227e0fac1688709e68055f9ccbab

Merge pull request #177 from pusher/reset-metrics-registry-in-tests Reset metrics registry in tests

view details

Mathias Söderberg

commit sha b4263872ecf88c0af4e792f9b6b4880880f9b34f

Document behaviour of invalid YAML interleaved with valid Not entirely sure whether we actually want to return the valid objects, but maybe we do? We should probably mimic what `kubectl apply` does, and I think it fails if the file isn't valid YAML?

view details

Mathias Söderberg

commit sha 2fb8387ecfa9bb2d9f7bd6a58662c568c4c920ae

Return partial results from `YAMLToUnstructured{Slice,}` This is needed to be able to mimic the behaviour that `kubectl apply -f <path>` has where it will parse and apply resources in a file until it hits an error (and then continue with subsequent files if given a directory).

view details

Mathias Söderberg

commit sha ccfc2d09cbcb47f1b2dd98732212c3bd9d918ad2

Mimic `kubectl apply -f <path>` behaviour in GitTrack controller Previously if we encountered a file that we could partially parse we would discard everything in said file, and eventually we would clean up any "leftover" resources (which could be ones that we for some reason now couldn't parse, perhaps because someone introduce a syntax error or similar). Now we instead try to partially apply what we can parse, which is what `kubectl apply -f <path>` does as well. Hopefully this should be of least surprise to users.

view details

Mathias Söderberg

commit sha e6b00f0e9be01a8a0f1ec6e86ae28cbff71dfb47

Prefer `SatisfyAll` over `And`

view details

Mathias Söderberg

commit sha 59daa9776a75f83aac43e16c3ba979ecb3b3f926

Sprinkle some timeouts and `By` statements

view details

Mathias Söderberg

commit sha dfba959b7b19114f97db31021f09f9ebd2c5ff24

Simplify `YAMLToUnstructuredSlice` slightly Avoid named returns as they're not as explicit as explicitly created ones.

view details

Mathias Söderberg

commit sha 7a900bd4ea0dd60b745e23d525159f3f5d6628a9

Add test case for resources of invalid type We're still not properly testing the function passed to `EachListItem`, though I'm not sure if we actually can, I imagine it'll blow up somewhere in-between transforming between YAML and JSON. At least it covers one more error case.

view details

Mathias Söderberg

commit sha ab718e6f6c1d567dd19fc05e2e46504089a2c70b

Merge pull request #174 from pusher/invalid-yaml-interleaved Document behaviour of invalid YAML interleaved with valid

view details

Daniel Morsing

commit sha 09e1b5f797f8e0d4e9d2106f45186ce5590ad894

add flag for handling (regular) gittracks

view details

Daniel Morsing

commit sha 94f4bcac820a7db4fec74efe9903607d8a2148bd

Make running the reconciler on a disabled type a panic Also remove a test that checked on running disabled CGT, since it is now a panic

view details

Daniel Morsing

commit sha 47c8e4ab2c9e4ea0188443b288216da6a4a3b4e9

Add empty tests to GitTrack test suite for handling watcher events

view details

Daniel Morsing

commit sha c1632bf5d5f0034de80f8116c3f0f8b9573802e7

implement rest of tests for watches on ClusterGitTracks

view details

Daniel Morsing

commit sha 35ae026d493fda0075293d271dbe121032598c94

add tests for gittrack handling disabled/enabled

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 55cbdd22ae2b1f0b267cef207e7444644b939179

don't bother watching if we would never pass the predicates

view details

Daniel Morsing

commit sha f5a3c1bd9e7513f2072d71e4a2f3bfbb462d239f

remove unused predicates, add comments for new ones

view details

push time in 5 months

PR opened pusher/faros

Disable disabled cgto

This filters out events on GitTrackObjects and ClusterGitTrackObjects, meaning we only reconcile resources when something we are responsible for changes

+622 -292

0 comment

9 changed files

pr created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 0703e779779de9b5f922fb6738967e2a43fc85cf

Merge pull request #170 from pusher/disallow-gt-to-cgto Disallow having gittracks handle clustergittrackobjects

view details

Daniel Morsing

commit sha 814e80215b428108280a73e73bf18334ff1c52ed

add flag for handling (regular) gittracks

view details

Daniel Morsing

commit sha 8927ce27e2bd5a125b20bbcb741a6aaa5f14d9e0

Make running the reconciler on a disabled type a panic Also remove a test that checked on running disabled CGT, since it is now a panic

view details

Daniel Morsing

commit sha 710228502f0c7faae7e56fdcd789dde9554f0a2b

Add empty tests to GitTrack test suite for handling watcher events

view details

Daniel Morsing

commit sha e738041c4dad587748ee7c1f37690402bb69a088

implement rest of tests for watches on ClusterGitTracks

view details

Daniel Morsing

commit sha 8849fb8aaca336ce3bcd21b326b51543f422498e

add tests for gittrack handling disabled/enabled

view details

Daniel Morsing

commit sha f6033f8fd85bf095353e105d02b9474de9e9168a

implement clustergittrackmode disabled in GTOs

view details

Daniel Morsing

commit sha 06f95d9d87e80a862757a08038bb2a10361a5823

error out if invalid flag combination has been set

view details

Daniel Morsing

commit sha 02f52b778b19aabd851594bda277da23a302b2cf

implement new behavior for {,cluster}gittrackobjects

view details

Daniel Morsing

commit sha 89ca67e41e7b8d5ade79e95fbf7123fc8719a434

add scaffolding for clustergittrackmode tests

view details

Daniel Morsing

commit sha 165e2a030bc8cb301ec9bb3e32c6c271eeef2f9d

add initial tests for disabled clustergittracks

view details

Daniel Morsing

commit sha e21ce672a18ef98a80b22c0696d13e3e3f4cffb0

add tests for CGTM exclude namespaced

view details

Daniel Morsing

commit sha 08ea909cde0ac7f0d57e2c0a2048260719867cae

actually create the objects

view details

Daniel Morsing

commit sha 0472925d51b3a9555a6480a3d72a1bfc86db9598

fix responsibility predicate

view details

Daniel Morsing

commit sha 4399ab3db7abf7ea3b706bfd9e8945725f2cdd7a

fix predicate on gittrackobjects The logic on clustergittrackobjects vs gittrackobject was broken.

view details

Daniel Morsing

commit sha d288311efbaa8872d2b49241b1a9fc76edaa46fc

disable invalid test

view details

push time in 5 months

pull request commentpusher/faros

Handle gittracks flag

Fixed up that last suggestion and pruned the history

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 814e80215b428108280a73e73bf18334ff1c52ed

add flag for handling (regular) gittracks

view details

Daniel Morsing

commit sha 8927ce27e2bd5a125b20bbcb741a6aaa5f14d9e0

Make running the reconciler on a disabled type a panic Also remove a test that checked on running disabled CGT, since it is now a panic

view details

Daniel Morsing

commit sha 710228502f0c7faae7e56fdcd789dde9554f0a2b

Add empty tests to GitTrack test suite for handling watcher events

view details

Daniel Morsing

commit sha e738041c4dad587748ee7c1f37690402bb69a088

implement rest of tests for watches on ClusterGitTracks

view details

Daniel Morsing

commit sha 8849fb8aaca336ce3bcd21b326b51543f422498e

add tests for gittrack handling disabled/enabled

view details

push time in 5 months

create barnchpusher/faros

branch : disable-disabled-cgto

created branch time in 5 months

pull request commentpusher/faros

Handle gittracks flag

see https://github.com/pusher/faros/pull/171 for previous comments and context

DanielMorsing

comment created time in 5 months

pull request commentpusher/faros

Handle gittracks flag

/retest

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 0703e779779de9b5f922fb6738967e2a43fc85cf

Merge pull request #170 from pusher/disallow-gt-to-cgto Disallow having gittracks handle clustergittrackobjects

view details

Daniel Morsing

commit sha dd9ab57e7fc5cc43458f645046850946130e89bd

add flag for handling (regular) gittracks

view details

Daniel Morsing

commit sha 7243bdcce0819ea18f08e84016bfedac09dc6e08

Make the flag pretty

view details

Daniel Morsing

commit sha 2549d2b5f83368f67db6dbec4f5d254b6877c74f

add comment

view details

Daniel Morsing

commit sha a3d635cf19866ce990238c3eead2097f2d9391d4

fixup naming nits, use consistent handling of GitTrack mode and ClusterGitTrack mode

view details

Daniel Morsing

commit sha 409a3b753e7312b4cc071e082ffad4b27e174a07

Make running the reconciler on a disabled type a panic Also remove a test that checked on running disabled CGT, since it is now a panic

view details

Daniel Morsing

commit sha 705f4738133c23828c9593302f14e2066bb73786

WIP failing test

view details

Joel Speed

commit sha c37b79a436e2d9af43cb505a93edf2e3fa81eb9d

Add empty tests to GitTrack test suite for handling watcher events

view details

Daniel Morsing

commit sha ed13c22bf0793eac38fac62e755b84d34c259bf1

implement rest of tests for watches on ClusterGitTracks

view details

Daniel Morsing

commit sha 9bd807f6c1ea3db665ec3cc74bb7e698651bbd2e

add tests for gittrack handling disabled/enabled

view details

Daniel Morsing

commit sha 8c09c0964ca44d0cd490eb5af37368a1f903034c

actually pass through the gittrack mode in the options We didn't catch this, because we set this value explicitly in the tests

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha f394262dfe0f10b4ff3b998d6c4bee561087c725

disallow gittrack managing clustergittrack object

view details

Daniel Morsing

commit sha ff4d0bd69839ffd000531a598a659ec8e91a6fad

fix test that checked for clustergittrackobjects owned by gittrack

view details

Daniel Morsing

commit sha 59399eb9a5dd54f9ecde2543785fd8a2c37669d4

use namespaced object for gittrack colon name test

view details

Daniel Morsing

commit sha 26de90eb2eb37f39861cce723f4db1a8e8fcb31d

fix listObjectsByName test

view details

Daniel Morsing

commit sha 238be26eb24333bd321aa0fcba2d74782e505809

fix test that relied on namespace being applied from gittrack

view details

Daniel Morsing

commit sha 9a0ea2b77e270038cbd14b38e6b754c8fecf9479

disable watches on things we no longer need to watch

view details

Daniel Morsing

commit sha 8386d2f4143b725ef217156fb94b96e766e30dd3

change wording on cluster-scoped gittracks errors

view details

Daniel Morsing

commit sha 410627dcde9a311d7e27ae0552f56c9d3e7d736f

don't do watches to objects that we're not handling, even if disabled in handler

view details

Daniel Morsing

commit sha 36495dd28f57c691144013fd4d7b232c891b5235

remove spurious newline

view details

Daniel Morsing

commit sha 5e3e2fac2fa7ae2ffb041689d52b8f123765a6d1

restructure logic for clustergittrack modes The switch statement wasn't clear enough

view details

Daniel Morsing

commit sha 0d25e8cf1dd12870a273e1fe2cab75c79ccd8812

update ignored count for test

view details

Daniel Morsing

commit sha 0703e779779de9b5f922fb6738967e2a43fc85cf

Merge pull request #170 from pusher/disallow-gt-to-cgto Disallow having gittracks handle clustergittrackobjects

view details

push time in 5 months

PR merged pusher/faros

Disallow having gittracks handle clustergittrackobjects Project size/M

This should ensure that we don't create any objects that might be garbage collected due to a invalid owner reference.

+57 -31

8 comments

4 changed files

DanielMorsing

pr closed time in 5 months

PR opened pusher/faros

Handle gittracks flag

Due to thumbs for fingers, I managed to close the last PR by merging it into another branch

This PR adds the gittrack mode flag and adds tests for watches being disabled when handling them is disabled

+500 -221

0 comment

7 changed files

pr created time in 5 months

pull request commentpusher/faros

Disallow having gittracks handle clustergittrackobjects

/retest

DanielMorsing

comment created time in 5 months

pull request commentpusher/faros

Disallow having gittracks handle clustergittrackobjects

The test failure is a data race, but it couldn't restore the stack, so not sure where it's happening. It's also in a part of the codebase I haven't touched at all. Going to retest and see if it's still happening

DanielMorsing

comment created time in 5 months

push eventpusher/faros

push time in 5 months

create barnchpusher/faros

branch : handleGittracks-flag

created branch time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha fce556a9f94403b9f3dcf10380aab94b9cae88ed

add flag for handling (regular) gittracks

view details

Daniel Morsing

commit sha 89f4224171e6b885119585bf78893053501ef238

Make the flag pretty

view details

Daniel Morsing

commit sha 5dea88c450a45e75376db0a6a25166819a81cd29

add comment

view details

Daniel Morsing

commit sha d7fe0d9780b629dd8955678538a087f44f5aa1bc

fixup naming nits, use consistent handling of GitTrack mode and ClusterGitTrack mode

view details

Daniel Morsing

commit sha 68f026c45c969bba7c771051f43da23b21168306

Make running the reconciler on a disabled type a panic Also remove a test that checked on running disabled CGT, since it is now a panic

view details

Daniel Morsing

commit sha 0223a14144a1d438bc475ae9e828585ad8ee565a

WIP failing test

view details

Joel Speed

commit sha 99dfb2bdf173beaefeb3b25d5fc07dbdab085d12

Add empty tests to GitTrack test suite for handling watcher events

view details

Daniel Morsing

commit sha af40abadbcee590ec7f4d6d297445305bfa3929d

implement rest of tests for watches on ClusterGitTracks

view details

Daniel Morsing

commit sha 0aca9159f2fe249644e48e499b0f27bf456e7360

add tests for gittrack handling disabled/enabled

view details

Daniel Morsing

commit sha 40f750878c3cc130b440d20f3cec0613681fdd5f

actually pass through the gittrack mode in the options We didn't catch this, because we set this value explicitly in the tests

view details

Daniel Morsing

commit sha 93d35c1c5154501c09cb830c58c17c0279cb1060

Merge pull request #171 from pusher/handleGittracks-flag Handle gittracks flag

view details

push time in 5 months

PR merged pusher/faros

Handle gittracks flag Project size/XL

Final piece: Add a flag for disallowing (regular) GitTracks

+448 -195

1 comment

6 changed files

DanielMorsing

pr closed time in 5 months

pull request commentpusher/faros

Handle gittracks flag

/retest

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 40f750878c3cc130b440d20f3cec0613681fdd5f

actually pass through the gittrack mode in the options We didn't catch this, because we set this value explicitly in the tests

view details

push time in 5 months

push eventpusher/faros

Mathias Söderberg

commit sha 7762125081e1291a92de72f7409f93edc3fe7741

Make `lint` depend on `vendor` Otherwise it won't work properly in CI.

view details

Mathias Söderberg

commit sha 5a89f9fe5e3f5fd9855eeacdf28096a2cf93fdf4

Remove `new{Metric,Status}Opts` They're not used. Maybe they will in the future though?

view details

Mathias Söderberg

commit sha 3c413e1748637e45c63ac5ea6e34e6fae775ecdf

Merge pull request #173 from pusher/make-vendor-lint Make `lint` depend on `vendor`

view details

Joel Speed

commit sha 9b9d2791610ff6d6285f441b73504f7584e120e3

Move file fetching methods to files.go

view details

Joel Speed

commit sha 99bb666f18535f3ff215e782c2a31bdc99ab93f7

Set up test suite for files tests

view details

Mathias Söderberg

commit sha 2454b3a31075bb1e72121e291d330e2ca2097e7c

Add initial tests for files-related functions I'm not terribly fond of the tests for `objectsFrom` depending on the files returned from `getFiles`, but I couldn't find any nice way of creating static fixtures through the git library we're using. For now it's fine, but it would be good to decouple those tests from depending on an actual repository.

view details

Mathias Söderberg

commit sha d644dd58eecb91af5311717cc9774290bad5bcb5

Remove old files-related tests

view details

Mathias Söderberg

commit sha 95539c9fb63b59cb1c5ff9353fb95604fe639b11

Add tests for invalid files for {Cluster,}GitTrack

view details

Mathias Söderberg

commit sha a44004f6dfa606a385b53897cd4f7682c7acc91a

Merge pull request #172 from pusher/files-tests Tests for files-related functions

view details

Daniel Morsing

commit sha f394262dfe0f10b4ff3b998d6c4bee561087c725

disallow gittrack managing clustergittrack object

view details

Daniel Morsing

commit sha ff4d0bd69839ffd000531a598a659ec8e91a6fad

fix test that checked for clustergittrackobjects owned by gittrack

view details

Daniel Morsing

commit sha 59399eb9a5dd54f9ecde2543785fd8a2c37669d4

use namespaced object for gittrack colon name test

view details

Daniel Morsing

commit sha 26de90eb2eb37f39861cce723f4db1a8e8fcb31d

fix listObjectsByName test

view details

Daniel Morsing

commit sha 238be26eb24333bd321aa0fcba2d74782e505809

fix test that relied on namespace being applied from gittrack

view details

Daniel Morsing

commit sha 9a0ea2b77e270038cbd14b38e6b754c8fecf9479

disable watches on things we no longer need to watch

view details

Daniel Morsing

commit sha 8386d2f4143b725ef217156fb94b96e766e30dd3

change wording on cluster-scoped gittracks errors

view details

Daniel Morsing

commit sha 410627dcde9a311d7e27ae0552f56c9d3e7d736f

don't do watches to objects that we're not handling, even if disabled in handler

view details

Daniel Morsing

commit sha 36495dd28f57c691144013fd4d7b232c891b5235

remove spurious newline

view details

Daniel Morsing

commit sha 5e3e2fac2fa7ae2ffb041689d52b8f123765a6d1

restructure logic for clustergittrack modes The switch statement wasn't clear enough

view details

Daniel Morsing

commit sha 0d25e8cf1dd12870a273e1fe2cab75c79ccd8812

update ignored count for test

view details

push time in 5 months

pull request commentpusher/faros

Disallow having gittracks handle clustergittrackobjects

/retest

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Mathias Söderberg

commit sha 7762125081e1291a92de72f7409f93edc3fe7741

Make `lint` depend on `vendor` Otherwise it won't work properly in CI.

view details

Mathias Söderberg

commit sha 5a89f9fe5e3f5fd9855eeacdf28096a2cf93fdf4

Remove `new{Metric,Status}Opts` They're not used. Maybe they will in the future though?

view details

Mathias Söderberg

commit sha 3c413e1748637e45c63ac5ea6e34e6fae775ecdf

Merge pull request #173 from pusher/make-vendor-lint Make `lint` depend on `vendor`

view details

Joel Speed

commit sha 9b9d2791610ff6d6285f441b73504f7584e120e3

Move file fetching methods to files.go

view details

Joel Speed

commit sha 99bb666f18535f3ff215e782c2a31bdc99ab93f7

Set up test suite for files tests

view details

Mathias Söderberg

commit sha 2454b3a31075bb1e72121e291d330e2ca2097e7c

Add initial tests for files-related functions I'm not terribly fond of the tests for `objectsFrom` depending on the files returned from `getFiles`, but I couldn't find any nice way of creating static fixtures through the git library we're using. For now it's fine, but it would be good to decouple those tests from depending on an actual repository.

view details

Mathias Söderberg

commit sha d644dd58eecb91af5311717cc9774290bad5bcb5

Remove old files-related tests

view details

Mathias Söderberg

commit sha 95539c9fb63b59cb1c5ff9353fb95604fe639b11

Add tests for invalid files for {Cluster,}GitTrack

view details

Mathias Söderberg

commit sha a44004f6dfa606a385b53897cd4f7682c7acc91a

Merge pull request #172 from pusher/files-tests Tests for files-related functions

view details

Daniel Morsing

commit sha f394262dfe0f10b4ff3b998d6c4bee561087c725

disallow gittrack managing clustergittrack object

view details

Daniel Morsing

commit sha ff4d0bd69839ffd000531a598a659ec8e91a6fad

fix test that checked for clustergittrackobjects owned by gittrack

view details

Daniel Morsing

commit sha 59399eb9a5dd54f9ecde2543785fd8a2c37669d4

use namespaced object for gittrack colon name test

view details

Daniel Morsing

commit sha 26de90eb2eb37f39861cce723f4db1a8e8fcb31d

fix listObjectsByName test

view details

Daniel Morsing

commit sha 238be26eb24333bd321aa0fcba2d74782e505809

fix test that relied on namespace being applied from gittrack

view details

Daniel Morsing

commit sha 9a0ea2b77e270038cbd14b38e6b754c8fecf9479

disable watches on things we no longer need to watch

view details

Daniel Morsing

commit sha 8386d2f4143b725ef217156fb94b96e766e30dd3

change wording on cluster-scoped gittracks errors

view details

Daniel Morsing

commit sha 410627dcde9a311d7e27ae0552f56c9d3e7d736f

don't do watches to objects that we're not handling, even if disabled in handler

view details

Daniel Morsing

commit sha 36495dd28f57c691144013fd4d7b232c891b5235

remove spurious newline

view details

Daniel Morsing

commit sha 5e3e2fac2fa7ae2ffb041689d52b8f123765a6d1

restructure logic for clustergittrack modes The switch statement wasn't clear enough

view details

Daniel Morsing

commit sha 0d25e8cf1dd12870a273e1fe2cab75c79ccd8812

update ignored count for test

view details

push time in 5 months

pull request commentpusher/faros

Disallow having gittracks handle clustergittrackobjects

something's up here, the lines for the test failures don't match up with the code on this branch

DanielMorsing

comment created time in 5 months

pull request commentpusher/faros

Disallow having gittracks handle clustergittrackobjects

/retest

DanielMorsing

comment created time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 1d078d5f0883b734427ea3933beb0ff3a4064583

remove spurious newline

view details

Daniel Morsing

commit sha aefbc720123db8d9f855ee3d8dc5687d74f17c55

restructure logic for clustergittrack modes The switch statement wasn't clear enough

view details

push time in 5 months

push eventpusher/faros

Daniel Morsing

commit sha 1d078d5f0883b734427ea3933beb0ff3a4064583

remove spurious newline

view details

Daniel Morsing

commit sha aefbc720123db8d9f855ee3d8dc5687d74f17c55

restructure logic for clustergittrack modes The switch statement wasn't clear enough

view details

Daniel Morsing

commit sha 2afc5eca2f52baaff4f256fbcd5f1bc33820fd33

add flag for handling (regular) gittracks

view details

Daniel Morsing

commit sha 5d7190f3411bf62cff5ff6e4b395821b39afc0e7

Make the flag pretty

view details

Daniel Morsing

commit sha 92905df098e6097b123fab3958bdfb8e719b4287

add comment

view details

Daniel Morsing

commit sha e534ae7b155d4974e4c1bb220b4f4a0d978f75f9

fixup naming nits, use consistent handling of GitTrack mode and ClusterGitTrack mode

view details

Daniel Morsing

commit sha f580d5fefc902a8265189860d2287ba70204b494

Make running the reconciler on a disabled type a panic Also remove a test that checked on running disabled CGT, since it is now a panic

view details

Daniel Morsing

commit sha cd933cfbbd7fa723b069553a6da925dcba9bac6d

WIP failing test

view details

Joel Speed

commit sha fe7f3b1da7eedb4cb560b545bd2fd347543ba132

Add empty tests to GitTrack test suite for handling watcher events

view details

Daniel Morsing

commit sha dec1efd215363ddb750728c334633e235091de9e

implement rest of tests for watches on ClusterGitTracks

view details

Daniel Morsing

commit sha 221db4f1db2d65de71bdae6be15524f131d17287

add tests for gittrack handling disabled/enabled

view details

push time in 5 months

more