Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

add custom CMD (new style entrypoint/cmd) to metatron validation #160

Merged
merged 3 commits into from Jul 26, 2018

Conversation

fabiokung
Copy link
Contributor

Description of the Change

entrypoint and command are now verified as arrays by metatron. Backwards and forwards compatibility is being done by the metatron service itself.

entrypoint and command are now verified as arrays by metatron. Backwards
and forwards compatibility is being done by the metatron service itself.
@codecov
Copy link

codecov bot commented Jul 26, 2018

Codecov Report

Merging #160 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #160      +/-   ##
==========================================
- Coverage    33.3%   33.26%   -0.04%     
==========================================
  Files          62       62              
  Lines        7491     7500       +9     
==========================================
  Hits         2495     2495              
- Misses       4695     4704       +9     
  Partials      301      301
Impacted Files Coverage Δ
executor/metatron/metatron.go 0% <0%> (ø) ⬆️
executor/runtime/docker/docker.go 50.83% <0%> (ø) ⬆️
executor/runner/runner.go 60.62% <0%> (-2.16%) ⬇️

c.TitusInfo.MetatronCreds.MetadataSig,
c.TaskID,
titusMetadata)
*c.TitusInfo.MetatronCreds.AppMetadata,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these all required fields? If not, can you do c.TitusInfo.GetMetatronCreds().GetAppMetadata(), so it wont nil pointer dereference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a good idea, the old code wasn't checking it (there is a nil check in the code that calls this) so this should be safe as-is. But our future selves will probably appreciate it is a bit safer.

@@ -170,19 +171,14 @@ func createPassportDir(taskID string) error {
return os.MkdirAll(getMetatronOutputPath(taskID), os.FileMode(0700))
}

// RemovePassports removes a task's Metatron credential directory on the host
func RemovePassports(taskID string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

I notice we removed the call to this function back in May (885ba4b#diff-957e82dddf339c98741109a28268e372). Does that mean we are leaving these creds laying around the host? I realize this is unrelated to this specific PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. We are. It'd be nice to move to a model where the agent never has to write / read metatron creds from disk, and instead the metatron agent wrote a tarball to stdout.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think you may be right.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with wanting to avoid writing those creds to disk, but in the meantime seems like we shouldn't be accumulating them on agent (especially since we just saw nfbasic restriction regress). Since it's not really part of this PR, I can file something to at least clean up the creds but to ideally find a way to just pass vs persist them.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1760

  • 0 of 28 (0.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 22.831%

Changes Missing Coverage Covered Lines Changed/Added Lines %
executor/runtime/docker/docker.go 0 2 0.0%
executor/metatron/metatron.go 0 8 0.0%
executor/runner/runner.go 0 18 0.0%
Totals Coverage Status
Change from base Build 1735: -0.02%
Covered Lines: 2163
Relevant Lines: 9474

💛 - Coveralls

@fabiokung fabiokung merged commit 518953b into master Jul 26, 2018
@fabiokung fabiokung deleted the metatron-entrypoint-cmd branch July 26, 2018 19:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants