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

chore: updated push sdk to NuGet workflow on WebApiClient changes #1944

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

Fargekritt
Copy link
Contributor

@Fargekritt Fargekritt commented Feb 24, 2025

Description

WebApiClient NuGet is now also pushed on changes in the WebApiClient not only on schema changes

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • Documentation is updated (either in docs-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)

Copy link
Contributor

coderabbitai bot commented Feb 24, 2025

📝 Walkthrough

Walkthrough

The changes update several GitHub Actions workflow files to broaden the conditions for triggering the publish-sdk-to-nuget job. The workflows in the main, production, and staging pipelines now check for a new output (hasWebApiClientChanges) in addition to the existing output (hasSwaggerSchemaChanges). Additionally, the workflow-check-for-changes.yml file is extended to define this new output and monitor WebApiClient file changes.

Changes

File(s) Change Summary
.github/workflows/ci-cd-main.yml, .github/workflows/ci-cd-prod.yml, .github/workflows/ci-cd-staging.yml Updated job condition in publish-sdk-to-nuget to execute if either hasSwaggerSchemaChanges or hasWebApiClientChanges is true.
.github/workflows/workflow-check-for-changes.yml Added a new output hasWebApiClientChanges and updated file filter configuration to monitor WebApiClient related files.

Possibly related PRs

  • feat: push WebApi SDK to NuGet #1916: The changes in the main PR are related to the modifications in the job conditions for publish-sdk-to-nuget, which also appear in the retrieved PR, indicating a direct connection in the workflow logic.
  • ci: ensure version is stored on app deploy #1762: The changes in the main PR are related to the addition of the hasWebApiClientChanges output, which is referenced in the updated conditions for the publish-sdk-to-nuget job in both the main PR and the retrieved PR's workflow files.
  • chore: refactor production deployment flow #1771: The changes in the main PR, which update the job conditions in the ci-cd-main.yml, are related to the modifications in the ci-cd-prod.yml file from the retrieved PR, as both involve similar updates to the publish-sdk-to-nuget job's conditional logic.

Suggested reviewers

  • oskogstad
  • arealmaas

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c10664 and b4bbb2b.

📒 Files selected for processing (1)
  • .github/workflows/workflow-check-for-changes.yml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/workflow-check-for-changes.yml
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Dry run deploy infrastructure / Deploy to test
  • GitHub Check: build / build-and-test

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Fargekritt Fargekritt marked this pull request as ready for review February 24, 2025 08:20
@Fargekritt Fargekritt requested review from a team as code owners February 24, 2025 08:20
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/ci-cd-staging.yml (1)

85-85: Expanded NuGet Publishing Condition
The updated conditional now checks for both Swagger schema changes and WebApiClient modifications. This ensures that if either type of change occurs, the NuGet package is pushed. For clarity and consistency, consider confirming whether the value of hasWebApiClientChanges should be explicitly compared to 'true' (as done with Swagger schema changes) in case the output is a string.

.github/workflows/ci-cd-main.yml (1)

104-104: Expanded NuGet Publishing Condition in Main Workflow
The conditional expression now correctly triggers the publish-sdk-to-nuget job when there are either Swagger schema changes or WebApiClient changes. Just verify that the type of hasWebApiClientChanges is consistent with the explicit string comparison used for hasSwaggerSchemaChanges; if it is a string, an explicit comparison (e.g. == 'true') may improve readability.

.github/workflows/ci-cd-prod.yml (1)

105-105: Expanded NuGet Publishing Condition in Production Workflow
Similar to the main workflow, the production workflow now triggers the NuGet publishing job if there are Swagger schema changes or WebApiClient changes. Ensure that the output for hasWebApiClientChanges is of the expected type so that this conditional behaves consistently across environments.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e3b2799 and 1508ff1.

📒 Files selected for processing (4)
  • .github/workflows/ci-cd-main.yml (1 hunks)
  • .github/workflows/ci-cd-prod.yml (1 hunks)
  • .github/workflows/ci-cd-staging.yml (1 hunks)
  • .github/workflows/workflow-check-for-changes.yml (3 hunks)
🔇 Additional comments (3)
.github/workflows/workflow-check-for-changes.yml (3)

23-25: New Output for WebApiClient Changes
The addition of the hasWebApiClientChanges output in the workflow’s outputs section is clear and well-documented. This new output will inform downstream jobs if any WebApiClient files have been modified.


54-54: Job Output Assignment for WebApiClient Changes
The job output hasWebApiClientChanges is correctly derived by comparing the web_api_client_modified output from the filter-backend step to 'true'. This ensures only a truthy result triggers the output.


86-88: WebApiClient Files Configuration
The configuration for monitoring changes in the WebApiClient directory (i.e. 'src/Digdir.Library.Dialogporten.WebApiClient/**/*') is clearly specified. This allows the workflow to reliably detect modifications to this code area and trigger related jobs accordingly.

@Fargekritt Fargekritt merged commit b7186ba into main Feb 24, 2025
23 checks passed
@Fargekritt Fargekritt deleted the chore/update-sdk-nuget-workflow branch February 24, 2025 08:37
oskogstad added a commit that referenced this pull request Feb 24, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.55.4](v1.55.3...v1.55.4)
(2025-02-24)


### Miscellaneous Chores

* **performance:** remove warm-up step before performance tests
([#1942](#1942))
([757f454](757f454))
* **sdk:** Update title for SDK README.md
([#1949](#1949))
([b4139b1](b4139b1))
* updated push sdk to NuGet workflow on WebApiClient changes
([#1944](#1944))
([b7186ba](b7186ba))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Ole Jørgen Skogstad <skogstad@softis.net>
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.

3 participants