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

ci(local-npm): resume integration testing of NPM canary #7883

Merged
merged 5 commits into from Jun 6, 2023

Conversation

michaelfig
Copy link
Member

@michaelfig michaelfig commented Jun 5, 2023

refs: #7879

Description

Reenable integration testing with a local Verdaccio instance to verify the NPM publishing process as well as a dapp consuming the published packages instead of linking the SDK monorepo.

There were several changes to the package configurations needed to make this integration test succeed.

Security Considerations

Scaling Considerations

Documentation Considerations

Testing Considerations

@michaelfig michaelfig self-assigned this Jun 5, 2023
@michaelfig michaelfig added the force:integration Force integration tests to run on PR label Jun 5, 2023
@michaelfig michaelfig force-pushed the mfig-local-npm branch 8 times, most recently from 59cae24 to f8a4525 Compare June 5, 2023 07:44
Comment on lines -40 to -54
##################
# NPM pack tests
# Check that all the packages can be packed to publish
npm-pack:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/restore-node
with:
node-version: '18.x'

- name: npm pack
run: yarn lerna exec yarn pack

Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't actually exercise the same process as lerna publish, so I'm disabling it in favour of the integration test.

Copy link
Member

Choose a reason for hiding this comment

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

thanks for the explanation

@michaelfig michaelfig marked this pull request as ready for review June 5, 2023 15:30
@michaelfig michaelfig requested review from turadg and warner June 5, 2023 15:42
@michaelfig michaelfig added the tooling repo-wide infrastructure label Jun 5, 2023
Comment on lines -40 to -54
##################
# NPM pack tests
# Check that all the packages can be packed to publish
npm-pack:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/restore-node
with:
node-version: '18.x'

- name: npm pack
run: yarn lerna exec yarn pack

Copy link
Member

Choose a reason for hiding this comment

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

thanks for the explanation

@@ -11,7 +11,7 @@
"build": "yarn build:bundles",
"build:bundles": "node scripts/build-bundles.js",
"prepack": "echo \"export {}; \" | cat - tools/types-ambient.js > tools/types.js && tsc --build jsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"postpack": "git clean -f '*.d.ts*' tools/types.js",
Copy link
Member

Choose a reason for hiding this comment

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

this is more correct. was it also part of an observed problem?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, leaving behind garbage in the repo after yarn pack.

packages/SwingSet/package.json Show resolved Hide resolved
@@ -11,7 +11,7 @@ import './prepare-test-env.js';
import '@endo/ses-ava/exported.js';

import { wrapTest } from '@endo/ses-ava';
import rawTest from 'ava';
import rawTest from 'ava'; // eslint-disable-line import/no-extraneous-dependencies
Copy link
Member

Choose a reason for hiding this comment

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

this seems like a regression caused by the package.json changes

@@ -284,7 +284,7 @@ export function makeInboundQueueMetrics(initialLength) {
/**
* @param {object} param0
* @param {any} param0.controller
* @param {import('@opentelemetry/api-metrics').Meter} param0.metricMeter
* @param {import('@opentelemetry/api').Meter} param0.metricMeter
Copy link
Member

Choose a reason for hiding this comment

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

this commit is titled "fix(cosmic-swingset): adapt to new @opentelemetry". For the changelog, there is nothing to fix. This is really a fixup to the change that bumped the OpenTelemetry version. Better to squash it into that commit. Even better is isolating the opentelemetry changes (deps and code) from the other commits.

@@ -41,7 +41,8 @@
},
"files": [
"*.js",
"NEWS.md"
"NEWS.md",
"src"
Copy link
Member

Choose a reason for hiding this comment

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

could we do a build instead so we're not back to exporting all the modules?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see how this is any worse than the status quo. This package.json is not viable: it produces a tarball that doesn't have any implementation. That broke the integration test.

What kind of build do you have in mind? If you just care about exports, let's add packageJson.exports, but I don't want to tackle that in this PR.

Copy link
Member

Choose a reason for hiding this comment

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

I don't see how this is any worse than the status quo.

It's net better, for sure. But it fails at something that was intended and I wonder if we can make it work as intended.

I had in mind a dist/ style build but I think your packageJson.exports suggestion is better. I agree it can wait for another PR.

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

important tests, thanks

@michaelfig michaelfig added this pull request to the merge queue Jun 6, 2023
Merged via the queue into master with commit 3353509 Jun 6, 2023
59 checks passed
@michaelfig michaelfig deleted the mfig-local-npm branch June 6, 2023 16:47
mhofman pushed a commit that referenced this pull request Aug 7, 2023
ci(local-npm): resume integration testing of NPM canary
mhofman pushed a commit that referenced this pull request Aug 7, 2023
ci(local-npm): resume integration testing of NPM canary
mhofman pushed a commit that referenced this pull request Sep 21, 2023
ci(local-npm): resume integration testing of NPM canary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force:integration Force integration tests to run on PR tooling repo-wide infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants