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

Fix packaging bash scripts #413

Merged

Conversation

TaoChenOSU
Copy link
Collaborator

Motivation and Context

Running the packaging bash scripts in the repo will result in the following error:
image
This is caused by un-escaped characters in the build options.

Description

Fix the issue by escaping the characters in the build options.

Contribution Checklist

@TaoChenOSU TaoChenOSU added the bug Something isn't working label Sep 28, 2023
@TaoChenOSU TaoChenOSU self-assigned this Sep 28, 2023
@github-actions github-actions bot added the deployment Issues related to deploying Chat-Copilot label Sep 28, 2023
@dehoward dehoward added PR: regression fix Used to track PRs that fix a regression in the main branch and removed bug Something isn't working labels Sep 28, 2023
@dehoward dehoward added this pull request to the merge queue Sep 28, 2023
Merged via the queue into microsoft:main with commit e0934b5 Sep 28, 2023
5 checks passed
@Rsimk
Copy link

Rsimk commented Oct 26, 2023

was this actually tested on Linux/WSL?
It still gives the error :(

/chat-copilot/scripts/deploy$ ./package-webapi.sh
Building backend executables...
Build configuration: Release
MSBuild version 17.7.3+8ec440e68 for .NET
MSBUILD : error MSB1008: Only one project can be specified.
    Full command line: '/usr/share/dotnet/sdk/7.0.402/MSBuild.dll -maxcpucount -verbosity:m -target:Restore --property:_IsPublishing=true -property:PublishDir=/home/xxxxxxxx/repo/xxxxxxxx/chat-copilot/scripts/deploy/publish -property:_CommandLineDefinedOutputPath=true -property:SelfContained=True -property:_CommandLineDefinedSelfContained=true -property:RuntimeIdentifier=linux-x64 -property:_CommandLineDefinedRuntimeIdentifier=true -property:Configuration=Release /home/xxxxxxxx/repo/xxxxxxxx/chat-copilot/scripts/deploy/../../webapi/CopilotChatWebApi.csproj //p:AssemblyVersion=0.0.0 //p:FileVersion=0.0.0 //p:InformationalVersion= -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/share/dotnet/sdk/7.0.402/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/usr/share/dotnet/sdk/7.0.402/dotnet.dll'
  Switches appended by response files:
Switch: //p:AssemblyVersion=0.0.0

For switch syntax, type "MSBuild -help"

gormaar pushed a commit to equinor/chat-copilot that referenced this pull request Nov 29, 2023
### Motivation and Context
This PR adds support to acquire an access token using MSAL. It passes
this under a new header when making SK server requests, and the user ID
token is also added under the 'Authorization' header.

### Description
This implementation follows the 'incremental consent' concept, where the
User will only be prompted for 'openid', 'offline_access', 'profile',
and 'User.Read' consent on login. Further permissions will require
additional consent, in which the user will be prompted when a request
for the token is made.

If consent is granted and user is authorized, the access token will be
passed to the server under this header:
`sk-copilot-connector-access-token`. The `Authorization` header is
reserved for the SK Access token.

To invoke skills with tokens, do the following (see comments in useChat
for example):

1. `import { useConnectors } from '{path}/connectors/useConnectors';`
2. In component: `const connectors = useConnectors();`
3. Invoke Skill with scopes required for connector as an array, i.e.
`const scopes = ['User.Read']`
To use Graph token specifically, comment out the scopes you need under
`msGraphScopes` in `Constants.ts`, then call the i.e.,
`invokeSkillWithGraphToken` function. Be default, the ones already
uncommented map to Graph APIs used in existing connectors.
`var result = await connectors.invokeSkillWithGraphToken(ask,
'ChatSkill', 'Chat');`
To use ADO token specifically, comment out the scopes you need under
`adoScopes` in `Constants.ts`, then call the `invokeSkillWithAdoToken`
function.
i.e., `var result = await connectors.invokeSkillWithAdoToken(ask,
'ChatSkill', 'Chat');`


+ Error Handling
teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
### Motivation and Context

<!-- Thank you for your contribution to the chat-copilot repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Running the packaging bash scripts in the repo will result in the
following error:

![image](https://github.com/microsoft/chat-copilot/assets/12570346/6cfacccb-eca0-4d54-9002-fa362e3fe12b)
This is caused by un-escaped characters in the build options.

### Description
Fix the issue by escaping the characters in the build options.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Issues related to deploying Chat-Copilot PR: regression fix Used to track PRs that fix a regression in the main branch
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

4 participants