Skip to content

Conversation

@seaneganx
Copy link
Contributor

Fixes #626 by applying updates to spec contents only after updating every other field on the model. This guarantees the mime_type is up-to-date when we check whether to decompress the contents before recomputing size_bytes and hash.

See #626 (comment) for a full description of the bug and solution.

Perform spec content updates after updating other fields on the spec to
guarantee the MIME type check will use the current MIME type.
@seaneganx seaneganx requested a review from timburks June 24, 2022 17:48
@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #628 (7119891) into main (40ba2cb) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #628      +/-   ##
==========================================
+ Coverage   52.45%   52.53%   +0.08%     
==========================================
  Files          71       71              
  Lines        6974     6974              
==========================================
+ Hits         3658     3664       +6     
+ Misses       2919     2915       -4     
+ Partials      397      395       -2     
Impacted Files Coverage Δ
server/registry/actions_specs.go 73.64% <100.00%> (+2.51%) ⬆️

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 40ba2cb...7119891. Read the comment docs.

@seaneganx seaneganx merged commit c180a8e into apigee:main Jun 24, 2022
@seaneganx seaneganx deleted the bugfix/gzip-spec-updates branch June 24, 2022 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

updateSpec does not validate file when mime type is +gzip in the same way as createSpec does

2 participants