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

[feature] Feature to detect terraform file version changes #329

Merged
merged 25 commits into from
Aug 9, 2019

Conversation

echanakira
Copy link
Contributor

@echanakira echanakira commented Jul 26, 2019

Summary

Created a command that will search the terraform files of a Fogg project to see if they are using the latest module versions. Currently: The command, given a path, will successfully traverse the project to gather all of the terraform modules that are being used. Using that information, it loads the latest version of each module from GitHub or the terraform registry. Comparisons have not yet been implemented

The main files are located in ./cmd/exp/examine and ./exp/examine

Test Plan

Unit tests and testdata were created to make sure that functionality is working; however, the tests are not extensive.

References

@echanakira echanakira changed the title [WIP] Added all local files to fogg [WIP] Feature to detect terraform file version changes Jul 26, 2019
@codecov
Copy link

codecov bot commented Aug 8, 2019

Codecov Report

Merging #329 into master will decrease coverage by 0.74%.
The diff coverage is 53.7%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #329      +/-   ##
==========================================
- Coverage   79.83%   79.09%   -0.75%     
==========================================
  Files          21       25       +4     
  Lines        1840     1894      +54     
==========================================
+ Hits         1469     1498      +29     
- Misses        237      254      +17     
- Partials      134      142       +8
Impacted Files Coverage Δ
exp/examine/examine.go 0% <0%> (ø)
exp/examine/local.go 50% <50%> (ø)
exp/examine/util.go 50% <50%> (ø)
exp/examine/latest.go 76% <76%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ae2348...0a0eece. Read the comment docs.

@echanakira echanakira marked this pull request as ready for review August 8, 2019 02:18
@echanakira echanakira requested a review from a team as a code owner August 8, 2019 02:18
@echanakira echanakira changed the title [WIP] Feature to detect terraform file version changes [feature] Feature to detect terraform file version changes Aug 8, 2019
exp/examine/local.go Outdated Show resolved Hide resolved
exp/examine/local.go Outdated Show resolved Hide resolved
exp/examine/local.go Outdated Show resolved Hide resolved
exp/examine/local.go Outdated Show resolved Hide resolved
exp/examine/util.go Outdated Show resolved Hide resolved
exp/examine/local.go Outdated Show resolved Hide resolved
exp/examine/latest.go Outdated Show resolved Hide resolved
exp/examine/local.go Outdated Show resolved Hide resolved
exp/examine/local.go Outdated Show resolved Hide resolved
exp/examine/latest.go Outdated Show resolved Hide resolved
@echanakira echanakira merged commit fed3d67 into master Aug 9, 2019
@echanakira echanakira deleted the shedninja6/version-detection branch August 9, 2019 22:22
palasha pushed a commit to palasha/fogg that referenced this pull request Apr 7, 2020
…rberg#329)

* [BREAKING] Added all local files to fogg

* Update local_parser_test.go

* Local parser tests passing

* Updated tests to be current

* local_parser now retrieves all local modules and their versions

* Can now retrieve local and global github modules

* Refacted code to be more modular and use better variable names

* Started writing out command functionality

*  TEMPORARY FIXES

* Created testdata folder, with tests passing

* Created working tests that utilize testdata

* Examine temporarily

*  broken but duplicates removed

* Added dependencies to vendors

* Missing vendors added

* Fixed test and added new folder to testdata

* Added more comments

* removed getSubmodules, added terraform/config

* Implemented github client to get release tags

* made createGitUrl more concise

* Cleaned up latest.go style

* Fixed go.mods

* Got new github module

* Testing removing go-github
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.

None yet

3 participants