Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add a timestamp to the telegraf label creation to insure uniqueness #16204

Merged
merged 1 commit into from
Dec 11, 2019

Conversation

hoorayimhelping
Copy link
Contributor

@hoorayimhelping hoorayimhelping commented Dec 11, 2019

Closes #15730

Labels require unique names. The buggy behavior when we create a telegraf config is to create a label for the config and to name every label @influxdata.name. This fix appends a timestamp to @influxdata.name (that string is being filtered on, so we want keep @influxdata.name)

@@ -356,6 +356,30 @@ describe('Collectors', () => {
})
})
})

// fix for https://github.com/influxdata/influxdb/issues/15730
it('creates a cofiguration with a unique label', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('creates a cofiguration with a unique label', () => {
it('creates a configuration with a unique label', () => {

@@ -454,7 +454,7 @@ const createTelegraf = async (dispatch, getState, plugins) => {

const createdLabel = await client.labels.create({
orgID: org.id,
name: '@influxdata.token',
name: `@influxdata.token-${new Date().getTime()}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps the same comment in the cypress test here?

@hoorayimhelping hoorayimhelping merged commit d2fe751 into master Dec 11, 2019
@hoorayimhelping hoorayimhelping deleted the bs_fix_telegraf_creation branch December 11, 2019 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI - Telegrafs] Create telegraf transaction fails to create special label
3 participants