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

Graceful migration for compartment-map.json tags to conditions #2388

Open
kriskowal opened this issue Jul 30, 2024 · 0 comments
Open

Graceful migration for compartment-map.json tags to conditions #2388

kriskowal opened this issue Jul 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kriskowal
Copy link
Member

What is the Problem Being Solved?

We discovered late that Node.js uses the term “conditions” where we currently use “tags” in compartment-map.json and previously throughout the compartment mapper implementation.

Description of the Design

This migration is tightly constrained. Production currently uses the compartment map validator to forbid any archive/bundle that has extraneous properties in compartment-map.json.

We may need to first ship into production a version that relaxes these constraints. We may need to do this in order to support any new fields in compartment-map.json, as may be necessary to get source maps properly threaded.

We may then need to adjust the bundler to produce both the old tags and new conditions properties on all new bundles.

We may need a mechanism in bundle-source to opt-in to generating conditions instead of tags.

Security Considerations

Scaling Considerations

Test Plan

Compatibility Considerations

This is a compatibility consideration top to bottom.

Upgrade Considerations

@kriskowal kriskowal added the enhancement New feature or request label Jul 30, 2024
kriskowal added a commit that referenced this issue Jul 30, 2024
#2389)

Refs: #2388 

## Description

See #2388, we cannot at this time change the schema of
`compartment-map.json` as I attempted in
#2373

### Security Considerations

None.

### Scaling Considerations

None.

### Documentation Considerations

None.

### Testing Considerations

None.

### Compatibility Considerations

Restores backward compatibility for production systems.

The file `app.agar` is a zip file generated by a previous version of the
compartment mapper, used as a test fixture to verify that future
versions can import ancient versions. To get tests passing in #2373, I
regenerated `app.agar` and in this change, I revert it to the original
schema. Having to regenerate `app.agar` is supposed to be a hint that
something is broken, and I waltzed through the warnings.

### Upgrade Considerations

None.
kriskowal added a commit that referenced this issue Jul 30, 2024
#2389)

Refs: #2388

See #2388, we cannot at this time change the schema of
`compartment-map.json` as I attempted in
#2373

None.

None.

None.

None.

Restores backward compatibility for production systems.

The file `app.agar` is a zip file generated by a previous version of the
compartment mapper, used as a test fixture to verify that future
versions can import ancient versions. To get tests passing in #2373, I
regenerated `app.agar` and in this change, I revert it to the original
schema. Having to regenerate `app.agar` is supposed to be a hint that
something is broken, and I waltzed through the warnings.

None.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant