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

app versions list and app release #3890

Merged
merged 12 commits into from
May 21, 2024
Merged

Conversation

amcaplan
Copy link
Contributor

@amcaplan amcaplan commented May 12, 2024

WHY are these changes introduced?

Filling out more commands

WHAT is this pull request doing?

Adds ShopifyDevelopersClient support for app versions list and app release.

Note that, since a version diffing query is unavailable, we have implemented a simple local diffing strategy which is essentially the same as what's going on behind the scenes anyway.

Also note that some data (e.g. created at date) has been stubbed out for now, since it is not available in the prototype API but should be available in the production API.

These screenshots should give a general picture of the situation:

app versions list

Screenshot 2024-05-20 at 21 41 14

app release (showing diffs of adding + removing)

out

How to test your changes?

On prototype, run app versions list and app release

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-management

Copy link
Contributor

github-actions bot commented May 12, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
71.75% (-0.19% 🔻)
7085/9875
🟡 Branches
68.86% (-0.07% 🔻)
3513/5102
🟡 Functions
71.36% (-0.09% 🔻)
1894/2654
🟡 Lines
73.03% (-0.23% 🔻)
6668/9131
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / app-version-by-id.ts
100% 100% 100% 100%
🟢
... / app-versions.ts
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / release.ts
93.33% (-0.42% 🔻)
60% 75%
92.86% (-0.48% 🔻)
🔴
... / partners-client.ts
18.35% (-0.52% 🔻)
34.62% 15.22%
18.27% (-0.54% 🔻)
🟢
... / ConcurrentOutput.tsx
97.62% (-2.38% 🔻)
75% (-8.33% 🔻)
100%
97.44% (-2.56% 🔻)

Test suite run success

1660 tests passing in 769 suites.

Report generated by 🧪jest coverage report action from 2ba0f38

@amcaplan amcaplan force-pushed the app-versions-list-and-release branch 2 times, most recently from bfecb5d to 349169e Compare May 13, 2024 12:10
@amcaplan amcaplan force-pushed the app-versions-list-and-release branch from 6a55731 to 90a1d91 Compare May 20, 2024 16:16
@amcaplan amcaplan marked this pull request as ready for review May 20, 2024 18:36
Copy link
Contributor

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

@amcaplan amcaplan force-pushed the app-versions-list-and-release branch from f31515a to cc6cee8 Compare May 20, 2024 20:37
Comment on lines +66 to +64
appVersionId: number
versionId: string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't love calling these 2 things basically the same thing, but I believe that once we switch from the prototype backend to main I will be able to revert this anyway (since it will use a numeric ID as well - see here).

appVersions: {
nodes: result.app.versions.map((version) => {
return {
createdAt: '0',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't have version creation date available in the prototype API, we should make sure it's there in main.

displayName: version.createdBy.name,
},
versionTag: version.versionTag,
status: '',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

status is not currently implemented

}
}

async appVersionsDiff(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For context on the client-side implementation (vs. server-side in PartnersClient), see here

Comment on lines +585 to +621
message: '',
location: '',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

message should be added to the API. location is a question where it should be generated (server vs. client); it refers to a web UI URL, and I don't think we even know yet what that will be.

Comment on lines +591 to +627
category: '',
details: [],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we'll need to work out a lot of these details when we move to the main backend. This applies across many operations.

@amcaplan amcaplan force-pushed the app-versions-list-and-release branch from cc6cee8 to bbe3166 Compare May 21, 2024 10:08
Copy link
Contributor

@gonzaloriestra gonzaloriestra left a comment

Choose a reason for hiding this comment

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

The code looks fine and everything works as expected! 👌

Just some minor suggestions.

amcaplan and others added 2 commits May 21, 2024 17:51
Co-authored-by: Gonzalo Riestra <gonzalo.riestra@shopify.com>
@amcaplan amcaplan added this pull request to the merge queue May 21, 2024
Merged via the queue into main with commit 634cc37 May 21, 2024
32 checks passed
@amcaplan amcaplan deleted the app-versions-list-and-release branch May 21, 2024 18:29
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

2 participants