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

SUMO-117261: Skip using TRAVIS_COMMIT_RANGE for yaml detection #168

Merged
merged 4 commits into from
Aug 30, 2019

Conversation

rvmiller89
Copy link
Contributor

@rvmiller89 rvmiller89 commented Aug 30, 2019

Description

Recommend using "Hide whitespace changes" since most of this is just indent change.

Rather than using TRAVIS_COMMIT_RANGE which is empty on initial commit, we can git diff master...$TRAVIS_BRANCH to detect manual changes to the yaml files.

Rather than checking for changes made to values.yaml, we can always generate the new files and commit them if there is a difference.

Testing performed
  • ci/build.sh
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in
  • Tested initial commit with no yaml changes
  • Tested initial commit with changes in values.yaml for our template as well as overrides
  • Tested initial commit incorrectly making changes to overrides and ensure it failed

@rvmiller89 rvmiller89 force-pushed the rmiller-fix-yaml-detection-ci branch 2 times, most recently from 2c08dcb to 72b5318 Compare August 30, 2019 22:20
@rvmiller89 rvmiller89 force-pushed the rmiller-fix-yaml-detection-ci branch from 72b5318 to 031566e Compare August 30, 2019 22:32
ci/build.sh Outdated
git checkout $TRAVIS_BRANCH
fi

# Check for invalid changes to overrides yaml files
Copy link
Contributor

Choose a reason for hiding this comment

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

should this check be at the top like it was before? The reason we put it at the top is because we didn't want to build the gems or the image if it would fail here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we're okay with moving the # Set up Github part to the top too, I'm fine with having it fail faster. In my testing it wasn't a huge deal that it built the gems/docker image before failing.

Copy link
Contributor

@samjsong samjsong left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@maimaisie maimaisie left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this Ryan

echo "No changes in the generated overrides files."
fi
# Generate override yaml files for chart dependencies to determine if changes are made to overrides yaml files
echo "Generating overrides files..."
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we always generate override files now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do. We will only commit them if there is a difference detected, however.

Copy link
Contributor

Choose a reason for hiding this comment

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

gtk

@rvmiller89 rvmiller89 merged commit 6d27cd3 into master Aug 30, 2019
@rvmiller89 rvmiller89 deleted the rmiller-fix-yaml-detection-ci branch August 30, 2019 22:54
psaia pushed a commit to psaia/sumologic-kubernetes-collection that referenced this pull request May 25, 2021
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.

4 participants