• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zalando-incubator / stackset-controller / 1962
50%

Build:
DEFAULT BRANCH: master
Ran 20 Nov 2020 01:51PM UTC
Jobs 1
Files 15
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Nov 2020 01:51PM UTC coverage: 71.641% (+1.0%) from 70.674%
1962

push

travis-ci

GitHub
Add and check UpdateTimestamp (#268)

The HTTP resources (Ingresses and RouteGroups) migration, introduced on
the [#251][0], checks for the `CreationTimestamp` attribute of the
resources. When the migration follows the path of:

1. adding a new resource (does not matter if it's an Ingress or
   RouteGroup) with a new hostname for migration and testing purposes;
2. validating the configuration of the new resource.
3. dropping the old resource in favor of the new one. For that the new
   resource receives the actual hostname.

the controller does not respect the [`IngressSourceSwitchTTL`][1]
duration as expected. During the 3rd step, the `CreationTimestamp`
attribute of the new resource tends to be greater than the
`IngressSourceSwitchTTL` configuration, due to the time spent in the 2nd
step. That leads to the almost instantaneous deletion of the old
resource, without considering the configured TTL for routes propagation.

This commit introduces a new annotation to the above-mentioned
resources: `stackset-controller.zalando.org/updated-timestamp`. This
annotation is responsible for tracking the last time the controller
updated a resource. Also, it changes the migration process introduced
on the [#251][0] to compare `IngressSourceSwitchTTL` with the newly
added annotation instead of the `CreationTimestamp` attribute. This way,
the change of hostname on the new resource, during the 3rd step, resets
the timer to delete the old resource and guarantees route propagation.

Also, it adds a new e2e test file. This new test create the above
mentioned migration process and verifies that the controller delete the
old resources after the `IngressSourceSwitchTTL` duration.

As a minor change, this commit also updates the `run_e2e.sh` script,
allowing one to define the environment variable `TEST_NAME`. It will set
the maximum parallelism to 1 and run the given test name.

[0]: https://github.com/zalando-incubator/stackset-controller/... (continued)

159 of 159 new or added lines in 2 files covered. (100.0%)

1925 of 2687 relevant lines covered (71.64%)

13.48 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
24
100.0
controller/stackset.go
Jobs
ID Job ID Ran Files Coverage
1 1962.1 (GO111MODULE=on GOLANGCI_RELEASE="v1.21.0") 20 Nov 2020 01:51PM UTC 0
71.64
Travis Job 1962.1
Source Files on build 1962
  • Tree
  • List 15
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1962
  • e26f75ca on github
  • Prev Build on master (#1958)
  • Next Build on master (#1972)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc